Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the flexibility of Vertex API key configuration by making the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request makes base-url optional for Vertex API keys, allowing them to fall back to the default Google Vertex endpoint. The core logic change is in SanitizeVertexCompatKeys where the check for an empty base-url is removed. While this is correct, it creates an inconsistency with the PatchVertexCompatKey handler, which I've commented on. Please address this to ensure the feature works as expected through the management API.
I am having trouble creating individual review comments. Click here to see my feedback.
internal/config/vertex_compat.go (74-77)
While this change correctly removes the requirement for base-url during sanitization, it introduces an inconsistency with the PatchVertexCompatKey handler in internal/api/handlers/management/config_lists.go. That handler still treats an empty base-url as a reason to delete the entire key entry, which will prevent users from making the base-url optional on existing keys via the management API. This should be fixed to align with the new behavior.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 560c020477
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| @@ -71,10 +71,6 @@ func (cfg *Config) SanitizeVertexCompatKeys() { | |||
| } | |||
| entry.Prefix = normalizeModelPrefix(entry.Prefix) | |||
| entry.BaseURL = strings.TrimSpace(entry.BaseURL) | |||
There was a problem hiding this comment.
Allow PATCH to clear Vertex base-url without deletion
SanitizeVertexCompatKeys now treats empty base-url as valid, so keys can intentionally fall back to Google Vertex, but PatchVertexCompatKey still treats an empty base-url as a delete operation (internal/api/handlers/management/config_lists.go:574-580). This makes the new behavior inconsistent across management APIs: a user trying to migrate an existing key to the default endpoint via PATCH will silently remove the credential instead of updating it, causing avoidable auth/routing breakage until the key is re-added.
Useful? React with 👍 / 👎.
No description provided.