Commit graph

33141 commits

Author SHA1 Message Date
yuneng-jiang
96cb2efedb Adding proxy_server 2026-01-29 13:05:38 -08:00
yuneng-jiang
e080f92b7f Adding tests 2026-01-29 13:05:07 -08:00
yuneng-jiang
d081e01ed0 Show spend logs settings + allow delete of rentention period 2026-01-29 12:59:42 -08:00
yuneng-jiang
158e1e32d1 error_code in spend logs error metadata 2026-01-29 11:43:18 -08:00
yuneng-jiang
42081a57db
Merge pull request #19886 from BerriAI/litellm_bulk_edit_keys
[Feature] Bulk Update Keys Endpoint
2026-01-29 09:07:58 -08:00
yuneng-jiang
bc23a97e14
Merge pull request #19971 from BerriAI/litellm_v2_model_info_sorting_fix
[Fix] Sorting for /v2/model/info
2026-01-29 09:07:28 -08:00
Varun Sripad
8b6bcfc9ec fix(gemini): support file retrieval in GoogleAIStudioFilesHandler 2026-01-29 10:03:07 -06:00
Takumi Matsuzawa
fa54c241e0 Fix max_input_tokens for gpt-5.2-codex 2026-01-29 15:39:17 +00:00
Sameer Kankute
7c4577b2ad
Merge pull request #19988 from BerriAI/litellm_gemini_robotics_llm_provider2
Add custom_llm_provider as gemini translation
2026-01-29 18:12:03 +05:30
Sameer Kankute
bd4918c9c8
Merge pull request #19906 from BerriAI/litellm_oss_staging_01_28_2026
oss staging 01/28/2026
2026-01-29 17:47:35 +05:30
Sameer Kankute
df072979e5
Merge branch 'main' into litellm_oss_staging_01_28_2026 2026-01-29 17:39:42 +05:30
Sameer Kankute
a2fd56f007
Merge pull request #19997 from BerriAI/litellm_fix_robotic_model_map_entry
Fix: litellm_fix_robotic_model_map_entry
2026-01-29 17:27:40 +05:30
Sameer Kankute
ef15861fde Fix: litellm_fix_robotic_model_map_entry 2026-01-29 17:26:50 +05:30
Sameer Kankute
4aa786b04e
Merge pull request #19994 from BerriAI/litellm_add_model_map_test
Intentional bad model map
2026-01-29 16:34:26 +05:30
Sameer Kankute
45867ba934 Correct model map path 2026-01-29 16:33:50 +05:30
Sameer Kankute
0beaec0757 Intentional bad model map 2026-01-29 16:29:36 +05:30
Sameer Kankute
f55ed3f945 Intentional bad model map 2026-01-29 16:26:46 +05:30
Sameer Kankute
350349188b
Merge pull request #19993 from BerriAI/litellm_add_model_map_test
Intentional bad model map
2026-01-29 16:26:23 +05:30
Sameer Kankute
b0dec49e9a Remove validate job from lint 2026-01-29 16:26:00 +05:30
Sameer Kankute
39dea34dfa Add Validate model_prices_and_context_window.json job 2026-01-29 16:25:10 +05:30
Sameer Kankute
5dea545c65 Intentional bad model map 2026-01-29 16:17:33 +05:30
Sameer Kankute
6997ee8e34
Merge pull request #19992 from BerriAI/litellm_add_model_map_test
Add test to check if model map is corretly formatted
2026-01-29 16:16:59 +05:30
Sameer Kankute
fa80dc610d Add test to check if model map is corretly formatted 2026-01-29 16:14:32 +05:30
Sameer Kankute
8808e4d7ac Add /openai_passthrough route for openai passthrough requests: 2026-01-29 16:07:45 +05:30
Sameer Kankute
5270aa58bb Add custom_llm_provider as gemini translation 2026-01-29 15:49:30 +05:30
Sameer Kankute
fce26352b6 Add cost tacking and usage info in call_type=aretrieve_batch 2026-01-29 15:27:41 +05:30
Sameer Kankute
4b385e5b32 Add litellm metadata correctly for file create 2026-01-29 15:20:31 +05:30
Sameer Kankute
98ae6dc831 Fix lint issues 2026-01-29 12:47:10 +05:30
Sameer Kankute
d3b2afbbe4 Fix: mypy errors 2026-01-29 12:42:30 +05:30
Sameer Kankute
fa2b065238 Add tests for user level permissions on file and batch access 2026-01-29 12:29:10 +05:30
Sameer Kankute
8966852c86 Fix: Encoding cancel batch response 2026-01-29 12:18:43 +05:30
Aaron Yim
d4031c8ba6
Add OpenRouter Kimi K2.5 (#19872)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 22:34:48 -08:00
Christopher Chase
87bdfb0253
fix(hosted_vllm): route through base_llm_http_handler to support ssl_verify (#19893)
* fix(hosted_vllm): route through base_llm_http_handler to support ssl_verify

The hosted_vllm provider was falling through to the OpenAI catch-all path
which doesn't pass ssl_verify to the HTTP client. This adds an explicit
elif branch that routes hosted_vllm through base_llm_http_handler.completion()
which properly passes ssl_verify to the httpx client.

- Add explicit hosted_vllm branch in main.py completion()
- Add ssl_verify tests for sync and async completion
- Update existing audio_url test to mock httpx instead of OpenAI client

* feat(hosted_vllm): add embedding support with ssl_verify

- Add HostedVLLMEmbeddingConfig for embedding transformations
- Register hosted_vllm embedding config in utils.py
- Add lazy import for embedding transformation module
- Add unit test for ssl_verify parameter handling
2026-01-28 22:33:07 -08:00
Bernardo Donadio
ba17f51812
fix(proxy): prevent provider-prefixed model leaks (#19943)
* fix(proxy): prevent provider-prefixed model leaks

Proxy clients should not see LiteLLM internal provider prefixes (e.g. hosted_vllm/...) in the OpenAI-compatible response model field.

This patch sanitizes the client-facing model name for both:
- Non-streaming responses returned from base_process_llm_request
- Streaming SSE chunks emitted by async_data_generator

Adds regression tests covering vLLM-style hosted_vllm routing for both streaming and non-streaming paths.

* chore(lint): suppress PLR0915 in proxy handler

Ruff started flagging ProxyBaseLLMRequestProcessing.base_process_llm_request() for too many statements after the hotpatch changes.

Add an explicit '# noqa: PLR0915' on the function definition to avoid a large refactor in a hotpatch.

* refactor(proxy): make model restamp explicit

Replace silent try/except/pass and type ignores with explicit model restamping.

- Logs an error when the downstream response model differs from the client-requested model
- Overwrites the OpenAI `model` field to the client-requested value to avoid leaking internal provider-prefixed identifiers
- Applies the same behavior to streaming chunks, logging the mismatch only once per stream

* chore(lint): drop PLR0915 suppression

The model restamping bugfix made `base_process_llm_request()` slightly exceed Ruff's
PLR0915 (too-many-statements) threshold, requiring a `# noqa` suppression.

Collapse consecutive `hidden_params` extractions into tuple unpacking so the
function falls back under the lint limit and remove the suppression.

No functional change intended; this keeps the proxy model-field bugfix intact
while aligning with project linting rules.

* chore(proxy): log model mismatches as warnings

These model-restamping logs are intentionally verbose: a mismatch is a useful signal
that an internal provider/deployment identifier may be leaking into the public
OpenAI response `model` field.

- Downgrade model mismatch logs from error -> warning
- Keep error logs only for cases where the proxy cannot read/override the model

* fix(proxy): preserve client model for streaming aliasing

Pre-call processing can rewrite request_data['model'] via model alias maps.\n\nOur streaming SSE generator was using the rewritten value when restamping chunk.model, which caused the public 'model' field to differ between streaming and non-streaming responses for alias-based requests.\n\nStash the original client model in request_data as _litellm_client_requested_model after the model has been routed, and prefer it when overriding the outgoing chunk model. Add a regression test for the alias-mapping case.

* chore(lint): satisfy PLR0915 in streaming generator

Ruff started flagging async_data_generator() for too many statements after adding model restamping logic.\n\nExtract the client-model selection + chunk restamping into small helpers to keep behavior unchanged while meeting the project's PLR0915 threshold.
2026-01-28 22:26:38 -08:00
michelligabriele
dcf5f07e5e
fix(proxy): add datadog_llm_observability to /health/services allowed list (#19952)
The /health/services endpoint rejected datadog_llm_observability as an
unknown service, even though it was registered in the core callback
registry and __init__.py. Added it to both the Literal type hint and
the hardcoded validation list in the health endpoint.
2026-01-28 22:16:27 -08:00
Sameer Kankute
654edbd15c Fix Only allowed to call routes: ['llm_api_routes']. Tried to call route: /batches/bGl0ZWxsbV9wcm/cancel 2026-01-29 11:42:49 +05:30
Sameer Kankute
70684ca86f Fix File access permissions for .retreive and .delete 2026-01-29 11:19:24 +05:30
Cesar Garcia
2a48d12507
fix(docker): add libsndfile to main Dockerfile for ARM64 audio processing (#19776)
Fixes #16920 for users of the stable release images.

The previous fix (PR #18092) added libsndfile to docker/Dockerfile.alpine,
but stable releases are built from the main Dockerfile (Wolfi-based),
not the Alpine variant.
2026-01-28 21:33:41 -08:00
Cesar Garcia
c7453c01f9
Fix stream_chunk_builder to preserve images from streaming chunks (#19654)
Fixes #19478

The stream_chunk_builder function was not handling image chunks from
models like gemini-2.5-flash-image. When streaming responses were
reconstructed (e.g., for caching), images in delta.images were lost.

This adds handling for image_chunks similar to how audio, annotations,
and other delta fields are handled.
2026-01-28 21:31:06 -08:00
Sameer Kankute
833cf6a2cf Fix: Batch cancellation ownership bug 2026-01-29 10:54:42 +05:30
yuneng-jiang
f2d2ed5a0d
Merge pull request #19953 from BerriAI/litellm_key_alias_spend_usage_report
[Feature] UI - Usage Export: Breakdown by Teams and Keys
2026-01-28 20:29:22 -08:00
yuneng-jiang
507f4c45a0
Merge pull request #19976 from BerriAI/ui_build_yj_2
[Infra] Remove _experimental/out routes from gitignore + UI Build
2026-01-28 20:15:06 -08:00
yuneng-jiang
12a4d14980 chore: update Next.js build artifacts (2026-01-29 04:12 UTC, node v22.16.0) 2026-01-28 20:12:20 -08:00
yuneng-jiang
20bab33e36 removing _experimental out routes from gitignore 2026-01-28 20:11:35 -08:00
Harshit Jain
8e2fa7969c
Fix/router search tools v2 (#19840)
* fix(proxy_server): pass search_tools to Router during DB-triggered initialization

* fix search tools from db

* add missing statement to handle from db

* fix import issues to pass lint errors
2026-01-28 19:45:35 -08:00
Cesar Garcia
8a26033a4b
fix(vertex_ai): convert image URLs to base64 in tool messages for Anthropic (#19896)
* fix(vertex_ai): convert image URLs to base64 in tool messages for Anthropic

Fixes #19891

Vertex AI Anthropic models don't support URL sources for images. LiteLLM
already converted image URLs to base64 for user messages, but not for tool
messages (role='tool'). This caused errors when using ToolOutputImage with
image_url in tool outputs.

Changes:
- Add force_base64 parameter to convert_to_anthropic_tool_result()
- Pass force_base64 to create_anthropic_image_param() for tool message images
- Calculate force_base64 in anthropic_messages_pt() based on llm_provider
- Add unit tests for tool message image handling

* chore: remove extra comment from test file header
2026-01-28 19:42:51 -08:00
Sameer Kankute
2a1bfd39aa
Merge pull request #19974 from BerriAI/litellm_model_map_fix_jan_29
fix gemini gemini-robotics-er-1.5-preview entry
2026-01-29 09:07:54 +05:30
Sameer Kankute
be8a76f270 fix gemini gemini-robotics-er-1.5-preview entry 2026-01-29 09:06:44 +05:30
rushilchugh01
562f0a0282
feat: Add new OpenRouter models: xiaomi/mimo-v2-flash, z-ai/glm-4.7, z-ai/glm-4.7-flash, and minimax/minimax-m2.1. to model prices and context window (#19938)
Co-authored-by: Rushil Chugh <Rushil>
2026-01-28 18:56:20 -08:00
Ishaan Jaff
9c5fed4f52
[Feat] LiteLLM Vector Stores - Add permission management for users, teams (#19972)
* fix: create_vector_store_in_db

* add team/user to LiteLLM_ManagedVectorStore

* add _check_vector_store_access

* add new fields

* test_check_vector_store_access

* add vector_store/list endpoints

* fix code QA checks
2026-01-28 18:55:40 -08:00