Tresor standardizes reasoning behind a single request field. The preferred form is a plain effort string:
{
"reasoning": "high"
}
Use this with any chat route. Tresor translates it to the provider-native contract for the route that actually serves the request.
If you want the model to keep reasoning internally but do not want the reasoning text returned, add the separate top-level flag "include_reasoning": false to the chat completion request.
reasoning: "<effort>": use a value from Tresor's public ladder: off, minimal, low, medium, high, xhigh, or maxinclude_reasoning is intentionally separate from requested reasoning effort:
reasoning: "off" asks the provider route to disable reasoning generation when that route supports itinclude_reasoning=false leaves reasoning generation/routing unchanged and only suppresses returned reasoning textSupported effort values are still route-dependent. Tresor accepts none as a compatibility alias for off, but published route metadata uses the canonical off spelling.
If you already know which reasoning level you want, send reasoning as a plain string.
reasoning, Tresor uses the route's published default_effortreasoning: "off" requests the canonical off mode when the route advertises off in supported_effortsUse GET /v1/models?detail=true to inspect the reasoning contract for each route.
curl 'https://api.tresor.co/v1/models?detail=true&model_key=glm-5.3-flash'
The tresor.reasoning block reports:
supported_effortsdefault_effortExample:
{
"id": "global/nearai/glm-5.3-flash",
"tresor": {
"model_key": "glm-5.3-flash",
"provider": "nearai",
"region": "global",
"type": "chat",
"reasoning": {
"supported_efforts": ["off", "low", "high", "max"],
"default_effort": "low"
}
}
}
supported_efforts is the exact verified ladder for that concrete route. Use it as the source of truth for which effort values are valid there.
Tresor now returns reasoning text on the preferred reasoning fields:
choices[].message.reasoningchoices[].delta.reasoningreasoning_content remains as a compatibility alias until 2026-09-01 and will be removed after that date.
Reasoning support is checked per route, not per logical model.
400 invalid_request_errorThis is especially relevant for multi-provider logical models where one route may verify off|low|medium|high and another only low|medium|high.
from openai import OpenAI
client = OpenAI(base_url="https://api.tresor.co/v1", api_key="tr-...")
resp = client.chat.completions.create(
model="gpt-oss-120b",
messages=[{"role": "user", "content": "Work through the proof carefully."}],
extra_body={
"reasoning": "high"
},
)