Skip to content

Conversation

@Odessit007
Copy link

@Odessit007 Odessit007 commented Nov 16, 2025

Description

Support an optional seed parameter that Google Gen AI SDK exposes for more reproducible generations but langchain-google-genai currently doesn't support.

Relevant issues

Closes #1355

Type

🆕 New Feature

Copy link
Member

@mdrxy mdrxy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add unit tests?

@mdrxy mdrxy changed the title feat(genai): support optional seed parameter in ChatGoogleGenerativeAI feat(genai): support optional seed parameter Nov 18, 2025
@mdrxy
Copy link
Member

mdrxy commented Nov 27, 2025

bump @Odessit007

@ivustianiu-illumina
Copy link

Hi @mdrxy. I've been sick since last week. I should have time in the next few days to have a look.

Initially I didn't add tests because I noticed that there are no tests for seed parameter in vertexai package and because they'll be flaky (it's a best effort on the Google's side to ensure reproducibility but the nature of hardware and distributed compute may still cause nondeterminism).

Now that you requested, I'm going to add a simple integration test marked as flaky with 3-5 retries similar to existing tests. Also, maybe a unit test to check that the parameter is properly set.

@mdrxy
Copy link
Member

mdrxy commented Dec 1, 2025

gotcha thanks! hope you're doing better

deferring this PR until after the SDK consolidation takes place

@mdrxy mdrxy marked this pull request as draft December 1, 2025 20:04
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.

Support seed parameter for google_genai

3 participants