Inference
Reasoning
Use reasoning_effort and read reasoning traces when models support them.
Updated
Models that advertise reasoning can expose the model’s thinking trace as
reasoning_content on the assistant message. LLMBase also includes a
compatibility alias named reasoning when returned by the selected model.
Use reasoning_effort for portable effort control when the selected model lists
that parameter in supported_parameters.
Effort control
{
"model": "<model-id-from-/v1/models>",
"messages": [
{ "role": "user", "content": "Compare these two migration plans." }
],
"reasoning_effort": "high"
}
Effort values are model-dependent, so check metadata before requiring a value in
production. When present, supported_reasoning_efforts lists the model-native
values; use one of those values instead of carrying assumptions from another
model family.
For compatibility with OpenAI-compatible agents, medium is also accepted when
the selected model publishes high but does not provide a native medium tier.
LLMBase uses high for that request. Models with native medium support keep
the native value unchanged.
Thinking flags
Some model families also expose thinking through chat template flags. The
portable flags below are supported through extra_body.chat_template_kwargs
when advertised by the selected model:
{
"model": "<model-id-from-/v1/models>",
"messages": [
{ "role": "user", "content": "Solve 17 * 23 and show the final answer." }
],
"extra_body": {
"chat_template_kwargs": {
"enable_thinking": true,
"thinking": true,
"preserve_thinking": true
}
}
}
Response shape
Typical non-streaming responses include the final answer in content and the
reasoning trace separately:
{
"choices": [
{
"message": {
"role": "assistant",
"content": "17 * 23 = 391.",
"reasoning_content": "Compute 17 * 20 = 340 and 17 * 3 = 51, then add them.",
"reasoning": "Compute 17 * 20 = 340 and 17 * 3 = 51, then add them."
}
}
]
}
Reasoning support is model-dependent. If your request depends on reasoning,
choose a model whose metadata includes supported_features: ["reasoning"] and
supported_parameters containing reasoning_effort. If the model includes
supported_reasoning_efforts, prefer one of those values.