feat: opus 4.6 woooo
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m21s
CI / Lint & Test (pull_request) Successful in 19m43s
CI / Build Linux (pull_request) Successful in 21m55s
CI / Build Windows (cross-compile) (pull_request) Successful in 31m42s

This commit is contained in:
2026-02-06 14:00:51 -08:00
parent 136f95cd1a
commit a31517be94
3 changed files with 16 additions and 5 deletions
+6 -1
View File
@@ -86,6 +86,8 @@ 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-opus-4-6" => 200_000,
// Claude 4.5 family - 200K standard context
"claude-opus-4-5-20251101"
| "claude-sonnet-4-5-20250929"
@@ -498,7 +500,10 @@ pub fn calculate_cost(
cache_read_tokens: Option<u64>,
) -> f64 {
let (input_price_per_million, output_price_per_million) = match model {
// Current generation (Claude 4.5)
// Current generation (Claude 4.6)
"claude-opus-4-6" => (5.0, 25.0),
// Previous generation (Claude 4.5)
"claude-opus-4-5-20251101" => (5.0, 25.0),
"claude-sonnet-4-5-20250929" => (3.0, 15.0),
"claude-haiku-4-5-20251001" => (1.0, 5.0),