🤖 fix: enable reasoning for Claude Opus 4.5 #754
Merged
+50
−40
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.
Summary
Fixes missing reasoning traces in the UI when using Claude Opus 4.5.
Problem
Opus 4.5 supports two separate but complementary parameters for reasoning:
effort(new in Opus 4.5): Controls how eagerly Claude spends tokens across ALL output (text, tool calls, and thinking). Values:low,medium,high.thinking(extended thinking): Enables visible reasoning traces with a token budget. This is what makes the "Thinking..." UI appear.We were only passing
effort, which controls token spend but doesn't enable the reasoning traces to be returned from the API. Thethinkingparameter must also be set for reasoning to be visible.Solution
For Opus 4.5, now pass both parameters:
How these parameters interact
From Anthropic's docs:
effortonlythinkingonlyeffort+thinkingTesting
make typecheckpassesGenerated with
mux