fix(anthropic): use adaptive thinking for Claude Fable 5.2 (#13478)

Co-authored-by: mbot <3754f8729004d95654c46dbab3129e4ab9ef05cc2534e2a3fbfc155983bd637b@buzz.block.builderlab.xyz>
Co-authored-by: Lifei Zhou <lifei@squareup.com>
(cherry picked from commit 4a55150924f267baea73d3c2045874354aee69e1)
This commit is contained in:
Bradley Axen
2026-11-12 22:03:08 +00:00
committed by Lifei Zhou
parent d0944b9a9f
commit e4b5b454b6
4 changed files with 21 additions and 2 deletions
@@ -36227,6 +36227,7 @@
"xhigh",
"max"
],
"thinking_mode": "always_on_adaptive",
"tool_call": true,
"temperature": false,
"knowledge": "2026-06",
@@ -30,9 +30,10 @@ fn get_thinking_mode(canonical_id: &str, value: &Value) -> Option<ThinkingMode>
}
fn inferred_thinking_mode(canonical_id: &str) -> Option<ThinkingMode> {
if canonical_id.starts_with("anthropic/claude-fable-") {
return Some(ThinkingMode::AlwaysOnAdaptive);
}
match canonical_id {
"anthropic/claude-fable-5" => Some(ThinkingMode::AlwaysOnAdaptive),
"anthropic/claude-fable-5.1" => Some(ThinkingMode::AlwaysOnAdaptive),
"anthropic/claude-opus-5" => Some(ThinkingMode::Adaptive),
"anthropic/claude-opus-5.5" => Some(ThinkingMode::AlwaysOnAdaptive),
"anthropic/claude-opus-4.6" => Some(ThinkingMode::Adaptive),
@@ -2451,6 +2451,21 @@ mod tests {
);
}
#[test]
fn test_thinking_type_fable_5_2_is_always_on_adaptive() {
let _guard = env_lock::lock_env([("GOOSE_THINKING_EFFORT", None::<&str>)]);
for model in ["claude-fable-5-2", "system.ai.claude-fable-5-2"] {
for effort in ["off", "low", "high"] {
assert_eq!(
thinking_type(&cfg_with_effort(model, effort)),
ThinkingType::Adaptive,
"{model} {effort}"
);
}
}
}
#[test]
fn test_thinking_type_opus_5_5_cannot_disable_thinking() {
let _guard = env_lock::lock_env([("GOOSE_THINKING_EFFORT", None::<&str>)]);
@@ -1552,6 +1552,8 @@ mod tests {
"databricks-claude-opus-4-8",
"databricks-claude-fable-5",
"global.anthropic.claude-fable-5",
"databricks-claude-fable-5-2",
"system.ai.claude-fable-5-2",
] {
let mut model_config = ModelConfig::new(name);
model_config.max_tokens = Some(4096);