Repository navigation
api: accept and ignore a per-request seed instead of rejecting it - #1720
Merged
Merged
Conversation
seed is accepted on /v1/completions and /v1/chat/completions and put nowhere: it reaches no wire frame at any temperature, and the response is what the same request without `seed` returns. Documented as a no-op in docs/api.md.
monotophic
added a commit
to monotophic/colibri
that referenced
this pull request
Sep 23, 2026
…ngine writes (JustVugg#1721) under the logprobs work
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.
Authored by Claude Fable 5.1 in Claude Code, analysis in partnership with @monotophic
/v1/completionsand/v1/chat/completionsanswer a request carryingseedwith a 400 today. Thisaccepts the field and ignores it. The server puts no per-request seed on the wire, so the value has
no effect at any temperature, and
docs/api.mdsays so rather than implying a determinism this builddoes not have.
What changes.
generation_optionsno longer raises onseed; nothing else in it moves. Oneconsequence: a request carrying
seedtogether with an invalidresponse_format,max_tokens,temperature,top_porcache_slotnow gets that field's 400, where the seed refusal used topre-empt those five.
docs/api.mdgains a shortseedsection and a pointer to it. Inc/tests/golden_fixture_capture.pytheerr_seedcase becomesseed_accepted, at temperature 0; acapture diff across this change prints
err_seed.json: MISSING on one sideandseed_accepted.json: MISSING on one sideand exits 1, and the other nine cases are byte-identical.What does not change. A request without
seedwrites the sameSUBMITframe and gets the sameresponse as on
dev; a test pins the frame for a request using onlymodel,prompt,max_tokensand
temperature./v1/messagesdropsseedin its request translation ondevand still does.No engine source, no Makefile, no flag. One commit, four files.
Tests (
c/tests/test_openai_server.py, run fromc/):SeedWireFrameTestcompares the wholeframe list for a seeded and an unseeded request on both endpoints, and
SeedOptionTestchecks theoption parser; both fail on
dev.BaseWireContractTestpins the base frame literally and passes ondevby design.test_openai_server.pyandtest_anthropic_messages.py: 229 green.Limits. The value is not validated: a string or float
seedis accepted and ignored like aninteger. An integer of thousands of digits in any field is a 500 on
devas well, at JSON parsing;not touched here.
Context. This is split out of #1353, which is being reduced to its
logprobs/echowork. The twoare independent — neither reads nor writes what the other changes — but both touch
docs/api.mdandthe header comment of the capture script, so whichever lands second needs a small prose rebase there.
A few further pieces of this work are proposed separately, each with its own evidence.