Support Vertex AI publisher URLs for Gemini#425
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Walkthrough
ChangesGemini upstream URL construction and ValidateKey refactor
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/channel/gemini_channel.go`:
- Around line 49-52: The else branch at line 52 unconditionally prepends
base.Path to requestPath using joinURLPath, causing path duplication when
non-Vertex upstreams are configured with a path component. Before calling
joinURLPath for the non-Vertex case, add a guard check to verify that the
requestPath does not already contain the base.Path value, similar to how the
Vertex branch mitigates this. This ensures that paths like /v1beta are not
duplicated in the final URL when a base upstream path is already present in the
request.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ad050093-0bdc-429a-aab2-aa25488ff266
📒 Files selected for processing (2)
internal/channel/gemini_channel.gointernal/channel/gemini_channel_test.go
Summary
Tests
Summary by CodeRabbit
.../models/<model>:generateContentendpoint and preserve the request body.