Skip to content

fix(custom): omit Ollama-only think=false on strict OpenAI-compat endpoints - #97984

Closed
xxxigm wants to merge 2 commits into
NousResearch:mainfrom
xxxigm:fix/custom-think-ollama-only
Closed

xxxigm wants to merge 2 commits into
NousResearch:mainfrom
xxxigm:fix/custom-think-ollama-only

Conversation

@xxxigm

@xxxigm xxxigm commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • scripts/run_tests.sh tests/plugins/model_providers/test_custom_profile.py tests/providers/test_transport_parity.py tests/agent/transports/test_chat_completions.py -q
  • Custom provider → https://api.mistral.ai/v1 + Reasoning Off → request succeeds (no think in the body)
  • Local Ollama http://127.0.0.1:11434/v1 + Reasoning Off → still sends think: false and reasoning_effort: "none"

xxxigm added 2 commits August 29, 2026 22:30
…points

reasoning_effort: none was injecting extra_body.think=false for every
custom provider. Mistral (and other extra=forbid hosts) reject that
field with HTTP 422. Keep think=false on Ollama URLs only; still send
top-level reasoning_effort=none so /v1 thinking-off keeps working.
Cover the Mistral extra_forbidden case and keep the Ollama dual-emission
contract (think=false + reasoning_effort=none) on port 11434 / ollama hosts.
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins provider/ollama Ollama / local models provider/openai OpenAI / Codex Responses API labels Aug 29, 2026
@kshitijk4poor

Copy link
Copy Markdown
Contributor

Merged via #98000 — your commits d02dd32 and 467cdd6 were cherry-picked onto current main with your authorship preserved, with two small follow-ups on top (a try/except ValueError guard for malformed ports in the URL heuristic, and test-input alignment). This also fixes #11237.

Right file (the profile plugin, where think is emitted post-refactor), right gate (only the field that 422s — reasoning_effort: "none" stays unconditional), 3-layer tests. Clean fix — thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have provider/ollama Ollama / local models provider/openai OpenAI / Codex Responses API type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants