Skip to content

Conversation

@ThomasK33
Copy link
Member

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:

  1. effort (new in Opus 4.5): Controls how eagerly Claude spends tokens across ALL output (text, tool calls, and thinking). Values: low, medium, high.

  2. 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. The thinking parameter must also be set for reasoning to be visible.

Solution

For Opus 4.5, now pass both parameters:

{
  anthropic: {
    thinking: {
      type: "enabled",
      budgetTokens: 20000,  // Enables visible reasoning traces
    },
    effort: "high",  // Controls token spend eagerness
  }
}

How these parameters interact

From Anthropic's docs:

The effort parameter works alongside the thinking token budget when extended thinking is enabled. These two controls serve different purposes:

  • Effort parameter: Controls how Claude spends all tokens—including thinking tokens, text responses, and tool calls
  • Thinking token budget: Sets a maximum limit on thinking tokens specifically

The effort parameter can be used with or without extended thinking enabled.

Configuration Behavior
effort only Controls token spend, no visible reasoning
thinking only Shows reasoning with default budget
effort + thinking Shows reasoning WITH token spend control

Testing

  • Verified reasoning traces now appear in UI when using Opus 4.5
  • make typecheck passes

Generated with mux

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33 ThomasK33 force-pushed the opus-45-reasoning-config-investigation branch 4 times, most recently from 5dd3fe4 to f239ad7 Compare November 25, 2025 13:24
@ThomasK33 ThomasK33 changed the title 🤖 fix: enable visible reasoning for Claude Opus 4.5 🤖 fix: enable reasoning for Claude Opus 4.5 Nov 25, 2025
@ThomasK33 ThomasK33 force-pushed the opus-45-reasoning-config-investigation branch from f239ad7 to 56f0432 Compare November 25, 2025 13:27
@ThomasK33
Copy link
Member Author

@codex review

@ThomasK33 ThomasK33 force-pushed the opus-45-reasoning-config-investigation branch from 56f0432 to a1a4dc9 Compare November 25, 2025 13:31
@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. 🎉

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33 ThomasK33 force-pushed the opus-45-reasoning-config-investigation branch 3 times, most recently from 8985cf1 to ca1a56b Compare November 25, 2025 13:46
Opus 4.5 now supports all thinking levels with proper effort mapping:
- off: effort='low', no thinking (fast, cheap, no visible reasoning)
- low: effort='low', thinking enabled (visible reasoning, budget-conscious)
- medium: effort='medium', thinking enabled
- high: effort='high', thinking enabled

Previously Opus 4.5 only passed the effort parameter without the thinking
parameter, which meant no visible reasoning traces were returned.

Also removed the policy restriction that prevented 'off' for Opus 4.5 -
users can now disable visible reasoning while still getting efficient
responses via effort='low'.

_Generated with mux_

Change-Id: I05239192b38babf22c7ca980d9380da718608be2
Signed-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33 ThomasK33 force-pushed the opus-45-reasoning-config-investigation branch from ca1a56b to 4dda388 Compare November 25, 2025 13:51
@ThomasK33 ThomasK33 added this pull request to the merge queue Nov 25, 2025
Merged via the queue into main with commit 27ef4af Nov 25, 2025
13 checks passed
@ThomasK33 ThomasK33 deleted the opus-45-reasoning-config-investigation branch November 25, 2025 14:19
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.

1 participant