feat: add explicit entry for claude-opus-5 in model config (#2831)

Fixes #2787

- Added `claude-opus-5` to `config.rs` model classification and adaptive
effort helpers.
- Updated fixture test configurations to cover `claude-opus-5`.
- Verified with `cargo test` and JS unit tests.

Signed-off-by: Apurva Shaw <apurvashaw@Apurvas-MacBook-Air.local>
Co-authored-by: Apurva Shaw <apurvashaw@Apurvas-MacBook-Air.local>
This commit is contained in:
Apurva324
2026-07-28 22:56:20 +00:00
committed by GitHub
co-authored by Apurva Shaw
parent 55a3ed7b92
commit 90e058ebf6
2 changed files with 9 additions and 0 deletions
+2
View File
@@ -184,6 +184,7 @@ pub fn anthropic_thinking_config(
fn anthropic_model_supports_xhigh(model: &str) -> bool {
model.starts_with("claude-opus-4-7")
|| model.starts_with("claude-opus-4-8")
|| model.starts_with("claude-opus-5")
|| model.starts_with("claude-sonnet-5")
|| model.starts_with("claude-fable-5")
|| model.starts_with("claude-mythos-5")
@@ -606,6 +607,7 @@ fn is_adaptive_thinking_model(model: &str) -> bool {
model.starts_with("claude-opus-4-6")
|| model.starts_with("claude-opus-4-7")
|| model.starts_with("claude-opus-4-8")
|| model.starts_with("claude-opus-5")
// Sonnet 5.x (any patch/date suffix after "claude-sonnet-5").
|| model.starts_with("claude-sonnet-5")
// Sonnet 4.6 exactly (not Sonnet 4.5 or earlier — not in the adaptive table).
@@ -41,6 +41,13 @@
"validValues": ["low", "medium", "high", "xhigh", "max"],
"defaultValue": "high"
},
{
"note": "Anthropic adaptive xhigh-capable: claude-opus-5",
"provider": "anthropic",
"model": "claude-opus-5",
"validValues": ["low", "medium", "high", "xhigh", "max"],
"defaultValue": "high"
},
{
"note": "Anthropic adaptive xhigh-capable: claude-mythos-5",
"provider": "anthropic",