The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
docs fix
Ishaan Jaffer6621c7b2ef78
diff --git a/litellm/proxy/pass_through_endpoints/architecture.md b/litellm/proxy/pass_through_endpoints/architecture.mdindex 064a443a2e7..f7dd8077ab5 100644--- a/litellm/proxy/pass_through_endpoints/architecture.md+++ b/litellm/proxy/pass_through_endpoints/architecture.md@@ -16,23 +16,33 @@ sequenceDiagramrect rgb(240, 240, 240)Note over Proxy: 1. URL Construction- Note over Proxy: Build: https://us-central1-aiplatform.googleapis.com/...+ Note over Proxy: Build regional/provider-specific URLendrect rgb(240, 240, 240)Note over Proxy: 2. Auth Header Replacement- Note over Proxy: Replace litellm key → provider credentials+ Note over Proxy: LiteLLM key → provider credentials+ end++ rect rgb(240, 240, 240)+ Note over Proxy: 3. Extra Operations+ Note over Proxy: • x-pass-* headers (strip prefix, forward)+ Note over Proxy: • x-litellm-tags → metadata+ Note over Proxy: • Guardrails (opt-in)+ Note over Proxy: • Multipart form reconstructionendProxy->>Provider: POST https://us-central1-aiplatform.googleapis.com/...Note over Proxy,Provider: Headers: Authorization: Bearer ya29.google-oauth...Note over Proxy,Provider: Body: { "contents": [...] } ← UNCHANGED- Provider-->>Proxy: Response-+ Provider-->>Proxy: Response (streaming or non-streaming)+rect rgb(240, 240, 240)- Note over Proxy: 3. Logging (async, optional)- Note over Proxy: Parse response → calculate cost → log+ Note over Proxy: 4. Response Handling (async)+ Note over Proxy: • Collect streaming chunks for logging+ Note over Proxy: • Cost injection (if enabled)+ Note over Proxy: • Parse response → calculate cost → logendProxy-->>Client: Response (unchanged)@@ -42,7 +52,17 @@ sequenceDiagram- **URL Construction** - Build correct provider URL (e.g., regional endpoints for Vertex AI, Bedrock)- **Auth Header Replacement** - Swap LiteLLM virtual key for actual provider credentials-- **Logging** (optional) - Parse response to extract usage and calculate cost++## Extra Operations++| Operation | Description |+|-----------|-------------|+| `x-pass-*` headers | Strip prefix and forward (e.g., `x-pass-anthropic-beta` → `anthropic-beta`) |+| `x-litellm-tags` header | Extract tags and add to request metadata for logging |+| Streaming chunk collection | Collect chunks async for logging after stream completes |+| Multipart form handling | Reconstruct multipart/form-data requests for file uploads |+| Guardrails (opt-in) | Run content filtering when explicitly configured |+| Cost injection | Inject cost into streaming chunks when `include_cost_in_streaming_usage` enabled |## What Does NOT Change