Tresor standardizes reasoning behind a single request field:
{
"reasoning": {
"enabled": true,
"effort": "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: the canonical control. Use an effort value from Tresor's public ladder: off, minimal, low, medium, high, xhigh, or maxreasoning.enabled: optional shorthand for clients that only need on/off behavior. true means "pick a reasonable positive effort" and false means "request off"include_reasoning is intentionally separate from reasoning.enabled:
reasoning.enabled=false 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, prefer reasoning.effort over reasoning.enabled.
reasoning, Tresor uses the route's published default_effortreasoning.enabled=false resolves to off 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.2'
The tresor.reasoning block reports:
supported_effortsdefault_effortExample:
{
"id": "global/nearai/glm-5.2",
"tresor": {
"model_key": "glm-5.2",
"provider": "nearai",
"region": "global",
"type": "chat",
"reasoning": {
"supported_efforts": ["off", "low", "medium", "high"],
"default_effort": "off"
}
}
}
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 supports discrete effort levels and another only supports a boolean thinking toggle.
This 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="auto/auto/gpt-oss-120b",
messages=[{"role": "user", "content": "Work through the proof carefully."}],
extra_body={
"reasoning": {
"enabled": True,
"effort": "high",
}
},
)