Skip to content

fix(openai-compatible): add max reasoning effort option - #1051

Open
ivanarifin wants to merge 1 commit into
Zoo-Code-Org:mainfrom
ivanarifin:fix/882-openai-compatible-max-reasoning-effort
Open

fix(openai-compatible): add max reasoning effort option#1051
ivanarifin wants to merge 1 commit into
Zoo-Code-Org:mainfrom
ivanarifin:fix/882-openai-compatible-max-reasoning-effort

Conversation

@ivanarifin

@ivanarifin ivanarifin commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a UI compatibility option for OpenAI-compatible providers to set maximum reasoning effort.
  • Persists the selected value and forwards it to compatible API requests.

Focused tests

  • cd src && npx vitest run api/providers/__tests__/openai.spec.ts — 1 file / 64 tests passed.
  • cd webview-ui && npx vitest run src/components/settings/providers/__tests__/OpenAICompatible.spec.tsx — 1 file / 11 tests passed.

Closes: #882

Summary by CodeRabbit

  • New Features

    • Added support for the “max” reasoning effort option in OpenAI-compatible provider settings.
    • Selected “max” reasoning effort is now preserved when configuring supported models.
  • Tests

    • Added coverage confirming the “max” option appears in settings and is passed through correctly.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 99c18747-3982-4bd4-889e-1d341c71e25a

📥 Commits

Reviewing files that changed from the base of the PR and between dcaa3cb and 1952be8.

📒 Files selected for processing (3)
  • src/api/providers/__tests__/openai.spec.ts
  • webview-ui/src/components/settings/providers/OpenAICompatible.tsx
  • webview-ui/src/components/settings/providers/__tests__/OpenAICompatible.spec.tsx

📝 Walkthrough

Walkthrough

The OpenAI-compatible settings now supports the extended max reasoning effort value, persists selections using the extended type, and verifies that max reaches the underlying OpenAI-compatible request.

Changes

OpenAI-compatible reasoning effort

Layer / File(s) Summary
UI reasoning effort support
webview-ui/src/components/settings/providers/OpenAICompatible.tsx, webview-ui/src/components/settings/providers/__tests__/OpenAICompatible.spec.tsx
Uses ReasoningEffortExtended, exposes max to ThinkingBudget, and tests persistence of a selected max value.
Request passthrough validation
src/api/providers/__tests__/openai.spec.ts
Verifies reasoning_effort: "max" is passed to the OpenAI-compatible completion request.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: awaiting-review

Suggested reviewers: taltas

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: adding max reasoning effort support for OpenAI-compatible providers.
Description check ✅ Passed The description includes the linked issue and test results, though it does not follow the repository template headings exactly.
Linked Issues check ✅ Passed The changes add max thinking mode support in the OpenAI-compatible path and tests cover the new value, matching issue #882.
Out of Scope Changes check ✅ Passed The diff stays focused on reasoning-effort support and related tests without unrelated code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions github-actions Bot added the awaiting-review PR changes are ready and waiting for maintainer re-review label Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-review PR changes are ready and waiting for maintainer re-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] add xhigh and max thinking mode to OpenRouter

1 participant