Integration

AWS Bedrock through the Vigil proxy

Amazon’s managed endpoint for Claude and other models, billed through AWS, with the request signed by SigV4 or carried under a Bedrock API key. Point your SDK's base URL at Vigil, add one header, and every AWS Bedrock call is logged with its cost, tokens, latency, errors and agent, then forwarded to https://bedrock-runtime.{region}.amazonaws.com 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 AWS Bedrock call

Each AWS Bedrock 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 AWS Bedrock 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 9 models on this platform today. A model the registry has no row for is logged with its cost left empty, never estimated.

  • anthropic.claude-fable-5contract designated
  • anthropic.claude-fable-5-1contract designated
  • anthropic.claude-haiku-4-5-20251001contract designated
  • anthropic.claude-opus-4-8
  • anthropic.claude-opus-5contract designated
  • anthropic.claude-sonnet-4-5-20250929
  • anthropic.claude-sonnet-4-6
  • anthropic.claude-sonnet-5contract designated
  • meta.llama3-3-70b-instructunverified

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 AWS Bedrock base URL is https://api.vigil.tools/{user_id}/bedrock; a request path such as /us-east-1/model/{model-id}/invoke is forwarded unchanged, and your AWS Bedrock key stays in AWS_BEARER_TOKEN_BEDROCK. Bedrock takes the AWS region as the next segment; the snippets use us-east-1. The two Vigil headers, the modes and the error codes are the same for every provider: see the LLM proxy setup.

TypeScript: No verified TypeScript example for Bedrock yet — the AWS SDKs sign requests with SigV4 by default, and no per-client switch to bearer auth has been verified here, so a snippet would fail with a signature error rather than work. Use the curl format: it is the exact request Vigil expects, and any client that lets you set a base URL and a header will work.

Python: No verified Python example for Bedrock yet — the AWS SDKs sign requests with SigV4 by default, and no per-client switch to bearer auth has been verified here, so a snippet would fail with a signature error rather than work. Use the curl format: it is the exact request Vigil expects, and any client that lets you set a base URL and a header will work.

bedrock invoke
curl https://api.vigil.tools/{user_id}/bedrock/us-east-1/model/us.anthropic.claude-haiku-4-5-20251001-v1%3A0/invoke \
  -H "content-type: application/json" \
  -H "Authorization: Bearer $AWS_BEARER_TOKEN_BEDROCK" \
  -H "X-Vigil-Key: vk_your_vigil_key" \
  -H "X-Vigil-Agent: my-agent" \
  -d '{
    "anthropic_version": "bedrock-2023-05-31",
    "max_tokens": 1024,
    "messages": [{ "role": "user", "content": "Hello!" }]
  }'

The model id is the SHAPE, not a fixed value — copy the exact one from the Bedrock console. A us. prefix is a regional inference profile and global. is the global one; they are priced differently, so Vigil records them as different rate tables and never averages the two.

Prompt caching on AWS Bedrock

Vigil can add cache breakpoints here, but only when the request carries a Bedrock API key. A SigV4-signed request cannot be modified without invalidating its signature, so those calls are forwarded exactly as sent and nothing is cached by us.

With optimisation On: Vigil adds cache markers only when the request carries a Bedrock API key; a SigV4-signed request is forwarded unchanged. In Shadow, Vigil measures what caching would have saved and changes nothing. Off records the call and nothing more.

Questions

Which AWS Bedrock models does Vigil price?
8 models with a published rate in the registry: anthropic.claude-fable-5, anthropic.claude-fable-5-1, anthropic.claude-haiku-4-5-20251001, anthropic.claude-opus-4-8, anthropic.claude-opus-5, anthropic.claude-sonnet-4-5-20250929, anthropic.claude-sonnet-4-6, anthropic.claude-sonnet-5. A call to any other AWS Bedrock model is logged and monitored, with its cost left empty rather than guessed.

Other providers: Anthropic · Google Vertex · OpenAI · Google Gemini · Mistral · xAI Grok · DeepSeek · Together AI · Fireworks AI · Groq · Cerebras · Baseten · Moonshot · Z.ai · Cloudflare Workers AI · OpenRouter