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) <noreply@anthropic.com>
This commit is contained in:
Marc-André BombeckandClaude Opus 4.8 committed 2026-06-05 14:46:10 +02:00
1 parent dabedd2edc
commit 47255a93b5
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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({
+1 -1
View File
@@ -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": {