fusionAIze Gate can optionally expose an Anthropic-/Claude-compatible bridge surface on top of the existing gateway core.
This is not a second gateway and not a sidecar. It is one extra ingress surface inside Gate.
Use the bridge when a client wants Anthropic-style messages requests, but you still want Gate to keep control over:
- provider selection
- policy and hook handling
- health-aware fallback
- route scoring
- operator visibility
That is especially useful for Claude-oriented workflows where a direct Anthropic account or subscription can hit daily or weekly limits. In that case, Gate can continue the session through:
- another Anthropic-capable route with available balance
- a coding-capable non-Anthropic route with similar context or tool fit
- a local worker when you want to stay operational without depending on one cloud account
The bridge stays intentionally thin:
- the Anthropic surface accepts a Claude-compatible request
- the bridge validates and normalizes the request
- the request is mapped into Gate's internal canonical model
- the existing Gate core applies hooks, routing, health checks, and fallback
- the result is mapped back into an Anthropic-compatible response
The important split is:
- bridge: protocol normalization only
- core gateway: routing and execution
- optional hook: Claude-Code-specific routing hints
Minimal config:
api_surfaces:
anthropic_messages: true
anthropic_bridge:
enabled: true
allow_claude_code_hints: true
model_aliases:
claude-code: auto
claude-code-fast: eco
claude-code-premium: premium
request_hooks:
enabled: true
community_hooks_dir: "./hooks/community"
hooks:
- claude-code-routerWhat the keys do:
api_surfaces.anthropic_messages- exposes the Anthropic-compatible HTTP surface
anthropic_bridge.enabled- enables bridge parsing and response mapping
anthropic_bridge.model_aliases- maps Claude-facing model ids to Gate routing modes or explicit provider ids
anthropic_bridge.allow_claude_code_hints- keeps Claude-Code-specific bridge metadata available for optional hooks
Keep aliases stable and operational, not provider-specific by default.
Good first aliases:
claude-code -> autoclaude-code-fast -> ecoclaude-code-premium -> premium
Built-in bridge defaults also recognize common Claude Code model ids such as:
claude-sonnet-4-6[1m]claude-sonnet-4-6-20251001claude-opus-4-6[1m]claude-haiku-4-5-20251001
By default those map to routing intents, not direct frontier providers:
claude-sonnet-* -> autoclaude-opus-* -> premiumclaude-haiku-* -> eco
That keeps Claude-oriented clients on stable logical targets while Gate can still adapt the real route underneath and avoid burning Sonnet or Opus for trivial turns.
If your main Claude usage comes from one Anthropic subscription or account, be careful with aggregator routes that still depend on a BYOK Anthropic key from the same quota domain.
Recommended pattern:
- keep direct Anthropic routes probeable and clearly named
- keep Anthropic-capable aggregators as explicit mirrors or secondary routes
- do not assume a premium Anthropic mirror is independent if it uses the same exhausted account
- mark routes that can burn the same upstream quota with a shared
transport.quota_group - use
transport.billing_mode: byokon aggregator routes when the wallet path may still collapse to your own upstream account - use
faigate-doctor,faigate-provider-probe,/health, and/api/providersto validate which routes are actually request-ready
Client support for custom Anthropic endpoints varies by version and integration style. The safe pattern is:
- point the client at the local Gate base URL when it supports overriding the Anthropic API endpoint
- use one stable bridge-facing model alias such as
claude-code - keep route changes inside Gate, not inside the client config
If a client cannot override the Anthropic base URL directly, use the OpenAI-compatible Gate surface instead or place a thin local wrapper in front of the client.
Practical operator guidance:
- start with one alias such as
claude-code -> auto - add
claude-code-fast -> ecoandclaude-code-premium -> premiumonly when the client can switch models cleanly - keep Anthropic-capable aggregator routes out of the top priority slot if they may still consume the same Anthropic account quota through BYOK
- keep at least one non-Anthropic coding-capable route or local worker available for continuity
Illustrative endpoint pattern for Claude-oriented clients that allow endpoint overrides:
Base URL: http://127.0.0.1:8090
Messages path: /v1/messages
Model: claude-code
Anthropic's current Claude Code gateway docs describe the main local-gateway path as:
ANTHROPIC_BASE_URLpointing at the gateway base URL- the gateway exposing
/v1/messagesand/v1/messages/count_tokens - the gateway preserving
anthropic-versionandanthropic-beta
For local Gate testing, the practical flow is:
export ANTHROPIC_BASE_URL=http://127.0.0.1:8090
export ANTHROPIC_AUTH_TOKEN=dummy-local-tokenNotes:
- if your local Gate does not enforce client auth, the token can be a harmless placeholder; Claude Code still wants to send one
- if you place auth in front of Gate, use the real token expected by that layer instead
- keep the client pointed at one stable alias such as
claude-code; move real route changes inside Gate - if a given Claude Code build does not honor the endpoint override you expect, fall back to the validation scripts first and treat the client as version-sensitive
For local operator validation after the service is running:
./docs/examples/anthropic-bridge-smoke.sh
./docs/examples/anthropic-bridge-validation.shUse the bundled example:
./docs/examples/anthropic-bridge-smoke.shThis covers:
POST /v1/messagesPOST /v1/messages/count_tokens
For a client-near validation pass before release, run:
./docs/examples/anthropic-bridge-validation.shThat broader check adds:
- bridge headers and Anthropic version/beta tolerance
- basic
tool_use/tool_resultflow shape - doctor and provider-probe output after the same config is live
For the explicit release gate, see Anthropic Bridge Release Readiness.
- non-streaming only
- text blocks plus basic
tool_use/tool_result count_tokensreturns a deterministic local estimate- image or binary content blocks are not bridged yet
- the optional
claude-code-routerhook only adds routing hints