Change anthropic model

This commit is contained in:
2026-04-23 13:09:53 -05:00
parent eef8b70fd9
commit 8a2074914c
4 changed files with 18 additions and 6 deletions

View File

@@ -9,7 +9,7 @@
export const MODELS = [
{
id: 'claude-sonnet-4-6-20250929',
id: 'claude-sonnet-4-6',
label: 'Claude Sonnet 4.6',
provider: 'anthropic',
creator: 'Anthropic',
@@ -45,8 +45,19 @@ export const MODELS = [
},
];
export const DEFAULT_MODEL_ID = 'claude-sonnet-4-6-20250929';
export const DEFAULT_MODEL_ID = 'claude-sonnet-4-6';
export function findModel(id) {
return MODELS.find(m => m.id === id);
}
export function normalizeModelId(raw) {
if (!raw) return raw;
// Allow legacy "provider/model" storage (e.g. "anthropic/claude-sonnet-4.6")
const noProvider = String(raw).includes('/') ? String(raw).split('/').pop() : String(raw);
// Allow legacy dotted Claude naming used in early versions of this repo.
if (noProvider === 'claude-sonnet-4.6') return 'claude-sonnet-4-6';
return noProvider;
}