Repository navigation
Server: a greedy-only engine's sampled request is refused before admission - #582
Merged
Merged
Conversation
…ssion The native GLM engine decodes greedily only and refused a request with a temperature from its backend, after the server had admitted it: a 500, or an error inside an already-open stream. Info.greedy_only lets the server refuse it while preparing, as a 400 before any stream opens.
Closed
Owner
|
Thank you, @BobClawblaw. This is in main as a0893ed, merged as it was, so a sampled request to GLM-5.3-Flash gets its 400 before it waits its turn. Our follow-up 58c45ee does two more things:
Serving such requests greedily instead stays out, as you suggested, since it changes what a request asks for. It ships in the next release. Thanks again! |
BobClawblaw
pushed a commit
to BobClawblaw/TensorFold
that referenced
this pull request
Oct 10, 2026
…l names --temperature 0 when the server samples by default Flash Next decodes greedily only and refused a temperature after admission, as GLM did before ashhart#582; its Info now sets greedy_only. A greedy-only server whose generation_config samples by default refuses a request that leaves the temperature out, so that refusal says to send temperature 0 or serve with --temperature 0.
BobClawblaw
pushed a commit
to BobClawblaw/TensorFold
that referenced
this pull request
Oct 10, 2026
… and ashhart#576's line in the file's style
BlivionIaG
pushed a commit
to BlivionIaG/TensorFold
that referenced
this pull request
Oct 20, 2026
…before admission
BlivionIaG
pushed a commit
to BlivionIaG/TensorFold
that referenced
this pull request
Oct 20, 2026
…l names --temperature 0 when the server samples by default Flash Next decodes greedily only and refused a temperature after admission, as GLM did before ashhart#582; its Info now sets greedy_only. A greedy-only server whose generation_config samples by default refuses a request that leaves the temperature out, so that refusal says to send temperature 0 or serve with --temperature 0.
BlivionIaG
pushed a commit
to BlivionIaG/TensorFold
that referenced
this pull request
Oct 20, 2026
… and ashhart#576's line in the file's style
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The native GLM-5.3-Flash engine decodes greedily only. It refuses a request with
temperature > 0frombackend.prefill(error.GreedyOnly), and by then the server has already admitted the request. The client gets HTTP 500, or, when streaming, an error event inside a stream that has already opened.Agent clients send a temperature with every request: hermes does, for example. They hit this on every call, and only after waiting their turn in the queue (one stream on this engine). One example from a served log:
ended ... reason=error (the native GLM-5.3-Flash engine decodes greedily only: send temperature 0) prompt=338 tokens=0 after=8.46s.Change
engine_api.Info.greedy_only(default false). The GLM host sets it.Server.resolveSamplingrefuses a request whose resolved temperature is above 0 when the engine is greedy-only. It's a 400invalid_request_error: "this engine decodes greedily only: send temperature 0 or leave it out". It comes before admission and before any stream opens.error.GreedyOnlycheck stays as the engine-side guard.Tests
stream_preflight_test.zigcase: on a greedy-only engine, a streamed request withtemperature: 0.7is a 400 with no stream opened and the preparing count returned.temperature: 0and an unset temperature are both served.zig build test -Dcpu=apple_m1: 129/129 steps, 946/948 tests passed (2 skipped).zig build test-golden: 0 differ (the corpus's engines are not greedy-only).A downstream alternative is to serve such requests greedily instead of refusing them, which is what our GLM recipe does for agent clients. That changes what a request means, so I've kept it out of this PR. It could be an opt-in flag if you'd like it.