Skip to content

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]

docs fix

Ishaan Jaffer26d85739f59a
diff --git a/litellm/proxy/pass_through_endpoints/architecture.md b/litellm/proxy/pass_through_endpoints/architecture.md
new file mode 100644
index 00000000000..064a443a2e7
--- /dev/null
+++ b/litellm/proxy/pass_through_endpoints/architecture.md
@@ -0,0 +1,51 @@
+# Pass-Through Endpoints Architecture
+
+## Why Pass-Through Endpoints Transform Requests
+
+Even "pass-through" endpoints must perform essential transformations. The request **body** passes through unchanged, but:
+
+```mermaid
+sequenceDiagram
+ participant Client
+ participant Proxy as LiteLLM Proxy
+ participant Provider as LLM Provider
+
+ Client->>Proxy: POST /vertex_ai/v1/projects/.../generateContent
+ Note over Client,Proxy: Headers: Authorization: Bearer sk-litellm-key
+ Note over Client,Proxy: Body: { "contents": [...] }
+
+ rect rgb(240, 240, 240)
+ Note over Proxy: 1. URL Construction
+ Note over Proxy: Build: https://us-central1-aiplatform.googleapis.com/...
+ end
+
+ rect rgb(240, 240, 240)
+ Note over Proxy: 2. Auth Header Replacement
+ Note over Proxy: Replace litellm key → provider credentials
+ end
+
+ Proxy->>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
+
+ rect rgb(240, 240, 240)
+ Note over Proxy: 3. Logging (async, optional)
+ Note over Proxy: Parse response → calculate cost → log
+ end
+
+ Proxy-->>Client: Response (unchanged)
+```
+
+## Essential Transformations
+
+- **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
+
+## What Does NOT Change
+
+- Request body
+- Response body
+- Provider-specific parameters
\ No newline at end of file