SSC-STUDIO / Ai-Model-Gateway

Claude Code Gateway

Route Claude Code and Anthropic Messages-style clients through one self-hosted gateway with provider fallback, telemetry, request logs, config publishing, and rollback.

If this fits your Claude Code routing workflow, star the repository after evaluation so other operators can find it.

Claude Code entry point

Use the gateway URL where Claude-oriented tools expect an Anthropic endpoint.

AI Model Gateway keeps upstream provider keys in local gateway config. Claude Code-style clients use a gateway client key and send traffic to the data-plane listener.

Base URL

Set ANTHROPIC_BASE_URL to the gateway origin plus /v1.

Gateway auth

Use a gateway client key through ANTHROPIC_AUTH_TOKEN instead of copying provider keys into tools.

Messages route

Send Anthropic Messages-style requests through POST /v1/messages.

Operations layer

Keep fallback, telemetry, request logs, provider health, and rollback in one self-hosted runtime.

Local setup

Point Claude Code-style clients at one self-hosted endpoint.

For a default local runtime, use the gateway origin plus /v1. Start with one non-production request, then inspect logs, telemetry, and provider health before routing real work.

export ANTHROPIC_BASE_URL="http://127.0.0.1:18080/v1"
export ANTHROPIC_AUTH_TOKEN="$GATEWAY_API_KEY"
Open client integration details
AI Model Gateway overview workspace after routing Claude Code traffic

Scope

Evaluate the exact Claude Code workflow before relying on it.

The gateway supports Anthropic Messages-shaped traffic and bridge paths for selected OpenAI-compatible upstreams. It does not claim full coverage of every Anthropic product API, model feature, tool behavior, or streaming variant.

Good fit

  • You want Claude Code-style clients to enter a local gateway.
  • You need provider fallback and route telemetry for coding-agent traffic.
  • You want provider keys, routing policy, logs, and audit records to stay local.
  • You need preview, diff, publish history, and rollback for gateway config.

Check first

  • Your workflow depends on unsupported Anthropic product APIs.
  • Your client requires exact tool, multimodal, or streaming behavior from a specific upstream.
  • You need a hosted model marketplace to own provider billing and access.
  • You only need a lightweight wrapper without admin, telemetry, or rollback workflows.

Config workflow

Use generated snippets or dry-run local tool updates.

The CLI can print client snippets or apply supported config updates for local tools. Use dry-run mode first and keep backups enabled unless another system already owns those files.

  1. Start runtime. Use the release archive, Docker Compose path, or source build.
  2. Print snippets. Inspect generated Claude Code-style environment settings.
  3. Dry run. Use aigw clients apply -dry-run before changing local files.
  4. Smoke test. Send one request and inspect request logs, provider health, and telemetry.

Review evidence

Check installability, quality, and security before adopting it.

Release archive install

Try the packaged v1.4.4 runtime with checksum verification, local config, runtime directories, and supervised startup commands.

Open release install path

Quality evidence

Review CI gates, local reproduction commands, runtime smoke checks, feature proof points, and current capability boundaries.

Open quality evidence

Security and trust model

Inspect admin auth, same-origin browser writes, provider-key handling, SSRF defenses, telemetry sensitivity, and update trust.

Open security model

Next step

Route one Claude Code-style request, then decide whether the gateway earns a star.

Use a local gateway and non-production request first. If the project fits your self-hosted coding-agent routing workflow, starring the repository helps similar teams find it.