mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4036] [Engine] Responses rejects the documented -1 and 0 output-token limits #1743
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#1743
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 @Jackmeson1 on GitHub (Oct 25, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4036
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
/v1/responsesreturns HTTP 400 formax_output_tokens: 0andmax_output_tokens: -1, with"max_output_tokens must be a positive whole number". The integer controlmax_output_tokens: 2succeeds.docs/DETAILS.md:1072-1073says thatmax_tokens,max_completion_tokens, andmax_output_tokensof-1or0mean "no cap": the answer may use the room left in the context. In my comparison requests, chatmax_tokens: 0and-1both allowed the 81-token answer to finish.Expected:
/v1/responsesaccepts the documented-1and0sentinel values and applies no additional output-token cap, subject to the remaining context.Commit
5c8dd32restored these sentinel values in the server's common validation and documentation. It removedcheck_max_tokens, which named all three fields, but did not change the separate rejection of values below 1 inserve/responses.py:445-447. That check runs throughserve/server.py:7319.Smallest steps or command that reproduce it
The same build and config as in #4035 (commit
7dd5cf18). Server:Client:
These cases are a subset of a larger client I ran; the log lines below are excerpts from that run, unchanged.
Reproduction status
Reproduced locally
Strata version
Commit
7dd5cf18e6(main), engine 0.1.49.2Graphics card, memory and system
NVIDIA RTX PRO 6000 Blackwell Server Edition 97,887 MiB · 176 GiB RAM · Ubuntu 24.04.4 LTS (Linux 6.6.122+, Google Colab), driver 580.82.07, CUDA 13.0.88, GCC 13.3.0, Python 3.13.16, AMD EPYC 9B45 (48 logical CPUs)
Model, size and settings
Qwen3.8-Flash-Next GSQ-RCO Q2_0 · 4096 context · INT8 KV · the config in #4035
Logs
Excerpts from my run, 2026-10-25:
Not checked in this run: streaming requests,
max_completion_tokens: 0/-1, or Messagesmax_tokens: 0/-1.@Niko1221 commented on GitHub (Oct 27, 2026):
Thank you. Fixed in 0.2.7: /v1/responses accepts max_output_tokens of 0 and -1.
Release: https://github.com/Niko1221/Strata/releases/tag/v0.2.7