fix: rewrite Vertex AI Model Garden provider to publisher for capability lookups#2767
Merged
dgageot merged 1 commit intoMay 12, 2026
Merged
Conversation
e70d921 to
5b6cfcb
Compare
gtardif
previously approved these changes
May 12, 2026
5b6cfcb to
084d34b
Compare
Member
Author
|
Addressed both review comments in 084d34b: [MEDIUM] Meta double-prefix lookup ID — fixed. The remap now distinguishes Anthropic from other publishers:
Renamed the helper to [LOW] testify usage — fixed. The new tests now use |
gtardif
approved these changes
May 12, 2026
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.
Fixes #2740.
When a model runs on Vertex AI Model Garden, the OpenAI/Anthropic clients underneath compute their capability-lookup ID as
Provider + "/" + Model. Withprovider: google, that yieldsgoogle/claude-sonnet-4-20250514— which doesn't exist in models.dev. The lookup silently fails back to "no capabilities", so attachments and other capability-gated features get dropped.This rewrites
ModelConfig.Providerfromgoogleto the lower-casedprovider_opts.publisher(e.g.anthropic,meta,mistral) on a clone of the config before handing it to the underlying client. The original config is never mutated, so routing/telemetry keep theirgoogleview.Tests cover anthropic/meta publishers, case folding, whitespace trimming, missing/empty publisher (no-op), input-mutation safety, and a regression test pinning the resulting ID to
anthropic/claude-sonnet-4-20250514.