Skip to content

fix(openai_api_compatible): forward reasoning_effort without thinking toggle - #3832

Closed
Souravrajvi0 wants to merge 4 commits into
langgenius:mainfrom
Souravrajvi0:feat/fix-reasoning-effort-gate-87bf
Closed

Souravrajvi0 wants to merge 4 commits into
langgenius:mainfrom
Souravrajvi0:feat/fix-reasoning-effort-gate-87bf

Conversation

@Souravrajvi0

@Souravrajvi0 Souravrajvi0 commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #3827.

The Chat Completions path popped reasoning_effort from model parameters but only re-added it when enable_thinking was explicitly true. In the default "Both Modes" configuration (thinking toggle off), the standard OpenAI parameter was silently dropped from outgoing requests.

This change forwards the top-level reasoning_effort whenever thinking is not forced off (enable_thinking_value is not False), matching the Responses API path and the issue's suggested fix. The non-standard chat_template_kwargs mirror remains gated on extended compatibility mode and an explicit thinking toggle.

Bump plugin version to 0.0.66.

Release Notes

  • Fix Chat Completions requests dropping the standard reasoning_effort parameter when the thinking toggle is off in "Both Modes".
  • Forward reasoning_effort whenever thinking is not explicitly forced off, matching the Responses API behavior.
  • Keep the extended chat_template_kwargs mirror gated on extended compatibility mode and an explicit thinking toggle.

Change Type

  • Documentation / non-plugin change
  • Non-LLM plugin (tools, extensions, datasource, etc.)
  • LLM plugin

Test plan

  • Added test_reasoning_effort_forwarding.py covering:
    • default "Both Modes" with thinking toggle off forwards reasoning_effort
    • thinking toggle on still forwards reasoning_effort
    • thinking forced off (not_supported) still drops reasoning_effort
    • thinking forced on (only_thinking_supported) forwards reasoning_effort
    • extended mode mirrors to chat_template_kwargs only when thinking is explicitly enabled
  • uv run pytest tests/test_reasoning_effort_forwarding.py -v passes (6/6)
  • After merging main, local tests on the updated branch pass

… toggle

The Chat Completions path only re-added reasoning_effort when enable_thinking
was explicitly true, so the standard OpenAI parameter was silently dropped in
the default "Both Modes" configuration. Forward the top-level parameter
whenever thinking is not forced off, while keeping the chat_template_kwargs
mirror gated on extended mode and an explicit thinking toggle.

Fixes langgenius#3827
Mairuis
Mairuis previously approved these changes Sep 7, 2026
@Mairuis
Mairuis had a problem deploying to models/openai_api_compatible September 7, 2026 09:24 — with GitHub Actions Failure
@Mairuis

Mairuis commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Please fix CI errors. @Souravrajvi0

@Souravrajvi0

Copy link
Copy Markdown
Contributor Author

@Mairuis CI was failing at Check Release Notes. I added a ## Release Notes section, merged main, bumped the plugin version to 0.0.66 (since 0.0.65 was already on main), and pushed the update. Please rerun the checks if they do not start automatically.

…ging main

Main already shipped 0.0.65, so this release needs the next version for
the reasoning_effort forwarding fix.
@crazywoola

Copy link
Copy Markdown
Member

Thank you for your contribution, @Souravrajvi0! This PR currently has merge conflicts with main, so we are closing it for now. Please update your branch against the latest main and resolve the conflicts — note that the consolidated dependency refresh (#4106–#4111) has bumped plugin manifest.yaml versions on main, so please bump models/openai_api_compatible/manifest.yaml to the next unused version when you rebase. You are welcome to open a new PR with the updated changes and link back to this one. We appreciate your time and effort!

If these changes are still wanted, they can be folded into #3869 when you update it.

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.

openai_api_compatible: reasoning_effort is silently dropped unless thinking mode is toggled on

3 participants