Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/pass_through/azure_passthrough.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Pass-through endpoints for `/azure`

| Feature | Supported | Notes |
|-------|-------|-------|
| Cost Tracking | | Not supported |
| Cost Tracking | | v1 API paths only: `/v1/chat/completions`, `/v1/embeddings`, `/v1/images/generations`, `/v1/images/edits`, `/v1/responses`. Deployments-style paths (`/openai/deployments/...`) are logged without cost |
| Logging | ✅ | Works across all integrations |
| Streaming | ✅ | Fully supported |

Expand Down
2 changes: 1 addition & 1 deletion docs/pass_through/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ graph LR

- **Unified Authentication**: One API key for all providers
- **Centralized Logging**: All requests logged through LiteLLM
- **Cost Tracking**: Usage tracked across all endpoints
- **Cost Tracking**: Tracked where the provider page's overview table says so; other passthrough requests are logged without cost
- **Access Control**: Same permissions apply to passthrough endpoints
18 changes: 16 additions & 2 deletions docs/pass_through/openai_passthrough.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Pass-through endpoints for direct OpenAI API access

| Feature | Supported | Notes |
|-------|-------|-------|
| Cost Tracking | | Not supported |
| Cost Tracking | | Chat completions, embeddings, image generations, image edits, and the Responses API. Other endpoints are logged without cost |
| Logging | ✅ | Works across all integrations |
| Streaming | ✅ | Fully supported |

Expand Down Expand Up @@ -37,12 +37,26 @@ Simply replace `https://api.openai.com` with `LITELLM_PROXY_BASE_URL/openai_pass
Requirements:
Set `OPENAI_API_KEY` in your environment variables.

### Embeddings

Spend from passthrough embeddings calls is tracked and attributed to the calling key, just like the native `/embeddings` route

```bash
curl http://0.0.0.0:4000/openai_passthrough/v1/embeddings \
-H "Authorization: Bearer sk-anything" \
-H "Content-Type: application/json" \
-d '{
"model": "text-embedding-3-small",
"input": "hello world"
}'
```

### Assistants API

#### Create OpenAI Client

Make sure you do the following:
- Point `base_url` to your `LITELLM_PROXY_BASE_URL/openai`
- Point `base_url` to your `LITELLM_PROXY_BASE_URL/openai_passthrough`
- Use your `LITELLM_API_KEY` as the `api_key`

```python
Expand Down