Conversation
There was a problem hiding this comment.
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-5toANTHROPIC_MODEL_SPECSwith 1M context, vision/reasoning, and updated pricing. - Updated
_build_thinking_configto coerce thinking requests to adaptive for models that reject manual thinking, and added a special-case forclaude-fable-5whenthinking.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), | ||
| ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.