mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
docs: add extra operations to mermaid diagram
Co-authored-by: ishaan <ishaan@berri.ai>
This commit is contained in:
parent
108ed009fd
commit
bf36fa7652
1 changed files with 16 additions and 7 deletions
|
|
@ -16,23 +16,33 @@ sequenceDiagram
|
|||
|
||||
rect 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 URL
|
||||
end
|
||||
|
||||
rect 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 reconstruction
|
||||
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
|
||||
|
||||
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 → log
|
||||
end
|
||||
|
||||
Proxy-->>Client: Response (unchanged)
|
||||
|
|
@ -42,7 +52,6 @@ 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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue