mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-05 01:59:27 +00:00
Adds the anthropic_google_cloud provider, which sends first-party Anthropic Messages API requests to
claude.googleapis.com/v1/projects/{project}/locations/global/workspaces/{workspace}/invoke with a Google
access token as the Bearer credential. It never sends x-api-key or anthropic-workspace-id and never reads
ANTHROPIC_API_KEY
The project comes from vertex_project, then ANTHROPIC_GOOGLE_CLOUD_PROJECT, then GOOGLE_CLOUD_PROJECT, then the
credentials. The workspace comes from workspace_id, then ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID. Chat completions and
/v1/messages both work, cost rows mirror the first-party rows that exist on this line, and inference_geo us costs 1.1x
First-party Anthropic API allowlists on this line (compaction, prompt caching, service tier, fast mode, proxy header
forwarding, exception mapping, web search cost, cost routing) now include the provider through one shared
FIRST_PARTY_ANTHROPIC_API_PROVIDERS set. Auth-only gates stay Anthropic-only
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| actions | ||
| assets/scaledown | ||
| codeql | ||
| e2e-stack | ||
| ISSUE_TEMPLATE | ||
| observatory | ||
| prompts | ||
| PULL_REQUEST_TEMPLATE | ||
| screenshots | ||
| scripts | ||
| workflows | ||
| ci-coverage-allowlist.yml | ||
| CODEOWNERS | ||
| dependabot.yaml | ||
| deploy-on-aws.png | ||
| deploy-on-gcp.png | ||
| deploy-to-aws.png | ||
| FUNDING.yml | ||
| issue-labels.json | ||
| mutmut-coverage.rc | ||
| template.yaml | ||