Skip to content

Commit bed6c79

Browse files
Merge branch 'main' into litellm_dev_09_30_2025_p1
2 parents a1a0e99 + e1ee428 commit bed6c79

File tree

220 files changed

+16766
-2604
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+16766
-2604
lines changed

.circleci/config.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,24 @@ jobs:
616616
wget https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-linux-amd64-v0.6.1.tar.gz
617617
sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-v0.6.1.tar.gz
618618
rm dockerize-linux-amd64-v0.6.1.tar.gz
619+
- run:
620+
name: Start PostgreSQL Database
621+
command: |
622+
docker run -d \
623+
--name postgres-db \
624+
-e POSTGRES_USER=postgres \
625+
-e POSTGRES_PASSWORD=postgres \
626+
-e POSTGRES_DB=circle_test \
627+
-p 5432:5432 \
628+
postgres:14
629+
- run:
630+
name: Wait for PostgreSQL to be ready
631+
command: dockerize -wait tcp://localhost:5432 -timeout 1m
632+
- run:
633+
name: Set DATABASE_URL environment variable
634+
command: |
635+
echo 'export DATABASE_URL="postgresql://postgres:postgres@localhost:5432/circle_test"' >> $BASH_ENV
636+
source $BASH_ENV
619637
- run:
620638
name: Run Security Scans
621639
command: |

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ echo 'LITELLM_SALT_KEY="sk-1234"' >> .env
273273
source .env
274274

275275
# Start
276-
docker-compose up
276+
docker compose up
277277
```
278278

279279

docker/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Replace `your-secret-key` with a strong, randomly generated secret.
2828
Once you have set the `MASTER_KEY`, you can build and run the containers using the following command:
2929

3030
```bash
31-
docker-compose up -d --build
31+
docker compose up -d --build
3232
```
3333

3434
This command will:
@@ -42,21 +42,21 @@ This command will:
4242
You can check the status of the running containers with the following command:
4343

4444
```bash
45-
docker-compose ps
45+
docker compose ps
4646
```
4747

4848
To view the logs of the `litellm` container, run:
4949

5050
```bash
51-
docker-compose logs -f litellm
51+
docker compose logs -f litellm
5252
```
5353

5454
### 4. Stopping the Application
5555

5656
To stop the running containers, use the following command:
5757

5858
```bash
59-
docker-compose down
59+
docker compose down
6060
```
6161

6262
## Troubleshooting

docs/my-website/docs/adding_provider/new_rerank_provider.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class YourProviderRerankConfig(BaseRerankConfig):
1717
# ... other supported params
1818
]
1919

20-
def transform_rerank_request(self, model: str, optional_rerank_params: OptionalRerankParams, headers: dict) -> dict:
20+
def transform_rerank_request(self, model: str, optional_rerank_params: Dict, headers: dict) -> dict:
2121
# Transform request to RerankRequest spec
2222
return rerank_request.model_dump(exclude_none=True)
2323

docs/my-website/docs/contributing.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ git clone https://github.com/BerriAI/litellm.git
1313

1414
Tell the proxy where the UI is located
1515
```bash
16-
export PROXY_BASE_URL="http://localhost:3000/"
17-
18-
### ALSO ### - set the basic env variables
1916
DATABASE_URL = "postgresql://<user>:<password>@<host>:<port>/<dbname>"
2017
LITELLM_MASTER_KEY = "sk-1234"
2118
STORE_MODEL_IN_DB = "True"
@@ -30,7 +27,7 @@ python3 proxy_cli.py --config /path/to/config.yaml --port 4000
3027

3128
Set the mode as development (this will assume the proxy is running on localhost:4000)
3229
```bash
33-
export NODE_ENV="development"
30+
npm install # install dependencies
3431
```
3532

