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:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user