Conversation
`OpenAIBackend.build_request` always included the OpenAI-proper `seed`
field. OpenAI-compatible servers reject unknown fields rather than
ignoring them — notably Gemini's `/v1beta/openai` endpoint, which returns:
HTTP 400 Invalid JSON payload received. Unknown name "seed": Cannot find field.
The agent run succeeds; only the LLM-judge scoring step fails with a
judge-infra error, so every `--modes llm` run against such a backend is
ungradeable.
Only send `seed` when talking to the canonical OpenAI host
(`_DEFAULT_BASE_URL`); omit it for any custom base URL. Determinism for
custom backends is still governed by `temperature`. This unblocks Gemini
and any other OpenAI-compatible provider that doesn't implement `seed`.
Adds tests asserting `seed` is present for the default base and absent
for a custom base URL.
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
This branch had an error being deployed
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.
Summary
OpenAIBackend.build_requestunconditionally includes the OpenAI-properseedfield. OpenAI-compatible servers reject unknown fields rather than ignoring them — notably Gemini's/v1beta/openaiendpoint:The agent run succeeds; only the LLM-judge scoring step fails (judge-infra error), which makes every
--modes llmrun against such a backend ungradeable.Fix: send
seedonly when the resolved base URL is the canonical OpenAI host (_DEFAULT_BASE_URL); omit it for any custom base URL. Determinism for custom backends is still governed bytemperature. This unblocks Gemini and any other OpenAI-compatible provider that doesn't implementseed, and doesn't change behavior against api.openai.com.Repro
Point the OpenAI backend at Gemini's compat endpoint and run an
llm-mode score:Test plan
test_build_request_default_base_includes_seed—seedstill sent to api.openai.com.test_build_request_custom_base_omits_seed—seedomitted for a Gemini-style custom base URL.pytest tests/scorer/llm/test_backend.py -k OpenAIBackendpasses.Notes
Found while wiring Gemini (OpenAI-compat) as the judge for a docs-accessibility eval built on agent-belt. Happy to adjust the gating (e.g. an explicit opt-out env var instead of host-matching) if maintainers prefer a different shape.