diff --git a/src-tauri/src/stats.rs b/src-tauri/src/stats.rs index 6422bef..16dd45e 100644 --- a/src-tauri/src/stats.rs +++ b/src-tauri/src/stats.rs @@ -86,8 +86,9 @@ impl ContextWarning { /// Get the context window limit (in tokens) for a given model fn get_context_window_limit(model: &str) -> u64 { match model { - // Claude 4.6 family - 200K standard (1M beta available via header) + // Claude 4.6 family "claude-opus-4-6" => 200_000, + "claude-sonnet-4-6" => 1_000_000, // 1M token context window // Claude 4.5 family - 200K standard context "claude-opus-4-5-20251101" | "claude-sonnet-4-5-20250929" @@ -502,6 +503,7 @@ pub fn calculate_cost( let (input_price_per_million, output_price_per_million) = match model { // Current generation (Claude 4.6) "claude-opus-4-6" => (5.0, 25.0), + "claude-sonnet-4-6" => (3.0, 15.0), // Previous generation (Claude 4.5) "claude-opus-4-5-20251101" => (5.0, 25.0), diff --git a/src/lib/components/ConfigSidebar.svelte b/src/lib/components/ConfigSidebar.svelte index 7274373..80ed171 100644 --- a/src/lib/components/ConfigSidebar.svelte +++ b/src/lib/components/ConfigSidebar.svelte @@ -83,8 +83,9 @@ { value: "", label: "Default (from ~/.claude)" }, // Current generation (Claude 4.6) { value: "claude-opus-4-6", label: "Claude Opus 4.6 (Most Capable)" }, + { value: "claude-sonnet-4-6", label: "Claude Sonnet 4.6 (Recommended)" }, // Previous generation (Claude 4.5) - { value: "claude-sonnet-4-5-20250929", label: "Claude Sonnet 4.5 (Recommended)" }, + { value: "claude-sonnet-4-5-20250929", label: "Claude Sonnet 4.5" }, { value: "claude-haiku-4-5-20251001", label: "Claude Haiku 4.5 (Fast & Cheap)" }, { value: "claude-opus-4-5-20251101", label: "Claude Opus 4.5" }, // Previous generation (Claude 4.x) diff --git a/src/lib/stores/stats.ts b/src/lib/stores/stats.ts index 0d36dc7..46d18cc 100644 --- a/src/lib/stores/stats.ts +++ b/src/lib/stores/stats.ts @@ -12,6 +12,7 @@ export type BudgetType = "token" | "cost"; export const MODEL_PRICING: Record = { // Current generation (Claude 4.6) "claude-opus-4-6": { input: 5.0, output: 25.0 }, + "claude-sonnet-4-6": { input: 3.0, output: 15.0 }, // Previous generation (Claude 4.5) "claude-opus-4-5-20251101": { input: 5.0, output: 25.0 }, "claude-sonnet-4-5-20250929": { input: 3.0, output: 15.0 },