Skip to content

fix(models): send temperature and top_p on interactions API requests - #7376

Open
donggyun112 wants to merge 1 commit into
google:mainfrom
donggyun112:fix/interactions-send-temperature-top-p
Open

donggyun112 wants to merge 1 commit into
google:mainfrom
donggyun112:fix/interactions-send-temperature-top-p

Conversation

@donggyun112

Copy link
Copy Markdown
Contributor

build_generation_config drops temperature, top_p and top_k as parameters google-genai cannot carry on an interactions request. Since google-genai 2.26.0, GenerationConfigParam declares temperature and top_p, so a configured temperature is still dropped by ADK, and the warning blames the client. test_dropped_parameters_are_the_ones_the_request_cannot_carry has been failing on main since 2.26.0.

Send temperature and top_p. top_k is still undeclared and stays dropped with its warning.

Testing Plan

Unit tests

TestBuildGenerationConfig now expects temperature and top_p in the built config and only top_k in the client-side warning.

$ pytest tests/unittests/models -q
1390 passed

Manual E2E

Gemini(model="gemini-2.5-flash", use_interactions_api=True) with temperature=0, six runs of a "random number" prompt against the live API. On main the request carries no generation_config and returns six different numbers. With this change it sends {"temperature": 0.0} and returns the same two numbers as a direct client.aio.interactions.create(..., generation_config={"temperature": 0}).

google-genai 2.26 declares temperature and top_p on the interactions
GenerationConfig, but build_generation_config still dropped them as
parameters the client cannot carry, so a configured temperature never
reached the API. Send them; top_k is still undeclared and stays dropped.
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