Claude Code
Anthropic Messages, token counting, model discovery, tools, and streaming with strict compatibility checks.
ANTHROPIC_BASE_URLSelf-hosted routing control plane
Point Claude Code, Codex, Copilot CLI BYOK, SDKs, and HTTP clients at one base URL. Select an exact provider model or an ordered endpoint that can move past throttling and outages.
Addressing
A model selector has one explicit meaning. No weighted scheduler, hidden classifier, or fabricated quota signal decides for you.
provider/modelSend a request to one exact configured provider and native model ID. Provider retry policy may retry that target, but the gateway does not move it to another model.
endpointGive an ordered list of pinned targets a stable name. Eligible Chat, Responses fallback, and adapted Messages requests can advance before output starts.
Interfaces
Core protocol surfaces stay recognizable to coding CLIs and SDKs. Unsupported or lossy translated behavior fails before provider dispatch.
Anthropic Messages, token counting, model discovery, tools, and streaming with strict compatibility checks.
ANTHROPIC_BASE_URLA custom Responses provider with native state semantics when the selected target actually supports them.
wire_api = "responses"Explicit Chat or Responses wire selection and exact wire model, without silently deleting native tools.
COPILOT_PROVIDER_WIRE_APIChat Completions, Responses, models, embeddings, transcription, speech, image, and video.
/v1/chat/completionsNative or strictly adapted Messages plus native or marked estimated token counting.
/v1/messagesEmbedded provider, endpoint, key, access, usage, policy, alert, audit, and owner workflows.
/console · /portalAuthenticated quickstart
No clone or build required. Put this compose.yaml in your own private installation folder, replace <VERSION> with the latest release number without its leading v, and generate its .env once. Then run docker compose up -d and open http://127.0.0.1:8787/console. Keep the folder, keys and state volume for restarts and upgrades.
services:
gateway:
image: ghcr.io/kayiik/llm-gateway:<VERSION>
ports:
- "127.0.0.1:${LLMGW_PORT:-8787}:8787"
environment:
LLMGW_API_KEY: ${LLMGW_API_KEY:?set LLMGW_API_KEY in .env}
LLMGW_CREDENTIAL_ENCRYPTION_KEY: ${LLMGW_CREDENTIAL_ENCRYPTION_KEY:?set LLMGW_CREDENTIAL_ENCRYPTION_KEY in .env}
LLMGW_ANONYMOUS_PROVIDER_AUTOMATION: ${LLMGW_ANONYMOUS_PROVIDER_AUTOMATION:-false}
volumes:
- state:/state
restart: unless-stopped
volumes:
state:
Provider registry
Registry support describes a configuration path. Your account, deployment, location, model, and entitlement still require a catalog sync and real test completion.
Request-path governance
Humans, services, projects, memberships, and keys resolve before routing. Project and key policy intersect; an empty eligible target set fails closed.
Single-node operations
Operational state is local and explicit: inspectable backups, bounded history, crash recovery, immutable build identity, and verified release artifacts.
Checkpoint configured SQLite databases, catalog, config, recognized OAuth cache, and legacy state into a bounded archive.
llmgw backup createValidate before replacement, recover an interrupted prepared transaction, and reject newer unsupported schemas.
backup restore --forceBatch-prune old usage, telemetry, audit, delivered outbox, completed quota periods, logs, and verified backups.
LLMGW_RETENTION_*CLI, health, admin state, binaries, and images carry the same version, commit, and commit-derived time.
llmgw versionEight archives, SPDX SBOMs, verified checksums, GitHub provenance, and two-architecture image attestations.
SHA256SUMSQuota and key-expiry rules enqueue deduplicated work for an operator-owned external delivery worker.
/admin/api/outboxExplicit boundaries
Apache-2.0 · self-hosted
Run the published Linux amd64/arm64 image, or download a native binary for Windows, Linux or macOS. No source build needed. Start on loopback and configure your provider in the embedded console.