Providers & Models
Google Vertex
Connect a Google Cloud project to Multi-Router and route requests to Anthropic's Claude models on Vertex AI.
Google Vertex AI is Google Cloud's managed model platform, and Multi-Router uses it to serve Anthropic's Claude models from your Google Cloud project. A Vertex provider key holds a service account, its project and a location, and Multi-Router calls Vertex as that service account. Usage is billed by Google to the project, and Vertex quotas apply per project, model and location. Google's Gemini models are served through the Gemini provider; see Supported Providers.
Preparing your Google Cloud project
The Google Cloud project that serves requests needs the Vertex AI API, access to the Claude models, and a service account Multi-Router can use:
- Enable the Vertex AI API in the project.
- In Vertex AI Model Garden, enable each Claude model you will use.
- Create a service account in the project. Its email ends in
@<project-id>.iam.gserviceaccount.com; Google-managed accounts, such as the Compute Engine default service account, are not accepted. - Grant the service account the Vertex AI User role (
roles/aiplatform.user), which allows Vertex AI predictions. - Create a JSON key for the service account and download it. If your organization enforces the
iam.disableServiceAccountKeyCreationpolicy, an organization policy administrator must allow key creation for the project first.
Adding a Vertex provider key
A Vertex provider key holds one service account and the location requests run in. To add one, open LLM Provider Keys in the dashboard, add a key, and select Google Vertex:
| Field | Description |
|---|---|
| Google Cloud project ID | The project id, such as my-production-project: 6 to 30 lowercase letters, digits and hyphens, starting with a letter and ending with a letter or digit. It must match the project_id in the service account JSON. |
| Google Cloud location | The location requests run in: global, us, eu or a Google Cloud region such as us-east5. The models you route must be offered in this location. |
| Service-account JSON | The complete JSON key file of the service account, up to 64 KB. |
The service account JSON must be the unmodified key file Google issues: its type is service_account, its token_uri is https://oauth2.googleapis.com/token, and it contains the project_id, the client_email of a service account in that project, a private_key_id and an RSA private_key. A file that breaks these rules is rejected with a message beginning Vertex service-account or metadata validation failed.
Multi-Router verifies the service account with Google when the key is saved and when its location is edited, and when it is enabled or made the default unless Multi-Router already holds a valid access token for it. A failed verification shows Google's response, such as Google OAuth token endpoint returned HTTP 400 (invalid_grant). Verification confirms that Google accepts the key file; the service account's role and model access are checked by the first request. A saved key's name, description and location can be edited, and later requests use the new location. The service account JSON is fixed, so rotating it means adding a new key and moving routers to it; see Provider Key.
Locations
The location is the Google Cloud location that runs each request, and for static routers it is always the location set on the provider key. Current Claude models are offered in the global, us and eu locations, and Claude Sonnet 4.6, Claude Opus 4.6 and earlier models are also offered in single regions such as us-east5, europe-west1 and asia-southeast1. A request for a model not offered in the key's location returns region_not_served with the locations where it is available.
To serve requests from several locations, add one provider key per location, using the same service account JSON in each, and set each router to the key for its location. Claude Proxies set the location on the Claude Proxy instead, so one key serves every location. See Regions & Variants for what each location type means.
Models and features
Multi-Router serves Anthropic's Claude models on Vertex, and a request for another publisher's model on Vertex returns publisher_not_supported. Claude models on Vertex support the following features:
| Feature | Support |
|---|---|
| Streaming | Yes. |
| Tools | Yes. |
| Images | Yes, sent as base64 data. Vertex does not accept images by URL. |
| Reasoning | Yes, with thinking and budget_tokens on the Messages API. |
| Prompt caching | Yes, with cache_control on the Messages API. |
| Structured output | Claude 4.5 and later models, with a json_schema response format on the Chat Completions API. A json_object response format is rejected. |
| PDF input | Through a Claude Proxy. |
| Token counting | Through a Claude Proxy, for Claude Code. |
Access tokens
An access token is the short-lived credential Multi-Router obtains from the service account to call Vertex, and Multi-Router renews it automatically before it expires. When the service account key is deleted in Google Cloud, requests continue until the current access token expires, within an hour, and then fail with a 503. To stop access immediately, disable the service account in Google Cloud or disable the provider key in Multi-Router.
Errors and retries
Vertex errors reach the caller as Multi-Router errors with Google's status in the response's upstream object. Multi-Router retries rate limits, server errors, timeouts and connection failures with exponential backoff, honoring any retry delay Google sends, for up to five attempts within five minutes.
| Error | Cause |
|---|---|
| 503, Google Vertex OAuth token is not ready; retry shortly | Multi-Router has no valid access token for the key at that moment. Retry the request. |
401 upstream_invalid_credentials, the Google Vertex provider key's credentials are not usable: … | Google rejected the service account (for example, the key was revoked or deleted), or the provider key is disabled or deleted. The message gives the reason. Multi-Router tries the key again every five minutes, and at once after the key is edited. |
502 upstream_invalid_credentials | Google rejected the service account credentials. |
403 upstream_other, upstream status PERMISSION_DENIED | The service account lacks the Vertex AI User role, or the Vertex AI API is not enabled. |
400 upstream_model_not_found | The model is not enabled in Model Garden, or is not available in the project and location. |
429 upstream_rate_limit | Rate limits or timeouts continued after retries. Request quota increases in the Google Cloud console. |
502 upstream_server_error | Vertex AI server errors continued after retries. |
400 publisher_not_supported | The model is not an Anthropic model. |
400 region_not_served | The model is not offered in the key's location. |
Pricing
Vertex prices differ by location: for Claude Sonnet 4.5 and later models, the us, eu and single-region locations cost more than global, and earlier models cost the same in every location. Multi-Router bills each request at the price of the location that served it, including prompt cache reads, 5-minute and 1-hour cache writes, and long-context rates for prompts above the model's long-context threshold. See Model Catalog.
Claude Code on Vertex
A Claude Proxy on the Vertex AI route serves Claude Code in its Vertex mode. Multi-Router forwards the request body unchanged and sends it with the organization's Vertex key, the key's project, the location set on the Claude Proxy and the model id of the routed model; Claude Code's project and region settings are required by Claude Code and do not select the project or location. Claude Proxy requests are sent to Vertex once, without retries, and errors use Google's error format. The dashboard generates the environment for each developer:
See Agents & Editors.