Reasoning models
Models that reason before they answer, and how to read or turn off that reasoning.
Every BlazeInfer chat model can reason ("think") before it answers. When a model reasons, that text comes back in a separate field, not mixed into the answer.
Field name can differ between models
Models return reasoning under one of two keys: reasoning_content or
reasoning. The table below shows which one each model uses. In your code,
check both.
Reasoning counts towards max_tokens. If reasoning uses up the budget, the
reply's content is empty or null, with finish_reason: "length". Raise
max_tokens, or turn reasoning off.
Streaming shows reasoning in the same delta object as the content:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://blaze.e2enetworks.net/v1",
api_key=os.environ["BLAZE_API_KEY"],
)
stream = client.chat.completions.create(
model="qwen/qwen3.8-27b",
messages=[{"role": "user", "content": "How many r's are in strawberry?"}],
stream=True,
)
for chunk in stream:
if not chunk.choices: # the final chunk only carries usage
continue
delta = chunk.choices[0].delta
reasoning = getattr(delta, "reasoning_content", None) or getattr(
delta, "reasoning", None
)
if reasoning:
print(reasoning, end="", flush=True)
elif delta.content:
print(delta.content, end="", flush=True)Turning reasoning on and off
| Model | Reasoning field | On by default? | How to switch |
|---|---|---|---|
deepseek-ai/deepseek-v4.1-flash | reasoning | On | Off: reasoning_effort: "none", or chat_template_kwargs: {"enable_thinking": false}. Depth: see Reasoning effort |
zai-org/glm-5.3-flash | reasoning_content | On | Off: chat_template_kwargs: {"enable_thinking": false} |
In the OpenAI Python SDK, send chat_template_kwargs through extra_body, for
example extra_body={"chat_template_kwargs": {"enable_thinking": False}}.
Reasoning effort
reasoning_effort sets how hard a model thinks before it answers: more effort
means more reasoning tokens, longer replies and higher cost. Send it as a
top-level field, as in the OpenAI API:
resp = client.chat.completions.create(
model="deepseek-ai/deepseek-v4.1-flash",
messages=[{"role": "user", "content": "Find the number of ordered pairs ..."}],
reasoning_effort="max",
)If your SDK only accepts low, medium and high, send other values through
extra_body={"reasoning_effort": "max"}.
DeepSeek V4.1 Flash
DeepSeek has its own effort levels. BlazeInfer accepts the OpenAI names too, so standard clients work unchanged:
| You send | DeepSeek runs at | Effect |
|---|---|---|
none | none | No reasoning field. The model still works through the problem, in the visible answer |
minimal | low | Same as low |
low | low | About the same depth as high |
medium | high | DeepSeek has no medium; BlazeInfer maps it to high |
high (or nothing) | high | The default |
xhigh | xhigh | About the same depth as high |
max | max | Thinks about 1.7-2.4x longer than high, so replies take about twice as long |
For a finer setting, send a number from 1 to 100 in chat_template_kwargs:
extra_body={"chat_template_kwargs": {"reasoning_effort": 80}}. A number is
rejected as a top-level reasoning_effort.
In practice there are three useful settings: none to switch thinking off,
high (the default) for most work, and max for hard problems where you are
willing to wait. On competition maths problems low, high and max were all
accurate; max spent its extra time checking its work.
To pick these levels in OpenCode, see Reasoning effort in OpenCode.
Why it matters for agents
Coding agents send earlier assistant messages back on later turns, often with their reasoning. BlazeInfer accepts earlier reasoning in either field. The field name still differs between models, so the OpenCode, Kilo Code and Pi pages set reasoning options for each model.