Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion symai/backend/engines/neurosymbolic/anthropic/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,24 @@ def _build_thinking_config(self, thinking_arg, model, spec):

thinking_type = thinking_arg.get("type")
if thinking_type == "disabled":
if model == "claude-fable-5":
# Fable rejects an explicit {"type": "disabled"} (thinking is
# always on); omitting the parameter is the closest valid form.
logger.warning(
"Thinking cannot be disabled on claude-fable-5; omitting the thinking parameter."
)
return None, None
return {"type": "disabled"}, None

if model in {"claude-opus-4-8", "claude-opus-4-7"}:
# Models where manual thinking (budget_tokens) is removed entirely — any
# thinking request is coerced to adaptive (budget_tokens returns 400 there).
Comment on lines +404 to +405
if model in {
"claude-fable-5",
"claude-opus-5",
"claude-sonnet-5",
"claude-opus-4-8",
Comment on lines +406 to +410
"claude-opus-4-7",
}:
return {"type": "adaptive"}, thinking_arg.get("effort")

if thinking_type == "adaptive":
Expand Down
14 changes: 14 additions & 0 deletions symai/backend/engines/neurosymbolic/anthropic/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@ class AnthropicModelSpec:
sampling=False,
pricing=ModelPricing(input=10.00, output=50.00, cached_input=1.00),
),
"claude-opus-5": AnthropicModelSpec(
context_tokens=LONG_CONTEXT_1M_TOKENS,
response_tokens=128_000,
reasoning=True,
vision=True,
# NOTE: thinking is on by default (an omitted `thinking` runs adaptive);
# `disabled` is only accepted at effort high or lower. Sampling kwargs
# are rejected as deprecated.
adaptive_thinking=True,
long_context_1m=True,
default_long_context_1m=True,
sampling=False,
pricing=ModelPricing(input=5.00, output=25.00, cached_input=0.50),
),
Comment on lines +55 to +68
"claude-sonnet-5": AnthropicModelSpec(
context_tokens=LONG_CONTEXT_1M_TOKENS,
response_tokens=128_000,
Expand Down