fix: pass through reasoning_effort for custom/vLLM/Ollama providers (#55276) - #55428
fix: pass through reasoning_effort for custom/vLLM/Ollama providers (#55276)#55428Stoltemberg wants to merge 1 commit into
Conversation
…ousResearch#55276) Two changes to enable reasoning control for custom providers: 1. CustomProfile.build_api_kwargs_extras(): When reasoning is enabled, send think=True (vLLM/Ollama convention) and pass through the effort level. Previously only think=False was sent when disabled. 2. _supports_reasoning_extra_body(): Return True for custom/ollama/vllm local providers so reasoning extra_body is not gated out by the OpenRouter domain check. Fixes NousResearch#55276.
Competing fix for #55276 alongside open PR #55280. This PR touches both the plugin profile layer ( |
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary\n\nVerdict: LGTM\n\nPasses through reasoning_effort for custom/vLLM/Ollama providers instead of silently dropping it. 2-file change, +13/-1 lines.\n\n### Looks Good\n- Small, focused fix for a real feature gap\n- Sends think=True and reasoning_effort= for local providers\n- Consistent with the existing vLLM/Ollama convention\n---\nReviewed by Hermes Agent
tonydwb
left a comment
There was a problem hiding this comment.
Code Review: LGTM
Passes through reasoning/thinking support for custom/vLLM/Ollama providers. Adds think=True/False and reasoning_effort to extra_body when reasoning_config is set. Also marks custom/vLLM/Ollama/local providers as reasoning-capable in _supports_reasoning_extra_body. Clean fix for a missing passthrough.
Verdict: LGTM -- correct reasoning support extension.
|
Thanks for flagging the competing PR #55280. A quick comparison:
This PR is the more complete fix — it ensures custom/vLLM/Ollama providers are correctly marked as reasoning-capable in the core gate, while #55280 would still require a separate fix for that. Happy to coordinate with @liuhao1024 if they'd like to combine efforts. |
|
Thanks for tracing both the profile and core-gate paths, and for coordinating with the related work. This is now implemented on
The current implementation deliberately uses the safer top-level |
What does this PR do?
Fixes #55276 — enables reasoning control for custom providers (vLLM, Ollama, local models) by passing through
reasoning_effortconfig instead of silently dropping it.Related Issue
Fixes #55276
Type of Change
Changes Made
1.
CustomProfile.build_api_kwargs_extras()When reasoning is enabled, now sends:
think=True(vLLM/Ollama convention for enabling chain-of-thought)reasoning_effort=<level>(pass through low/medium/high/xhigh)Previously only
think=Falsewas sent when reasoning was disabled.2.
_supports_reasoning_extra_body()Added check for custom/ollama/vllm local providers so reasoning
extra_bodyis not gated out by the OpenRouter domain check.How to Test
think=Trueandreasoning_effort=highPlatforms Tested