Skip to content

[Vertex AI] Log warning for unsupported model names#14610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 24, 2025

Conversation

andrewheard
Copy link
Contributor

@andrewheardandrewheard commented Mar 24, 2025

Added a warning message to the initializers of GenerativeModel and ImagenModel that is logged when the provided model name does not start with the expected prefix ("gemini-" for GenerativeModel and "imagen-" for ImagenModel). The warning message includes a link to the documentation for supported models.

Note: No error is thrown in case the naming scheme is changed in the future, though we would want to update the logic/message at that time.

…Model initializers. This change adds a warning message to the initializers of GenerativeModel and ImagenModel. The warning is logged when the provided model name does not start with the expected prefix ("gemini-" for GenerativeModel and "imagen-" for ImagenModel). The warning message includes a link to the documentation for supported models. The changes were tested manually, but automated tests could not be run due to an unavailable test environment.
@gemini-code-assistgemini-code-assist

This comment was marked as resolved.

Copy link
Contributor

@gemini-code-assistgemini-code-assistbot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a warning message when the provided model name does not start with the expected prefix for GenerativeModel and ImagenModel. This is a good addition to help developers use the SDK correctly. The implementation is clear and straightforward.

Merge Readiness

The code changes are well-implemented and the added warning messages will be helpful for developers. I don't see any issues that would block merging this pull request, but as always, I am unable to directly approve the pull request and recommend that others review and approve this code before merging.

Copy link
Member

@paulb777paulb777 left a comment

Choose a reason for hiding this comment

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

Thanks!

@andrewheardandrewheard marked this pull request as ready for review March 24, 2025 20:50
@andrewheardandrewheard merged commit 5dcf7aa into mainMar 24, 2025
37 checks passed
@andrewheardandrewheard deleted the log-unsupported-model-warning branch March 24, 2025 22:02
rlazo added a commit to firebase/firebase-android-sdk that referenced this pull request Mar 25, 2025
Added a warning message to the initializers of GenerativeModel and ImagenModel that is logged when the provided model name does not start with the expected prefix ("gemini-" for GenerativeModel and "imagen-" for ImagenModel). The warning message includes a link to the documentation for supported models. Note: No error is thrown in case the naming scheme is changed in the future, though we would want to update the logic/message at that time. Related iOS PR firebase/firebase-ios-sdk#14610
rlazo added a commit to firebase/firebase-android-sdk that referenced this pull request Mar 25, 2025
Added a warning message to the initializers of GenerativeModel and ImagenModel that is logged when the provided model name does not start with the expected prefix ("gemini-" for GenerativeModel and "imagen-" for ImagenModel). The warning message includes a link to the documentation for supported models. Note: No error is thrown in case the naming scheme is changed in the future, though we would want to update the logic/message at that time. Related iOS PR firebase/firebase-ios-sdk#14610
tejasd pushed a commit to firebase/firebase-android-sdk that referenced this pull request Apr 1, 2025
Added a warning message to the initializers of GenerativeModel and ImagenModel that is logged when the provided model name does not start with the expected prefix ("gemini-" for GenerativeModel and "imagen-" for ImagenModel). The warning message includes a link to the documentation for supported models. Note: No error is thrown in case the naming scheme is changed in the future, though we would want to update the logic/message at that time. Related iOS PR firebase/firebase-ios-sdk#14610
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
@andrewheard@paulb777
close