3633
```bash

docs/my-website/docs/embedding/supported_embedding.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,59 @@ print(response)
266266
| Titan Embeddings - G1 | `embedding(model="amazon.titan-embed-text-v1", input=input)` |
267267
| Cohere Embeddings - English | `embedding(model="cohere.embed-english-v3", input=input)` |
268268
| Cohere Embeddings - Multilingual | `embedding(model="cohere.embed-multilingual-v3", input=input)` |
269+
| TwelveLabs Marengo (Async) | `embedding(model="bedrock/async_invoke/us.twelvelabs.marengo-embed-2-7-v1:0", input=input, input_type="text")` | [Async Invoke Docs](../providers/bedrock_embedding#async-invoke-embedding) |
269270

271+
## TwelveLabs Bedrock Embedding Models
272+
273+
TwelveLabs Marengo models support multimodal embeddings (text, image, video, audio) and require the `input_type` parameter to specify the input format.
274+
275+
### Usage
276+
277+
```python
278+
from litellm import embedding
279+
import os
280+
281+
# Set AWS credentials
282+
os.environ["AWS_ACCESS_KEY_ID"] = ""
283+
os.environ["AWS_SECRET_ACCESS_KEY"] = ""
284+
os.environ["AWS_REGION_NAME"] = "us-east-1"
285+
286+
# Text embedding
287+
response = embedding(
288+
model="bedrock/us.twelvelabs.marengo-embed-2-7-v1:0",
289+
input=["Hello world from LiteLLM!"],
290+
input_type="text" # Required parameter
291+
)
292+
293+
# Image embedding (base64)
294+
response = embedding(
295+
model="bedrock/async_invoke/us.twelvelabs.marengo-embed-2-7-v1:0",
296+
input=["data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ..."],
297+
input_type="image", # Required parameter
298+
output_s3_uri="s3://your-bucket/async-invoke-output/"
299+
)
300+
301+
# Video embedding (S3 URL)
302+
response = embedding(
303+
model="bedrock/async_invoke/us.twelvelabs.marengo-embed-2-7-v1:0",
304+
input=["s3://your-bucket/video.mp4"],
305+
input_type="video", # Required parameter
306+
output_s3_uri="s3://your-bucket/async-invoke-output/"
307+
)
308+
```
309+
310+
### Required Parameters
311+
312+
| Parameter | Description | Values |
313+
|-----------|-------------|--------|
314+
| `input_type` | Type of input content | `"text"`, `"image"`, `"video"`, `"audio"` |
315+
316+
### Supported Models
317+
318+
| Model Name | Function Call | Notes |
319+
|------------|---------------|-------|
320+
| TwelveLabs Marengo 2.7 (Sync) | `embedding(model="bedrock/us.twelvelabs.marengo-embed-2-7-v1:0", input=input, input_type="text")` | Text embeddings only |
321+
| TwelveLabs Marengo 2.7 (Async) | `embedding(model="bedrock/async_invoke/us.twelvelabs.marengo-embed-2-7-v1:0", input=input, input_type="text/image/video/audio")` | All input types, requires `output_s3_uri` |
270322

271323
## Cohere Embedding Models
272324
https://docs.cohere.com/reference/embed

docs/my-website/docs/mcp.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,25 @@ curl --location 'http://localhost:4000/github_mcp/mcp' \
10451045

10461046
---
10471047

1048+
## MCP Oauth
1049+
1050+
LiteLLM v 1.77.6 added support for OAuth 2.0 Client Credentials for MCP servers.
1051+
1052+
1053+
This configuration is currently available on the config.yaml, with UI support coming soon.
1054+
1055+
```yaml
1056+
mcp_servers:
1057+
github_mcp:
1058+
url: "https://api.githubcopilot.com/mcp"
1059+
auth_type: oauth2
1060+
authorization_url: https://github.com/login/oauth/authorize
1061+
token_url: https://github.com/login/oauth/access_token
1062+
client_id: os.environ/GITHUB_OAUTH_CLIENT_ID
1063+
client_secret: os.environ/GITHUB_OAUTH_CLIENT_SECRET
1064+
scopes: ["public_repo", "user:email"]
1065+
```
1066+
10481067
## Using your MCP with client side credentials
10491068

10501069
Use this if you want to pass a client side authentication token to LiteLLM to then pass to your MCP to auth to your MCP.

docs/my-website/docs/pass_through/vertex_ai.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ Pass-through endpoints for Vertex AI - call provider-specific endpoint, in nativ
1515

1616
## Supported Endpoints
1717

18-
LiteLLM supports 2 vertex ai passthrough routes:
18+
LiteLLM supports 3 vertex ai passthrough routes:
1919

2020
1. `/vertex_ai` → routes to `https://{vertex_location}-aiplatform.googleapis.com/`
2121
2. `/vertex_ai/discovery` → routes to [`https://discoveryengine.googleapis.com`](https://discoveryengine.googleapis.com/)
22+
3. `/vertex_ai/live` → upgrades to the Vertex AI Live API WebSocket (`google.cloud.aiplatform.v1.LlmBidiService/BidiGenerateContent`)
2223

2324
## How to use
2425

@@ -170,6 +171,50 @@ generateContent();
170171
</Tabs>
171172

172173

174+
## Vertex AI Live API WebSocket
175+
176+
LiteLLM can now proxy the Vertex AI Live API to help you experiment with streaming audio/text from Gemini Live models without exposing Google credentials to clients.
177+
178+
- Configure default Vertex credentials via `default_vertex_config` or environment variables (see examples above).
179+
- Connect to `wss://<PROXY_URL>/vertex_ai/live`. LiteLLM will exchange your saved credentials for a short-lived access token and forward messages bidirectionally.
180+
- Optional query params `vertex_project`, `vertex_location`, and `model` let you override defaults for multi-project setups or global-only models.
181+
182+
```python title="client.py"
183+
import asyncio
184+
import json
185+
186+
from websockets.asyncio.client import connect
187+
188+
189+
async def main() -> None:
190+
headers = {
191+
"x-litellm-api-key": "Bearer sk-your-litellm-key",
192+
"Content-Type": "application/json",
193+
}
194+
async with connect(
195+
"ws://localhost:4000/vertex_ai/live",
196+
additional_headers=headers,
197+
) as ws:
198+
await ws.send(
199+
json.dumps(
200+
{
201+
"setup": {
202+
"model": "projects/your-project/locations/us-central1/publishers/google/models/gemini-2.0-flash-live-preview-04-09",
203+
"generation_config": {"response_modalities": ["TEXT"]},
204+
}
205+
}
206+
)
207+
)
208+
209+
async for message in ws:
210+
print("server:", message)
211+
212+
213+
if __name__ == "__main__":
214+
asyncio.run(main())
215+
```
216+
217+
173218
## Quick Start
174219

175220
Let's call the Vertex AI [`/generateContent` endpoint](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference)
@@ -415,4 +460,4 @@ generateContent();
415460
```
416461

417462
</TabItem>
418-
</Tabs>
463+
</Tabs>

0 commit comments

Comments
 (0)