docs(vertex): move model= from genai.Client() to from_genai() - #2475
Closed
Goutham-Annem wants to merge 1 commit into
Closed
docs(vertex): move model= from genai.Client() to from_genai()#2475Goutham-Annem wants to merge 1 commit into
Goutham-Annem wants to merge 1 commit into
Conversation
The model parameter belongs to from_genai(), not genai.Client(). Passing model= inside genai.Client() has no effect and silently ignores the model selection. Fixes 567-labs#2416
Collaborator
|
Consolidated and shipped in #2495. Closing this focused patch as superseded; thank you for the contribution. |
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
Fixes an incorrect code example in the Vertex AI migration guide where
model=was passed togenai.Client()instead offrom_genai().The
genai.Client()constructor does not accept amodelparameter — passing it there is silently ignored. Themodelargument belongs tofrom_genai(), which uses it to set the default model for all requests.Fixes #2416
Changes
docs/integrations/vertex.md— corrected the "Option 2" example in the Migration to Google GenAI sectionBefore (incorrect):
After (correct):
Testing
Documentation-only change. Verified against the
google-genaiSDK source —genai.Client.__init__does not accept amodelparameter.Note: This PR was developed with AI assistance.