mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 05:00:16 +00:00
fix(ai): use model.api instead of hardcoding api type in streaming functions
- anthropic.ts: use model.api instead of hardcoding 'anthropic-messages' - openai-responses.ts: use model.api instead of hardcoding 'openai-responses' - gitlab-duo: simplify to use actual model IDs, export MODELS array
This commit is contained in:
parent
7019fdb92b
commit
0d24ddbb03
4 changed files with 162 additions and 515 deletions
|
|
@ -149,7 +149,7 @@ export const streamAnthropic: StreamFunction<"anthropic-messages", AnthropicOpti
|
|||
const output: AssistantMessage = {
|
||||
role: "assistant",
|
||||
content: [],
|
||||
api: "anthropic-messages" as Api,
|
||||
api: model.api as Api,
|
||||
provider: model.provider,
|
||||
model: model.id,
|
||||
usage: {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ export const streamOpenAIResponses: StreamFunction<"openai-responses", OpenAIRes
|
|||
const output: AssistantMessage = {
|
||||
role: "assistant",
|
||||
content: [],
|
||||
api: "openai-responses" as Api,
|
||||
api: model.api as Api,
|
||||
provider: model.provider,
|
||||
model: model.id,
|
||||
usage: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue