feat: add claude-sonnet-4-6 (20260217) model support
- costs.ts: add claude-sonnet-4-6-20260217 at $3/$15 per 1M tokens, claude-sonnet-4.6 GitHub alias at $0 - models.ts: add anthropicToGitHubModel mapping for claude-sonnet-4-6-20260217 → claude-sonnet-4.6 - tokens.ts: add 1M token context window for claude-sonnet-4-6-20260217 - providers.ts: bump Anthropic, GitHub Models, and Bedrock default to sonnet-4-6 - AGENTS.md: update default subagent model from claude-sonnet-4.5 to claude-sonnet-4.6
This commit is contained in:
@@ -13,7 +13,7 @@ interface ProviderDef {
|
||||
}
|
||||
|
||||
const TOP_TIER: ProviderDef[] = [
|
||||
{ name: 'Anthropic', provider: 'anthropic', defaultModel: 'claude-sonnet-4-20250514', fastModel: 'claude-haiku-4-5-20251001', needsApiKey: true, needsEndpoint: false, apiKeyLabel: 'Anthropic API key' },
|
||||
{ name: 'Anthropic', provider: 'anthropic', defaultModel: 'claude-sonnet-4-6-20260217', fastModel: 'claude-haiku-4-5-20251001', needsApiKey: true, needsEndpoint: false, apiKeyLabel: 'Anthropic API key' },
|
||||
{ name: 'OpenAI', provider: 'openai', defaultModel: 'gpt-4.1', fastModel: 'gpt-4.1-mini', needsApiKey: true, needsEndpoint: false, apiKeyLabel: 'OpenAI API key' },
|
||||
{ name: 'Ollama (local)', provider: 'ollama', defaultModel: 'llama3.3', fastModel: 'llama3.2:3b', needsApiKey: false, needsEndpoint: true, defaultEndpoint: 'http://localhost:11434' },
|
||||
];
|
||||
@@ -26,8 +26,8 @@ const SECOND_TIER: ProviderDef[] = [
|
||||
{ name: 'xAI (Grok)', provider: 'xai', defaultModel: 'grok-3', fastModel: 'grok-3-mini', needsApiKey: true, needsEndpoint: false, apiKeyLabel: 'xAI API key' },
|
||||
{ name: 'MiniMax', provider: 'minimax', defaultModel: 'MiniMax-M1', needsApiKey: true, needsEndpoint: true, defaultEndpoint: 'https://api.minimax.io/v1', apiKeyLabel: 'MiniMax API key' },
|
||||
{ name: 'Moonshot (Kimi)', provider: 'moonshot', defaultModel: 'moonshot-v1-8k', needsApiKey: true, needsEndpoint: true, defaultEndpoint: 'https://api.moonshot.cn/v1', apiKeyLabel: 'Moonshot API key' },
|
||||
{ name: 'Amazon Bedrock', provider: 'bedrock', defaultModel: 'anthropic.claude-sonnet-4-20250514-v1:0', needsApiKey: false, needsEndpoint: false },
|
||||
{ name: 'GitHub Models', provider: 'github', defaultModel: 'claude-sonnet-4-20250514', needsApiKey: false, needsEndpoint: false },
|
||||
{ name: 'Amazon Bedrock', provider: 'bedrock', defaultModel: 'anthropic.claude-sonnet-4-6-20260217-v1:0', needsApiKey: false, needsEndpoint: false },
|
||||
{ name: 'GitHub Models', provider: 'github', defaultModel: 'claude-sonnet-4-6-20260217', needsApiKey: false, needsEndpoint: false },
|
||||
];
|
||||
|
||||
const PROVIDER_HELP: Record<string, string> = {
|
||||
|
||||
@@ -15,6 +15,7 @@ const DEFAULT_CONTEXT_WINDOW = 128_000;
|
||||
* Hard-coded context window sizes (in tokens) for known models.
|
||||
*/
|
||||
export const CONTEXT_WINDOWS: Record<string, number> = {
|
||||
'claude-sonnet-4-6-20260217': 1_000_000,
|
||||
'claude-sonnet-4-20250514': 200_000,
|
||||
'claude-3-5-haiku-20241022': 200_000,
|
||||
'claude-3-5-sonnet-20241022': 200_000,
|
||||
|
||||
@@ -259,6 +259,7 @@ export function anthropicToGitHubModel(anthropicModel: string): string | undefin
|
||||
// Sonnet family
|
||||
'claude-sonnet-4-20250514': 'claude-sonnet-4',
|
||||
'claude-sonnet-4-5-20250929': 'claude-sonnet-4.5',
|
||||
'claude-sonnet-4-6-20260217': 'claude-sonnet-4.6',
|
||||
// Opus family
|
||||
'claude-opus-4-20250514': 'claude-opus-4',
|
||||
'claude-opus-4-5-20250918': 'claude-opus-4.5',
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/** Approximate cost per million tokens for known models. */
|
||||
export const MODEL_COSTS_PER_MILLION: Record<string, { input: number; output: number }> = {
|
||||
// Anthropic
|
||||
'claude-sonnet-4-6-20260217': { input: 3, output: 15 },
|
||||
'claude-sonnet-4-20250514': { input: 3, output: 15 },
|
||||
'claude-3-5-haiku-20241022': { input: 0.80, output: 4 },
|
||||
'claude-opus-4-20250514': { input: 15, output: 75 },
|
||||
@@ -17,6 +18,7 @@ export const MODEL_COSTS_PER_MILLION: Record<string, { input: number; output: nu
|
||||
// GitHub Copilot (included in subscription, tracked at $0)
|
||||
'gpt-4.1': { input: 0, output: 0 },
|
||||
'gpt-4.1-mini': { input: 0, output: 0 },
|
||||
'claude-sonnet-4.6': { input: 0, output: 0 },
|
||||
'claude-sonnet-4': { input: 0, output: 0 },
|
||||
'claude-haiku-4': { input: 0, output: 0 },
|
||||
// Local / unknown models
|
||||
|
||||
Reference in New Issue
Block a user