[eric] providers: Fable 5 turns thinking off by omitting the param, not thinking:disabled (which 400s)

This commit is contained in:
ciregenz
2026-06-09 14:06:18 -07:00
parent a774f68b96
commit 1be1ce581d
2 changed files with 8 additions and 1 deletions
+4 -1
View File
@@ -1759,7 +1759,10 @@ class AgentManager:
level = "off"
if api_type == "anthropic":
if level == "off":
options_kwargs["thinking"] = {"type": "disabled"}
# Fable 5 400s on an explicit thinking:disabled; you turn it
# off there by omitting the param (off is Fable's default).
if not (isinstance(resolved_model, str) and "fable" in resolved_model):
options_kwargs["thinking"] = {"type": "disabled"}
elif level in ("low", "medium", "high"):
options_kwargs["effort"] = level
except Exception as e:
@@ -20,6 +20,10 @@ def thinking_params_for(api: str, level: str, model_id: str = "") -> dict | None
if level == "off":
if api == "anthropic":
# Fable 5 400s on an explicit thinking:disabled; omit the param to
# turn thinking off (off is its default). Other Claude models accept it.
if "fable" in model_id:
return None
return {"thinking": {"type": "disabled"}}
if api == "codex":
return {"reasoning": {"effort": "none"}}