LLM ProxyAnthropic

You are viewing the docs for Archestra v1.4. View the latest docs

Anthropic

Use Claude with an Anthropic API key, or through your Microsoft Foundry or Google Vertex AI account. With workload identity federation, Archestra stores no Anthropic key at all.

Adding a Provider

Go to Model Providers → Add API Key, select Anthropic, and configure the credentials described below. Click Test & Create. A successful test adds the key and makes its models available under Models.

Proxy Endpoint

  • Base URL: https://<archestra-host>/v1/anthropic
  • Authentication: Pass your Anthropic API key in the x-api-key header
  • Messages path: POST /v1/anthropic/v1/messages

Claude Code Auto Mode

Claude Code's auto mode uses the provider's server-side safety checks through the proxy. Where the provider runs these checks, Claude Code makes no separate classifier requests, so you do not pay for them. This works on every Anthropic option on this page and on Amazon Bedrock. See Anthropic's auto mode classifier request charges for which platforms run the checks.

Anthropic on Microsoft Foundry

Use the Claude deployments in your Microsoft Foundry resource, billed through Azure. Archestra lists the resource's Claude deployments, so you pick them like any other Anthropic model.

  1. Deploy a Claude model in Foundry. Microsoft's Claude on Foundry guide lists the subscription, region, and Marketplace requirements.
  2. Go to Model Providers → Add API Key and select Anthropic.
  3. Paste the Foundry resource key. Under Advanced, set Base URL to https://<resource>.services.ai.azure.com/anthropic.
  4. Click Test & Create. The key's models are your Claude deployments, listed by deployment name.

Anthropic on Vertex AI

Archestra can use Claude models published through Google Vertex AI. This mode uses Application Default Credentials and requires no Anthropic API key.

Set ARCHESTRA_ANTHROPIC_VERTEX_AI_PROJECT to enable this mode. Unset or blank disables it. The default location is global. Archestra discovers Claude models from Model Garden and adds them to the Anthropic model picker.

Enable each Claude model in Model Garden before using it. Google may require accepting provider terms during activation.

See the deployment environment variables for the full configuration.

Workload Identity Federation (keyless)

Archestra can authenticate to the Anthropic API without a static API key using Workload Identity Federation: it exchanges a short-lived OIDC identity token from your identity provider (Kubernetes, AWS, GCP, Entra ID, GitHub Actions, and others) for an Anthropic access token and sends it as Authorization: Bearer upstream. Tokens are cached and refreshed automatically before expiry.

Configure a federation issuer, service account, and federation rule in the Claude Console (Settings → Workload identity), then set the ARCHESTRA_ANTHROPIC_* WIF environment variables — see Environment Variables in the deployment docs. When configured, Archestra creates an "Anthropic Workload Identity Federation" system key automatically and syncs the available Claude models; users can also create Anthropic provider keys without entering an API key.

Note: the SDK-standard ANTHROPIC_API_KEY / ANTHROPIC_AUTH_TOKEN environment variables take precedence over federation if present in the backend environment, matching Anthropic's documented credential precedence.

Prompt Caching

The native Anthropic proxy forwards caller-supplied cache_control on requests, system and message blocks, and tools. It records provider-reported cache reads and writes for streaming and non-streaming calls.

Archestra does not add cache markers to native proxy requests; use Anthropic’s caching controls for a supported model. Cache eligibility and hits are decided by Anthropic.

Through the Model Router

The Model Router translates caller-supplied cache_control on content blocks, messages, and function tool definitions when targeting Anthropic. Message-level controls apply to the final content block; controls on earlier blocks keep their original boundary. Top-level cache_control is forwarded for Anthropic's automatic caching mode.

For example, this Chat Completions body marks the stable system prefix while leaving the question outside that breakpoint:

json
{
  "model": "anthropic:claude-sonnet-4-6",
  "messages": [
    { "role": "system", "content": [{ "type": "text", "text": "Reusable instructions", "cache_control": { "type": "ephemeral" } }] },
    { "role": "user", "content": "A question that changes each turn" }
  ]
}

The same controls work on translated Responses input blocks and function tools. A marker on content the translator cannot represent returns an error rather than silently moving or dropping the breakpoint. Cache reads and writes remain separate in returned usage; a model or provider switch can reduce cache reuse.