Skip to content

Studio: expose Thinking controls for Ollama connections and forward reasoning_effort #9649

Closed

Description

@lusmo

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

  1. Add an Ollama connection in Unsloth Studio with the OpenAI-compatible base URL http://127.0.0.1:11434/v1.
  2. Select thinkingcap-27b-bottlecap:latest.
  3. Open a new chat.
  4. Observe that no Thinking control is available.
  5. Send a very short prompt.
  6. Inspect the Studio logs or the request sent to Ollama.

Actual behavior

  • getExternalReasoningCapabilities() does not advertise reasoning support for the ollama provider, so Studio hides its existing Thinking control.
  • ExternalProviderClient.stream_chat_completion() does not add Ollama's reasoning_effort parameter 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 s through 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-none effort (low, medium, or high), or the effort selected by the user
  • 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:

https://docs.ollama.com/api/openai-compatibility

Suggested implementation

  1. 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.
  2. In studio/backend/core/inference/external_provider.py, map Studio's reasoning setting to Ollama's reasoning_effort field.
  3. 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.ts
  • studio/backend/core/inference/external_provider.py

Activity

  1. added a commit that references this issue on Aug 27, 2026
  2. lonexreb commented on Aug 31, 2026

    @lonexreb
    Contributor

    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 ollama provider in getExternalReasoningCapabilities() so the existing Thinking control shows; (2) forward the selection on the outbound OpenAI-compatible request as reasoning_effort (off → "none", on → the chosen effort) in ExternalProviderClient. 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.

  3. lonexreb commented on Sep 16, 2026

    @lonexreb
    Contributor

    This was closed on Sep 15 without a linked fix. As of main today getExternalReasoningCapabilities still has no Ollama branch, so _apply_ollama_reasoning_controls stays unreachable from the UI (Daniel confirmed the same on #10043 on Sep 14). #10043 is the PR for this, model-scoped off /api/tags capabilities 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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions