Skip to content

fix: remove seed from DEFAULT_MODEL_CONFIG for Google API compatibility#75

Merged
S1M0N38 merged 2 commits into
coder:mainfrom
felipefl142:fix/google-api-seed-param
Apr 19, 2026
Merged

fix: remove seed from DEFAULT_MODEL_CONFIG for Google API compatibility#75
S1M0N38 merged 2 commits into
coder:mainfrom
felipefl142:fix/google-api-seed-param

Conversation

@felipefl142
Copy link
Copy Markdown
Contributor

@felipefl142 felipefl142 commented Apr 15, 2026

Summary

  • Removes "seed": 1 from DEFAULT_MODEL_CONFIG in config.py
  • Google's OpenAI-compatible endpoint (generativelanguage.googleapis.com/v1beta/openai/) rejects requests containing the seed parameter with 400 INVALID_ARGUMENT: Unknown name "seed": Cannot find field
  • This caused every LLM call to fail after 3 retries when using Google's API directly

Root cause

DEFAULT_MODEL_CONFIG included "seed": 1 as a default to encourage reproducible LLM outputs. However, seed is not part of the OpenAI-compatible spec that Google's API implements, so it is rejected as an unknown field.

Fix

Remove seed from the hardcoded defaults. Users who want deterministic outputs on providers that support it (OpenAI, OpenRouter) can still set seed via model_config in their YAML config.

Test plan

  • Run balatrollm with BALATROLLM_BASE_URL=https://generativelanguage.googleapis.com/v1beta/openai/ and a Gemini model — LLM calls should succeed instead of exhausting retries with 400 errors
  • Run balatrollm with OpenRouter/OpenAI to confirm no regression

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).
@S1M0N38 S1M0N38 merged commit 6269c59 into coder:main Apr 19, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants