feat: allow custom model ID passthrough for Vertex AI providers#12289
Draft
roomote-v0[bot] wants to merge 1 commit intomainfrom
Draft
feat: allow custom model ID passthrough for Vertex AI providers#12289roomote-v0[bot] wants to merge 1 commit intomainfrom
roomote-v0[bot] wants to merge 1 commit intomainfrom
Conversation
- Add gemini-3.1-flash-lite-preview to vertex models list - Update VertexHandler.getModel() to pass through unknown model IDs with sensible default ModelInfo instead of falling back to default model - Update AnthropicVertexHandler.getModel() with same custom model ID passthrough behavior - Add tests for custom model ID passthrough in both handlers Closes #12232
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.
Related GitHub Issue
Closes: #12232
Description
This PR attempts to address Issue #12232. Feedback and guidance are welcome.
Changes:
Added
gemini-3.1-flash-lite-previewto the vertex models list inpackages/types/src/providers/vertex.tswith appropriate defaults (1M context window, image support, prompt caching).Updated
VertexHandler.getModel()insrc/api/providers/vertex.tsto pass through unknown/custom model IDs with sensible default ModelInfo (8192 max tokens, 1M context window) instead of silently falling back to the default model. This allows users to type any model ID in the UI.Updated
AnthropicVertexHandler.getModel()insrc/api/providers/anthropic-vertex.tswith the same custom model ID passthrough behavior (using 200K context window default for Anthropic models).Added tests for custom model ID passthrough and default fallback in both handlers.
Test Procedure
vertex.spec.ts(2 new tests)anthropic-vertex.spec.ts(2 new tests)Pre-Submission Checklist
Documentation Updates
Additional Notes
The approach mirrors how Bedrock handles custom ARNs - unknown model IDs get sensible defaults rather than being silently discarded. This means users can immediately use new model IDs as Google releases them without waiting for extension updates.
Interactively review PR in Roo Code Cloud