fix: remove seed from DEFAULT_MODEL_CONFIG for Google API compatibility#75
Merged
Merged
Conversation
Google's OpenAI-compatible API rejects requests that include the `seed` parameter with 400 INVALID_ARGUMENT. The `seed` field is not part of the OpenAI-compatible spec that Google implements. Removing it from the defaults fixes compatibility with Google's Generative Language API while not affecting providers that do support it (users can still set it via model_config in YAML).
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
"seed": 1fromDEFAULT_MODEL_CONFIGinconfig.pygenerativelanguage.googleapis.com/v1beta/openai/) rejects requests containing theseedparameter with400 INVALID_ARGUMENT: Unknown name "seed": Cannot find fieldRoot cause
DEFAULT_MODEL_CONFIGincluded"seed": 1as a default to encourage reproducible LLM outputs. However,seedis not part of the OpenAI-compatible spec that Google's API implements, so it is rejected as an unknown field.Fix
Remove
seedfrom the hardcoded defaults. Users who want deterministic outputs on providers that support it (OpenAI, OpenRouter) can still setseedviamodel_configin their YAML config.Test plan
balatrollmwithBALATROLLM_BASE_URL=https://generativelanguage.googleapis.com/v1beta/openai/and a Gemini model — LLM calls should succeed instead of exhausting retries with 400 errorsbalatrollmwith OpenRouter/OpenAI to confirm no regression