Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jan 11, 2026

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

  • packages/types/src/provider-settings.ts: Added openAiThinkingModeEnabled setting to the OpenAI schema
  • src/api/providers/openai.ts: Added thinking parameter handling for both streaming and non-streaming modes

UI Changes

  • webview-ui/src/components/settings/ThinkingModeSetting.tsx: New UI component for the thinking mode toggle
  • webview-ui/src/components/settings/providers/OpenAICompatible.tsx: Integrated the new setting into the OpenAI Compatible settings panel

Translations

  • Added translations for the new setting (enableThinkingMode, enableThinkingModeTips) to all 18 locale files

Tests

  • src/api/providers/tests/openai.spec.ts: Added 6 new tests covering streaming/non-streaming modes with thinking mode enabled/disabled/undefined

How to Test

  1. Configure OpenAI Compatible provider with a thinking model (e.g., Kimi K2)
  2. Enable the new "Enable thinking mode" checkbox in settings
  3. Send a message and verify that reasoning content is returned

Related Issues

Fixes #10603


Important

Adds thinking mode setting for OpenAI Compatible provider, updating API handling, UI components, translations, and tests.

  • Behavior:
    • Adds openAiThinkingModeEnabled setting to OpenAI schema in provider-settings.ts.
    • Updates openai.ts to handle thinking parameter for streaming and non-streaming modes.
  • UI:
    • New component ThinkingModeSetting.tsx for thinking mode toggle.
    • Integrates setting into OpenAICompatible.tsx.
  • Translations:
    • Adds translations for enableThinkingMode and enableThinkingModeTips in 18 locale files.
  • Tests:
    • Adds tests in openai.spec.ts for thinking mode in streaming/non-streaming modes.

This description was created by Ellipsis for ab9a4e3. You can customize this summary. It will automatically update as commits are pushed.

- Add openAiThinkingModeEnabled setting to provider-settings.ts schema
- Add thinking parameter handling in openai.ts handler for both streaming and non-streaming modes
- Create ThinkingModeSetting.tsx UI component
- Integrate ThinkingModeSetting into OpenAICompatible.tsx settings
- Add translations for the new setting to all 18 locale files
- Add comprehensive tests for the new thinking mode feature

Fixes #10603
@roomote
Copy link
Contributor Author

roomote bot commented Jan 11, 2026

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

The implementation is clean and follows existing patterns:

  • Schema change properly extends openAiSchema with openAiThinkingModeEnabled
  • Handler correctly applies thinking parameter in both streaming and non-streaming modes
  • UI component follows the existing R1FormatSetting pattern
  • Test coverage for enabled/disabled/undefined states
  • All 18 locale files updated with translations

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jan 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[BUG] kimi k2 thinking is not working on OpenAi compatible

3 participants