Skip to content

Enhanced Thinking Control #587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

xihuai18
Copy link

@xihuai18 xihuai18 commented Jun 3, 2025

Context

  1. Many users query Claude and Gemini models through openai-compatible apis, while current "thinking" controllers for Claude and Gemini do not allow users to change the parameters like thinking_budget.
  2. The reasoning_effort parameter user input in the UI is not used actually.

Implementation

  1. Rewrite the thinking budget UI and parameters utilization.
  2. Use the reasoning_effort parameter from the UI if exists.

Screenshots

image

How to Test

  1. Use claude models, e.g., claude-sonnet-4 and test them with different thinking_budget, where 0 means no thinking.
  2. The improvement for Gemini is hard to test, maybe different reasoning_effort parameters result different token usages.

xihuai18 added 4 commits June 3, 2025 13:48
…viders

- Add ThinkingBudgetToggle component with configurable token limits
- Implement thinking configuration in OpenAI API requests
- Update model info to support thinking mode and max thinking tokens
- Add internationalization support across 18 languages
- Ensure compatibility with Claude's thinking budget feature
Copy link

changeset-bot bot commented Jun 3, 2025

⚠️ No Changeset found

Latest commit: 068ff69

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@kevinvandijk kevinvandijk self-requested a review June 3, 2025 12:23
@xihuai18
Copy link
Author

Any progress for this feature?

@kevinvandijk
Copy link
Collaborator

Hi @xihuai18! Thanks for this! It does seem that this breaks the reasoning sliders when using claude through the kilocode/openrouter/anthropic provider. These options seem removed in this PR, was that intentional? We do need a way to set max tokens in those providers as well:

image

@xihuai18
Copy link
Author

image

I am also confused that it seems the max tokens slider is duplicated with the above max token setter.

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.

2 participants