mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
Adds a 'passthrough' feature row to the Claude Code compat matrix that
drives the real claude CLI in each cloud's native mode against
LiteLLM's passthrough routes (the LLM-gateway setup from
code.claude.com/docs/en/gateway) instead of the /v1/messages
translation layer:
- anthropic: ANTHROPIC_BASE_URL={proxy}/anthropic, forwarded verbatim
to api.anthropic.com
- bedrock_invoke: CLAUDE_CODE_USE_BEDROCK=1 against {proxy}/bedrock;
the router resolves the alias in /model/{alias}/invoke-with-response-stream
- vertex_ai: CLAUDE_CODE_USE_VERTEX=1 against {proxy}/vertex_ai/v1;
alias, project, location and credentials resolve from the deployment,
which now sets use_in_pass_through: true (and the canonical
vertex_project/vertex_location param names) in test_config.yaml
- azure: CLAUDE_CODE_USE_FOUNDRY=1 against {proxy}/azure via the
AZURE_API_BASE/AZURE_API_KEY fallback (documented in the cron env
example)
- bedrock_converse: not_applicable; Claude Code has no Converse-wire
client
The shared cell body lives in _passthrough.py with injectable runner
and env (no monkeypatching), unit-covered in
_driver_unit_tests/test_passthrough.py including pins on the per-mode
CLI env contracts captured from a real claude CLI (2.1.210) run
against a request-logging sink.
59 lines
2.3 KiB
Text
59 lines
2.3 KiB
Text
# Environment file consumed by `litellm-compat-matrix.service`.
|
|
#
|
|
# Install at `/etc/litellm-compat-matrix.env` and chmod 0600.
|
|
# `EnvironmentFile=-` in the unit means the service is allowed to start
|
|
# even if this file is missing, but the populator will fail at the
|
|
# first provider request without these credentials.
|
|
|
|
# Anthropic
|
|
ANTHROPIC_API_KEY=
|
|
|
|
# Bedrock (invoke + converse columns).
|
|
# Use Anthropic's Bedrock API-key passthrough (long-lived bearer token).
|
|
# No AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY required for the matrix --
|
|
# both the LiteLLM invoke and converse routes pick up
|
|
# AWS_BEARER_TOKEN_BEDROCK when present.
|
|
AWS_BEARER_TOKEN_BEDROCK=
|
|
AWS_REGION_NAME=us-east-1
|
|
|
|
# Vertex AI.
|
|
# On the GCP VM, the default service-account ADC from the metadata server
|
|
# is used -- no JSON key file is needed. If you ever need to run outside
|
|
# GCP, also export GOOGLE_APPLICATION_CREDENTIALS=/path/to/sa.json.
|
|
VERTEXAI_PROJECT=
|
|
VERTEXAI_LOCATION=global
|
|
|
|
# Microsoft Foundry (Azure column)
|
|
AZURE_FOUNDRY_API_KEY=
|
|
AZURE_FOUNDRY_API_BASE=
|
|
|
|
# Azure cell of the `passthrough` row. Foundry-mode Claude Code sends
|
|
# the model in the request body, so the proxy's /azure passthrough
|
|
# cannot resolve a router alias and falls back to these env vars.
|
|
# AZURE_API_BASE is the Foundry resource's Anthropic surface, i.e.
|
|
# https://<resource>.services.ai.azure.com/anthropic ; AZURE_API_KEY
|
|
# is the same key as AZURE_FOUNDRY_API_KEY.
|
|
AZURE_API_BASE=
|
|
AZURE_API_KEY=
|
|
|
|
# REQUIRED for publishing: PAT for the `agent-shin` user, used to push
|
|
# the daily compat-matrix branch to its fork (agent-shin/litellm-docs)
|
|
# and open the cross-repo PR against BerriAI/litellm-docs. Scopes:
|
|
# classic `repo` + `workflow`, or fine-grained on agent-shin/litellm-docs
|
|
# with Contents:RW + Pull requests:RW + Workflows:RW.
|
|
# Skip by setting SKIP_PUBLISH=1 (publishes nothing; only writes the
|
|
# matrix JSON locally).
|
|
AGENT_SHIN_GITHUB_TOKEN=
|
|
|
|
# Optional: lifts the unauthenticated rate limit on the GitHub Releases
|
|
# API used by `resolver.py`. Any token works (read-only). Not required.
|
|
# GITHUB_TOKEN=
|
|
|
|
# Optional overrides; defaults are sensible for the cron VM.
|
|
# PROXY_PORT=4100
|
|
# LITELLM_WORKTREE=/home/mateo/litellm-cron-worktree
|
|
# DOCS_REPO=BerriAI/litellm-docs
|
|
# DOCS_BRANCH=main
|
|
# DOCS_TARGET_PATH=src/data/compatibility-matrix.json
|
|
# FORK_OWNER=agent-shin
|
|
# FORK_REPO=agent-shin/litellm-docs
|