From 47255a93b567a6c202035ac1145e096df9277041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Fri, 5 Jun 2026 14:46:10 +0200 Subject: [PATCH] fix(ai): align provider default model fallbacks The BYOK Anthropic client fell back to the retired claude-3-5-sonnet-latest; match the chain-runner default (claude-sonnet-4-6). The admin ai-settings GET displayed a gpt-4o-mini fallback that disagreed with the actual provider default (gpt-4o); align the display string so the surfaced model matches what the provider would use. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/app/api/admin/ai-settings/route.ts | 2 +- src/lib/ai/provider.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/api/admin/ai-settings/route.ts b/src/app/api/admin/ai-settings/route.ts index 0883f5e5d..90f406b88 100644 --- a/src/app/api/admin/ai-settings/route.ts +++ b/src/app/api/admin/ai-settings/route.ts @@ -18,7 +18,7 @@ export const GET = apiHandler(async () => { }); const hasKey = Boolean(settings?.adminAiKeyEncrypted); - const model = settings?.adminAiModel ?? "gpt-4o-mini"; + const model = settings?.adminAiModel ?? "gpt-4o"; const baseUrl = settings?.adminAiBaseUrl ?? "https://api.openai.com/v1"; return apiSuccess({ diff --git a/src/lib/ai/provider.ts b/src/lib/ai/provider.ts index e695f3058..e71b923c4 100644 --- a/src/lib/ai/provider.ts +++ b/src/lib/ai/provider.ts @@ -52,7 +52,7 @@ function buildUserProvider(row: UserAIRow): AIProvider | null { // the SDK default is correct. return new AnthropicClient({ apiKey: decrypt(row.aiAnthropicKeyEncrypted), - model: row.aiModel ?? "claude-3-5-sonnet-latest", + model: row.aiModel ?? "claude-sonnet-4-6", }); } case "LOCAL": {