Skip to content

feat(anthropic): add claude-opus-5; coerce thinking to adaptive on budget-less models - #115

Merged
leoveanv merged 1 commit into
mainfrom
dev
Aug 13, 2026
Merged

feat(anthropic): add claude-opus-5; coerce thinking to adaptive on budget-less models#115
leoveanv merged 1 commit into
mainfrom
dev

Conversation

@markhofm

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI lite review requested due to automatic review settings August 13, 2026 13:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Anthropic neurosymbolic backend to recognize the new claude-opus-5 model and adjusts the engine’s thinking-configuration behavior to avoid invalid “manual thinking” (budget tokens) requests on models that no longer support them.

Changes:

  • Added claude-opus-5 to ANTHROPIC_MODEL_SPECS with 1M context, vision/reasoning, and updated pricing.
  • Updated _build_thinking_config to coerce thinking requests to adaptive for models that reject manual thinking, and added a special-case for claude-fable-5 when thinking.type == "disabled".

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
symai/backend/engines/neurosymbolic/anthropic/models.py Adds the claude-opus-5 model spec (capabilities, context/response limits, pricing).
symai/backend/engines/neurosymbolic/anthropic/engine.py Updates thinking-config construction to handle budget-less models and claude-fable-5’s disabled-thinking behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

logger.warning(
"Thinking cannot be disabled on claude-fable-5; omitting the thinking parameter."
)
return None, None
Comment on lines +404 to +405
# Models where manual thinking (budget_tokens) is removed entirely — any
# thinking request is coerced to adaptive (budget_tokens returns 400 there).
Comment on lines +406 to +410
if model in {
"claude-fable-5",
"claude-opus-5",
"claude-sonnet-5",
"claude-opus-4-8",
Comment on lines +55 to +68
"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),
),
@leoveanv
leoveanv merged commit 9cb2f15 into main Aug 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants