Reasoning
Some Mixlayer models support an extended thinking mode where the model produces an internal chain of thought before its visible answer. The reasoning is returned in a separate reasoning_content field on the assistant message — you can show it to users, log it for debugging, or just ignore it.
Enabling thinking
There are two equivalent ways to enable thinking on a request:
or, for OpenAI compatibility:
Both toggle the same underlying behavior. reasoning_effort is accepted as an alias and currently maps to a boolean enable/disable — the specific effort level is reserved for future use.
To explicitly disable thinking on a model that defaults to it, send thinking: false.
Reading reasoning_content
A non-streaming response with thinking enabled includes both fields on the assistant message:
content is the visible answer you’d typically show to the user. reasoning_content is the model’s chain of thought — useful for debugging, evaluation, or building “show your work” UI.
Mixlayer extracts reasoning from <think>...</think> tags in the model’s
raw output and routes it to reasoning_content automatically. You will
never see the tags in either field.
Examples
curl
Python
TypeScript
Rust
Streaming reasoning
When stream: true, reasoning arrives in delta.reasoning_content chunks alongside delta.content chunks. They interleave in the order the model produces them — typically reasoning first, then visible content.
To render reasoning and content in separate UI areas, route each delta based on which field is set:
Constraints
Thinking mode is incompatible with response_format: json_schema. The
gateway returns an error if both are set on the same request. If you need
structured output from a reasoning model, use response_format: json_object
with explicit instructions in the prompt instead.
Thinking is supported on the Qwen 3.5 family. See Models for the up-to-date list of supported models and their recommended sampling settings for thinking vs. non-thinking modes.