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:
Mario Zechner 2026-01-25 00:52:34 +01:00
parent 7019fdb92b
commit 0d24ddbb03
4 changed files with 162 additions and 515 deletions

View file

@ -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: {

View file

@ -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: {