Saltar al contenido principal
To simplify how different model providers (OpenAI, Anthropic, Google, DeepSeek, etc.) handle reasoning/thinking, AIHubMix now supports a unified reasoning parameter specification. Developers can use one standard interface to control a model’s thinking effort and retrieve detailed reasoning traces, covering thinking on/off and intensity for Claude, Gemini, GLM-5, Minimax, and more.

Unified Parameter Definition

Enabling Thinking via reasoning

reasoning can be set in the following ways:
reasoning_effort accepts the following values:
  • none (recommended): explicitly disable thinking (may not take effect on some forced-thinking models such as minimax-m2.7)
  • minimal: minimize thinking; on some models this disables thinking entirely
  • low (recommended)
  • medium (recommended)
  • high (recommended)
  • xhigh
For models that allow setting thinking intensity, reasoning_effort maps as follows: For models that only support a thinking budget, reasoning_effort is computed as a ratio of MaxOutputTokens:
  • “xhigh”: 0.95,
  • “high”: 0.8,
  • “medium”: 0.5,
  • “low”: 0.2,
  • “minimal”: 0.1,
For models/providers that only support a binary thinking toggle (e.g. DeepSeek, Qwen, GLM, Kimi), reasoning_effort has only two effects:
  • none: disable thinking
  • any other value: enable thinking

(Alternative) Use the effort field inside reasoning:

(Alternative) Use the max_tokens field inside reasoning to precisely cap thinking tokens:

Thinking Response

Thinking results add two fields:
  • reasoning_content: the thinking content as a string.
  • reasoning_details: raw thinking metadata for multi-turn conversations; preserving it improves model quality. The shape is an object — apart from type (fixed), other properties vary per model but are all strings.
Non-streaming response example:
Streaming response example:

Multi-turn Conversations

To preserve thinking content across multiple turns, pass reasoning_details straight through to the next turn — this helps the model reason more thoroughly after receiving tool-call results. For streaming responses, concatenate the non-type fields of consecutive reasoning_details chunks with the same type, then re-attach the type field before passing to the next turn.

Non-streaming Reference Example

Reference code
Reference output

Streaming Reference Example

Reference code
Reference output

Última actualización: 2026-06-01