Skip to content

API: Add max as valid value for top-level think parameter #15831

Description

@g0st1n

Summary

Currently, the top-level think parameter in API requests accepts true, false, low, medium, and high (per docs). However, there is no max level, which limits the ability to request the maximum reasoning effort from thinking-capable models.

This is particularly problematic for downstream clients that need to pass reasoning levels through a standardized API field.

Evidence

Test 1 — top-level think: "max" with Ollama Cloud (deepseek-v4-flash:cloud):

curl -X POST "http://localhost:11434/api/chat" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-flash:cloud",
    "messages": [{"role": "user", "content": "hi"}],
    "stream": false,
    "think": "max"
  }'

Result:{"error":"invalid think value: \"max\" (must be \"high\", \"medium\", \"low\", true, or false)"}

Test 2 — options.think: "max" with Ollama Cloud (deepseek-v4-flash:cloud):

curl -X POST "http://localhost:11434/api/chat" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-flash:cloud",
    "messages": [{"role": "user", "content": "hi"}],
    "stream": false,
    "options": {"think": "max"}
  }'

Result: ✅ Returns thinking content successfully. The response includes a full thinking trace and final content.

Key finding

The max value is only accepted inside options.think, not at the top level. This creates an API inconsistency:

  • The top-level think field is the documented and standardized way to control reasoning
  • Downstream tools rely on think: false at the top level to disable thinking reliably
  • Moving the parameter into options.think breaks the semantic contract for clients that need to toggle thinking on/off via a single field
  • Some models (like GPT-OSS) already use low/medium/high levels at the top level — adding max completes the spectrum and unifies the API

Proposed behavior

Extend the valid values for the top-level think parameter:

"think": true | false | "low" | "medium" | "high" | "max"

Where max requests the highest available reasoning effort from the model, beyond high.

Impact

  • Ollama Cloud already accepts options: {"think": "max"} — formalizing max at the top level would unify the API between local and cloud
  • Downstream clients could expose max reasoning without workarounds or unsafe mappings (maxhigh)
  • Users get access to the full reasoning capability of models like DeepSeek-v4-flash through the standardized top-level field

Related

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