-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Hi there, we're running into an issue with provider fallback in the Gateway and wanted to get your guidance on the recommended approach.
The setup
We have a routing group for Anthropic that includes Vertex AI as a low-priority fallback:
anthropic routing group:
- anthropic prod key (priority 1)
- anthropic builtin (priority 0)
- google-vertex builtin (priority -1)
Our goal is that if our Anthropic API key hits rate limits or has issues, we can fall back to Vertex AI which hosts the same Claude models.
The problem
When the Anthropic providers are unavailable and requests fall back to Vertex AI, we get 404 errors because the model name formats are incompatible:
- Our code sends:
claude-sonnet-4-0(Anthropic API format) - Vertex AI expects:
claude-sonnet-4@20250514(uses@instead of-for versions)
The actual error we see:
Publisher Model `projects/xxx/locations/global/publishers/anthropic/models/claude-sonnet-4` was not found
Looks like Vertex strips the -0 suffix and then can't find the model.
What we're wondering
-
Is there a way to configure model name mappings per provider? Something like "when using the vertex provider, translate
claude-sonnet-4-0toclaude-sonnet-4@20250514"? -
Or is mixing providers with different model name conventions in the same routing group just not supported? If so, what's the recommended way to get cross-provider redundancy for Claude models?
-
Should we just remove Vertex from the anthropic routing group entirely and accept that fallback won't work across provider types?
We're seeing this in production when Anthropic has intermittent availability issues - works fine most of the time, but when fallback kicks in we get a burst of 404s.
Any guidance appreciated!