mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2141] [Engine] serve: thinking_budget_tokens (llama-server's name) is ignored, so llama.cpp clients get unbounded thinking #858
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#858
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @xrip on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2141
Area
[Engine] (speed, kernels, models, the server and API)
Desktop app, Terminal or source?
Source (START-HERE.bat, setup.sh or a build)
What happened
Strata's server ignores
thinking_budget_tokens, the name llama-server also accepts for a request's thinking budget. A client written for llama-server that sends it gets no thinking budget at all, and nothing in the log or the response says so.Expected: the same as llama-server, which reads
reasoning_budget_tokensand falls back tothinking_budget_tokens(tools/server/server-common.cpp):Actual:
Service.reasoning_budget()(serve/server.py) reads onlyreasoning_budget_tokens. Withthinking_budget_tokensalone the thinking is unbounded: it stops only atmax_tokensor at the end of the context.Re-test on 0.2.0-beta (
f57c0adc), 2026-10-19: still the case. The regression test from #2140 (serve/test_server.py::...::test_llama_cpp_thinking_budget_tokens_is_the_same_budget, the server's own stub engine) fails on 0.2.0-beta'sserve/server.py. A request withthinking_budget_tokens=20gets the whole thought back instead of a thought cut at 20 tokens with the wrap-up line. With #2140's change, the same test passes.Impact: any client that targets llama-server's API and relies on
thinking_budget_tokens. For example, the pi coding agent's llama.cpp provider (pi-llama-cpp) sends it with every request: 8,192 tokens at pi's defaultmediumlevel. What it cost on my box (first seen on 0.1.43, live; 2x CMP 50HX, Qwen3.8-Flash-Next IQ3_XXS):reserveTokens, 26,214 tokens here.prompt 109013 tokens = 109008 reused + 5 read ..., 26214 generated in ~250000 ms.Reproduce (a live server):
The
reasoning_contentruns far past 64 tokens. With"reasoning_budget_tokens": 64it is wrapped up at 64.Fix: #2140.
reasoning_budget()also readsthinking_budget_tokens, andreasoning_budget_tokenswins when both are set. It comes with a test.Reproduction status
Reproduced locally
Strata version
Strata 0.2.0-beta (
f57c0adc) · engine 0.1.45.3. First seen on 0.1.43.x.Graphics card, memory and system
2x NVIDIA CMP 50HX 20 GB · 64 GB RAM · Ubuntu 24.04.4. The bug is in
serve/server.py; the 0.2.0-beta re-test is the server's unit test (Windows 11, Python 3.14) and needs no GPU.Logs
@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.
@xrip commented on GitHub (Oct 19, 2026):
/reopen
@github-actions[bot] commented on GitHub (Oct 19, 2026):
Reopened, thank you. A maintainer will pick it up from here.