Repository navigation
Closed
Description
Summary
Unsloth Studio hides the Thinking control for models connected through an external Ollama provider, and the Ollama OpenAI-compatible proxy does not receive the user's reasoning selection.
This means a reasoning-capable Ollama model can use its default thinking mode with no way to disable or adjust it in Studio. For short prompts, this can cause a large and unnecessary latency increase.
Environment
- Unsloth Studio:
2026.8.19 - Ollama:
0.32.4 - Provider: Ollama connection using
http://127.0.0.1:11434/v1 - Reproduced model:
thinkingcap-27b-bottlecap:latest - Host: Linux x86_64, AMD ROCm
Steps to reproduce
- Add an Ollama connection in Unsloth Studio with the OpenAI-compatible base URL
http://127.0.0.1:11434/v1. - Select
thinkingcap-27b-bottlecap:latest. - Open a new chat.
- Observe that no Thinking control is available.
- Send a very short prompt.
- Inspect the Studio logs or the request sent to Ollama.
Actual behavior
getExternalReasoningCapabilities()does not advertise reasoning support for theollamaprovider, so Studio hides its existing Thinking control.ExternalProviderClient.stream_chat_completion()does not add Ollama'sreasoning_effortparameter to the outbound OpenAI-compatible request.- Ollama therefore uses the model's default thinking behavior.
- In the reproduced case, a trivial prompt took
89.42 sthrough Studio.
Expected behavior
- Allow an Ollama connection or model to advertise reasoning support.
- Show the existing Thinking control, or an effort selector, for reasoning-capable Ollama models.
- Forward the selection to Ollama's OpenAI-compatible endpoint:
- Thinking off ->
reasoning_effort: "none" - Thinking on -> a supported non-
noneeffort (low,medium, orhigh), or the effort selected by the user
- Thinking off ->
- Persist the choice using Studio's existing chat settings behavior.
- Do not change behavior for Ollama connections or models that are not marked as reasoning-capable.
Verified API behavior
Against the same Ollama server and model, a direct request to /v1/chat/completions with:
{
"reasoning_effort": "none"
}completed in 4.36 s, returned OK, and produced no reasoning text.
Ollama documents reasoning_effort values high, medium, low, and none for its OpenAI-compatible /v1/chat/completions endpoint:
Suggested implementation
- Add an Ollama reasoning capability at the connection/model capability layer, similar to the existing reasoning-model handling for other external providers. A connection-level capability is preferable to hardcoding individual Ollama model names.
- In
studio/backend/core/inference/external_provider.py, map Studio's reasoning setting to Ollama'sreasoning_effortfield. - Add frontend capability-resolver tests and backend outbound-payload tests for both Thinking off and on.
Relevant current files:
studio/frontend/src/features/chat/provider-capabilities.tsstudio/backend/core/inference/external_provider.py
Metadata
Metadata
Assignees
Labels
No labels
Activity
route thinking controls to ollama
route thinking controls to ollama
Studio: stop a small context window ending a tool-using turn with not…
lonexreb commentedon Aug 31, 2026
Claiming this — following on from the Ollama inventory work in #9237/#9988.
Plan, matching the shape you laid out: (1) advertise reasoning support for the
ollamaprovider ingetExternalReasoningCapabilities()so the existing Thinking control shows; (2) forward the selection on the outbound OpenAI-compatible request asreasoning_effort(off → "none", on → the chosen effort) inExternalProviderClient. Will check how per-model gating works for other external providers first — a blanket per-connection advertisement vs. model-level detection is the one design question; I'll keep whichever contract the other providers already follow.lonexreb commentedon Sep 16, 2026
This was closed on Sep 15 without a linked fix. As of main today
getExternalReasoningCapabilitiesstill has no Ollama branch, so_apply_ollama_reasoning_controlsstays unreachable from the UI (Daniel confirmed the same on #10043 on Sep 14). #10043 is the PR for this, model-scoped off/api/tagscapabilities as requested, freshly merged with main and green. If the close was intentional I'll leave it; otherwise it can stay closed and the PR will reference it on merge.Chat: show the Thinking control for Ollama models that report the thi…