Repository navigation
server: model discovery reports the model's reasoning efforts - #819
Conversation
A /v1/models entry for a model whose template has a thinking switch, names effort levels or has a think close token adds an OpenRouter-style reasoning: default_enabled, default_effort when the server was started with one, and supported_efforts from the template's own levels. Init reads the thinking switch with the levels, so discovery does not read the template per request.
Recall (off unless asked for), model discovery's reasoning efforts (#819), the NVFP4 prompt entries' skip (#764) and Nemotron's CUDA decode router, top-k and add_moe_norm (#833), gated on the candidate before Living Weights' key, snapshot and rollback. Two conflicts: the CHANGELOG's Unreleased list, where both sides' lines are kept in landing order, and the server main's imports, where all four are kept.
@kelchm's #819 and @SvangenStudios's share of #642 land in 1.0.12.
|
Thank you, @kelchm. An effort picker that comes from the server is the right fix for a table that goes stale on every model swap, and it changes nothing a reply carries. It ships in TensorFold 1.0.12 under your name ( Your four discovery tests and every model-list golden pass on macOS and Linux. Served, We kept the OpenRouter names as you wrote them. If a client you use needs other names beside them, an issue with an example request would help us test it. Posted by Ash's AI Assistant Synthena |
A coding agent's effort picker can come from the server. A model whose template switches thinking, names effort levels or has a </think> token carries an OpenRouter-style `reasoning`: default_enabled, default_effort when the server was started with --reasoning-effort (in the template's names), and supported_efforts, the levels its template names highest first, then none when the template switches thinking. On the Spark's checkpoints Qwen3.8 Flash Next lists xhigh, medium, low and none and GLM-5.3 Flash max, high and low, as upstream TensorFold 1.0.12 (ashhart#819) reports. The template is read once, at startup. No reply changes. Tests: tests/test_models_reasoning.py. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The contributor's commit landed above with the same code; this keeps the PR's head in the history with no change to the tree.
…date Recall (off unless asked for), model discovery's reasoning efforts (ashhart#819), the NVFP4 prompt entries' skip (ashhart#764) and Nemotron's CUDA decode router, top-k and add_moe_norm (ashhart#833), gated on the candidate before Living Weights' key, snapshot and rollback. Two conflicts: the CHANGELOG's Unreleased list, where both sides' lines are kept in landing order, and the server main's imports, where all four are kept.
@kelchm's ashhart#819 and @SvangenStudios's share of ashhart#642 land in 1.0.12.
What this changes
Following #480 and #483,
GET /v1/modelsnow also tells a client which reasoning efforts the model takes, so a coding agent can offer the right effort choices without a per-model table.Why: I point a coding agent at a TensorFold server whose model changes, and its effort picker has to come from a hand-kept table that goes stale with every swap. The levels can't be guessed from outside: Qwen3.8's template takes
xhigh,mediumandlow, GLM-5.3's takesmax,highandlow, and other values are rounded to the nearest, so a picker offering seven levels is really offering three or four. The server already knows which.Each entry for a model that thinks gains an OpenRouter-style
reasoningobject:{ "id": "Qwen3.8-Flash-Next", "object": "model", ... "context_length": 1048576, "max_model_len": 1048576, "reasoning": { "default_enabled": true, "supported_efforts": ["xhigh", "medium", "low", "none"] } }default_enabled: thinking is on unless the server was started with--no-thinking.default_effort: the--reasoning-effortlevel, and left out when there is none, so the template picks.supported_efforts: the levels the template names, highest first, plusnonewhen it has a thinking switch.These describe chat and Responses requests. A request's own
chat_template_kwargs.enable_thinkingstill wins over its effort, as it does today.The change is in
status_routes.zig, plus one field inServerso init reads the thinking switch with the effort levels and discovery never reads the template. It adds four tests and a README paragraph, and updates the model-list goldens, whose bodies and lengths change as they did in #483.Codex-style clients read
supported_reasoning_levels. Would you rather I use those names, or add them alongside? I left input modalities for #565.Receipt
c126fe16plus this commit. Host tests ran on an Apple M5 Max, macOS 26.5. The live check ran on two DGX Sparks, CUDA, Qwen3.8-Flash-Next NVFP4, through the MiaAI-Lab two-Spark kit, which builds the engine atdb281878.reasoning_effortandenable_thinkingas/v1/modelsadvertised.tools/bench_openai.py. 61.6 tok/s against 61.2 to 62.6 at one stream, and 312.5 against 313 to 317 at sixteen.zig build test -Dcpu=apple_m1, 1170 passed, 0 failed, 8 skipped.zig build test-golden, 309 of 319 equal and 0 unexpected, as onmain.tools/zig/lean_check.py, 538, as onmain.main, sincemaindoes not serve two CUDA ranks yet. The Python server is frozen and unchanged.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo.