Skip to content

LiteLLM silently drops GenerateContentConfig.seed #6513

Closed

Description

@svfat

🔴 Required Information

Describe the Bug:

GenerateContentConfig(seed=42) is not forwarded by LiteLlm. The seed is still present in the request config, but missing from parameters passed to LiteLLM.

Steps to Reproduce:

  1. install google-adk==2.5.0
  2. run code:
import asyncio
from google.adk.models.lite_llm import _get_completion_inputs
from google.adk.models.llm_request import LlmRequest
from google.genai import types

async def main():
    req = LlmRequest(
        model="openai/gpt-4o-mini",
        config=types.GenerateContentConfig(temperature=0.0, seed=42),
    )
    result = await _get_completion_inputs(req, model=req.model)
    print(result[3])

asyncio.run(main())

Expected Behaviour:

{"temperature": 0.0, "seed": 42}

Observed Behaviour:

{"temperature": 0.0}

There is no error, seed is just silently dropped.

Environment Details:

  • ADK: 2.5.0
  • OS: macOS
  • Python: 3.13

Model Information:

  • LiteLLM: Yes
  • Model: openai/gpt-4o-mini, but repro does not call the model

🟡 Optional Information

Additional Context:

Looks like seed is missing from explicit parameter mapping in lite_llm.py. I also checked current main and it seems to have the same problem. I can submit a small fix and test if the approach is ok.

How often has this issue occurred?:

  • Always (100%)

Activity

  1. changed the title [-]LiteLlm silently drops GenerateContentConfig.seed[/-] [+]LiteLLM silently drops GenerateContentConfig.seed[/+] on Jul 29, 2026
  2. added 2 commits that reference this issue on Jul 30, 2026
    c0e2e7a
    9d63543
  3. surajksharma07 commented on Jul 30, 2026

    @surajksharma07
    Collaborator

    @svfat seed just isn't in the param allowlist inside _get_completion_inputs, so it gets silently dropped before reaching LiteLLM.

    There's already a fix up in #6516 (adds seed to that list) that we've verified locally resolves it — could you pull that branch and confirm it works for your gpt-4o-mini setup as well?

    Once you've tested and confirmed it on your side, we can move forward with getting it merged!

  4. added
    models[Component] This issue is related to model support
    on Jul 30, 2026
  5. added 2 commits that reference this issue on Jul 30, 2026
    07de3af
    cd093e5
  6. svfat commented on Jul 30, 2026

    @svfat
    ContributorAuthor

    @surajksharma07 Confirmed. I tested PR #6516 with openai/gpt-4o-mini, and seed=42 is now forwarded correctly in the LiteLLM generation parameters. The original reproduction now returns {"temperature": 0.0, "seed": 42}

  7. removed
    request clarification[Status] The maintainer need clarification or more information from the author
    on Aug 4, 2026
  8. surajksharma07 commented on Aug 4, 2026

    @surajksharma07
    Collaborator

    Appreciate you testing that on your actual gpt-4o-mini setup and reporting back — that's exactly the confirmation we needed!

    #6516 is clean on CI, lint, and CLA, so it's just waiting on a review now.
    I'll nudge GWeale to take a look and get it merged.
    Clearing the clarification flag since you've confirmed it!

    Team is looking more into it.
    Thanks!

  9. added a commit that references this issue on Sep 8, 2026
    668e024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

models[Component] This issue is related to model support

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions