feat: add thinking mode setting for OpenAI Compatible provider #10613
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.
This PR attempts to address Issue #10603. Feedback and guidance are welcome.
Summary
When using the OpenAI Compatible provider with thinking models like Kimi K2, DeepSeek Reasoner, or GLM-4, the thinking/reasoning output was not working because the
thinking: { type: "enabled" }parameter was not being sent in the API request.Changes
Core Changes
openAiThinkingModeEnabledsetting to the OpenAI schemaUI Changes
Translations
enableThinkingMode,enableThinkingModeTips) to all 18 locale filesTests
How to Test
Related Issues
Fixes #10603
Important
Adds thinking mode setting for OpenAI Compatible provider, updating API handling, UI components, translations, and tests.
openAiThinkingModeEnabledsetting to OpenAI schema inprovider-settings.ts.openai.tsto handle thinking parameter for streaming and non-streaming modes.ThinkingModeSetting.tsxfor thinking mode toggle.OpenAICompatible.tsx.enableThinkingModeandenableThinkingModeTipsin 18 locale files.openai.spec.tsfor thinking mode in streaming/non-streaming modes.This description was created by
for ab9a4e3. You can customize this summary. It will automatically update as commits are pushed.