Google Vertex through the Vigil proxy
Google Cloud’s endpoint for Claude, under a Vertex project and location, billed through Google Cloud. Point your SDK's base URL at Vigil, add one header, and every Google Vertex call is logged with its cost, tokens, latency, errors and agent, then forwarded to the Google endpoint your path's locations/ segment names unchanged unless you switch on an optimisation. Prompt caching never changes answers. History trimming and model routing can: both are opt-in, run in Shadow first, and stop automatically if errors, cut-off answers or failed answers rise.
What Vigil records per Google Vertex call
Each Google Vertex call is one record: model id, tokens, cache reads and writes, latency, status, error code and agent. What a record holds, what happens to your Google Vertex key and what the hop costs in latency are answered once in the FAQ: what Vigil sees, your provider key and added latency.
Cost is computed from the proxy's rate registry, which prices 11 models on this platform today. A model the registry has no row for is logged with its cost left empty, never estimated.
- claude-fable-5
- claude-fable-5-1
- claude-haiku-4-5@20251001
- claude-opus-4-5@20251101
- claude-opus-4-6
- claude-opus-4-7
- claude-opus-4-8
- claude-opus-5
- claude-sonnet-4-5@20250929
- claude-sonnet-4-6
- claude-sonnet-5
Price per token, by model: Claude Opus 5, Claude Sonnet 5, Claude Haiku 4.5, Claude Fable 5.1, Claude Sonnet 4.6.
Setup
The Google Vertex base URL is https://api.vigil.tools/{user_id}/vertex; a request path such as /v1/projects/{project}/locations/{location}/publishers/anthropic/models/{model}:rawPredict is forwarded unchanged, and your Google Vertex key stays in GOOGLE_APPLICATION_CREDENTIALS. The two Vigil headers, the modes and the error codes are the same for every provider: see the LLM proxy setup.
import { AnthropicVertex } from "@anthropic-ai/vertex-sdk";
const client = new AnthropicVertex({
projectId: process.env.GOOGLE_CLOUD_PROJECT, // unchanged
region: "us-east5", // unchanged
baseURL: "https://api.vigil.tools/{user_id}/vertex/v1",
defaultHeaders: {
// MUST be X-Vigil-Key: Authorization carries the OAuth token the SDK mints.
"X-Vigil-Key": "vk_your_vigil_key",
"X-Vigil-Agent": "my-agent",
},
});
const message = await client.messages.create({
model: "claude-haiku-4-5@20251001",
max_tokens: 1024,
messages: [{ role: "user", content: "Hello!" }],
});The header name and value are certain; this SDK’s plumbing for setting them is not — it has not been smoke-tested against a live call. If it does not work, the curl format is the ground truth for exactly what Vigil expects. The location in the URL picks the Google endpoint AND the price: `global` is list price, while `us`/`eu` (multi-region) and any single region such as `us-east5` carry +10%. Sonnet 5 and Opus 5 are not served on regional endpoints at all — use global, us or eu for those, or Vigil will refuse the call rather than pick an endpoint for you.
from anthropic import AnthropicVertex
client = AnthropicVertex(
project_id=os.environ["GOOGLE_CLOUD_PROJECT"], # unchanged
region="us-east5", # unchanged
base_url="https://api.vigil.tools/{user_id}/vertex/v1",
default_headers={
"X-Vigil-Key": "vk_your_vigil_key",
"X-Vigil-Agent": "my-agent",
},
)
message = client.messages.create(
model="claude-haiku-4-5@20251001",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello!"}],
)The header name and value are certain; this SDK’s plumbing for setting them is not — it has not been smoke-tested against a live call. If it does not work, the curl format is the ground truth for exactly what Vigil expects. The location in the URL picks the Google endpoint AND the price: `global` is list price, while `us`/`eu` (multi-region) and any single region such as `us-east5` carry +10%. Sonnet 5 and Opus 5 are not served on regional endpoints at all — use global, us or eu for those, or Vigil will refuse the call rather than pick an endpoint for you.
curl https://api.vigil.tools/{user_id}/vertex/v1/projects/$GOOGLE_CLOUD_PROJECT/locations/us-east5/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict \
-H "content-type: application/json" \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "X-Vigil-Key: vk_your_vigil_key" \
-H "X-Vigil-Agent: my-agent" \
-d '{
"anthropic_version": "vertex-2023-10-16",
"max_tokens": 1024,
"messages": [{ "role": "user", "content": "Hello!" }]
}'The location in the URL picks the Google endpoint AND the price: `global` is list price, while `us`/`eu` (multi-region) and any single region such as `us-east5` carry +10%. Sonnet 5 and Opus 5 are not served on regional endpoints at all — use global, us or eu for those, or Vigil will refuse the call rather than pick an endpoint for you.
Prompt caching on Google Vertex
Vigil adds cache breakpoints to your requests — it reads the prompt structure and marks where the reusable prefix ends, so the provider caches exactly that much. This is the mechanism the Optimise page measures and reports savings for.
With optimisation On: Vigil adds cache markers to the stable start of the prompt. In Shadow, Vigil measures what caching would have saved and changes nothing. Off records the call and nothing more.
Questions
- Which Google Vertex models does Vigil price?
- 11 models with a published rate in the registry: claude-fable-5, claude-fable-5-1, claude-haiku-4-5@20251001, claude-opus-4-5@20251101, claude-opus-4-6, claude-opus-4-7, claude-opus-4-8, claude-opus-5, claude-sonnet-4-5@20250929, claude-sonnet-4-6, claude-sonnet-5. A call to any other Google Vertex model is logged and monitored, with its cost left empty rather than guessed.
Other providers: Anthropic · AWS Bedrock · OpenAI · Google Gemini · Mistral · xAI Grok · DeepSeek · Together AI · Fireworks AI · Groq · Cerebras · Baseten · Moonshot · Z.ai · Cloudflare Workers AI · OpenRouter