mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-08-26 14:32:22 +02:00
[eric] providers: Fable 5 turns thinking off by omitting the param, not thinking:disabled (which 400s)
This commit is contained in:
@@ -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"}}
|
||||
|
||||
Reference in New Issue
Block a user