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:
William Valentin
2026-02-17 14:56:41 -08:00
parent 9f57c221a7
commit 0a4cfda787
5 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
## General Rules
- **Parallelise with subagents:** For every task, use multiple subagents with the appropriate model to work more efficiently. Dispatch independent subtasks in parallel rather than executing them sequentially.
- **Subagent model selection (MANDATORY):** You MUST use the right model tier for each subagent — `claude-haiku-4.5` for fast/simple/mechanical tasks, `claude-sonnet-4.5` for default/standard implementation work, and `claude-opus-4.6` for complex reasoning or architecture decisions. Never use the same model for all subagents.
- **Subagent model selection (MANDATORY):** You MUST use the right model tier for each subagent — `claude-haiku-4.5` for fast/simple/mechanical tasks, `claude-sonnet-4.6` for default/standard implementation work, and `claude-opus-4.6` for complex reasoning or architecture decisions. Never use the same model for all subagents.
- **Minimize main agent context:** Always delegate tasks to subagents with the right model to execute each task more efficiently and keep the main agent context window usage minimum. The main agent should coordinate and synthesize, not perform detailed implementation work.
- **Commit often:** `git commit` frequently — after each meaningful unit of work, not just at the end of a task.
- **Commit structure:** Prefer small, atomic commits that each represent one meaningful unit of work. Keep unrelated changes out of the same commit. When a change affects docs/diagrams/state, update and commit those alongside the code change (not later).
+3 -3
View File
@@ -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> = {
+1
View File
@@ -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,
+1
View File
@@ -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',
+2
View File
@@ -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