Repository navigation
route thinking controls to ollama - #9770
Conversation
Ollama connections had no reasoning capability, so Studio hid Thinking and never sent reasoning_effort. A reasoning model then kept its default thinking with no way to turn it off (unslothai#9649). Flag the connection as a reasoning model to show Thinking, then map off/on onto Ollama's OpenAI-compat reasoning_effort field.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 46e3eb2d34
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Ollama connections can serve mixed catalogs, so the reasoning-model toggle now stores which model ids support thinking. Unmarked models no longer advertise Thinking or send reasoning_effort. Deep Research serializes reasoningEffort "none" when Thinking is off so Ollama does not fall back to the model's default.
Repair report
Before
The two existing Codex findings were also rechecked. The PR author's latest commit had already scoped reasoning to marked Ollama model IDs and serialized After
Post-push review fixes
Verification
UI evidenceTwo isolated Studio installs were built from merge base
Regression risk and compatibility
VerdictThe confirmed conflicts and defects are fixed on |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Scope correction: frontend UI removedCommit Why the UI was removedThe defect is in outbound request routing. The chat API already accepts A provider-dialog toggle and per-model pin list are unnecessary for that transport fix. They required users to maintain capability metadata for every Ollama model, then added browser persistence, model-sync pruning, migration behavior, case-insensitive matching, and provider-switch resets around that manual state. None of those paths are needed to route an explicit API control. They also made the frontend responsible for model capability data that can vary by Ollama version and model. What remains
What was removed
The PR now changes only:
Focused verification
GitHub verification
The full fork matrix also exposed two current- This leaves the API contract small: callers choose the thinking control, and the provider client routes it to Ollama without adding frontend configuration state. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
mahiatlinux
left a comment
There was a problem hiding this comment.
All reviewed and fixed, LGTM. CI results

Summary
Addresses the Ollama API routing portion of #9649.
ExternalProviderClient.stream_chat_completion()now maps the existingenable_thinkingandreasoning_effortrequest fields onto Ollama's OpenAI-compatiblereasoning_effortfield. Requests without either control remain unchanged.This PR does not add Studio UI, provider capability flags, or persisted per-model reasoning state.
Behavior
enable_thinking: falsesendsreasoning_effort: "none".enable_thinking: truewithout an effort sendsreasoning_effort: "medium".none,low,medium,high, ormaxis forwarded.minimalmaps tolow;xhighmaps tomax.Verification
studio/backend/tests/test_ollama_reasoning_effort.py:11 passedwith warnings treated as errors.