Change anthropic model
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user