Commit graph

24591 commits

Author SHA1 Message Date
Ishaan Jaff
7bd5ce595d test_provider_budgets_e2e_test_expect_to_fail 2025-07-19 16:00:25 -07:00
Ishaan Jaff
311d356520 test_qdrant_semantic_cache_async_set_cache 2025-07-19 15:59:56 -07:00
Ishaan Jaff
48dede9367 test_redis_proxy_batch_redis_get_cache 2025-07-19 15:58:25 -07:00
Ishaan Jaff
84595851b6 TestMistralCompletion 2025-07-19 15:37:13 -07:00
Ishaan Jaff
66a139a86a test_basic_openai_responses_api_streaming 2025-07-19 15:30:03 -07:00
Ishaan Jaff
14e0cf0e4c ui new build 2025-07-19 15:24:54 -07:00
Ishaan Jaff
8c258faeaf fix linting 2025-07-19 15:23:32 -07:00
Ishaan Jaff
1ab05cbd3c leftnav 2025-07-19 15:21:00 -07:00
Cole McIntosh
b04b456bc2
fix(proxy): Fix Model Armor project_id initialization order (#12766)
When using Model Armor guardrail with explicit project_id in config,
the project_id was being overwritten to None due to incorrect
initialization order between ModelArmorGuardrail and VertexBase parent class.

This fix ensures that user-provided project_id is preserved by initializing
parent classes before setting instance attributes.

Fixes #12757
2025-07-19 15:20:40 -07:00
Krish Dholakia
a89a49f1e1
Allow forwarding clientside headers by model group (#12753)
* feat: initial commit for forwarding client headers by model group

* fix(router.py): support new forwarclientsideheadersbymodelgroup class

enables headers to be forwarded to backend model, by model group

* fix(proxy_server.py): load in model group settings from config correctly

* refactor(litellm_pre_call_utils.py): litellm_pre_call_utils.py

introduce new 'secret_fields' field

includes raw request headers (not the sanitized ones used for logging) - needed to support forwarding clientside headers to llm api

* feat(router.py): log the deployment model name as well

allows wildcard models to support forward_client_headers_to_llm_api

* test(test_router.py): add more unit testing

* feat(router.py): specify the model group alias in metadata kwargs

allows usage for internal routing logic

* fix: fix ruff check errors

* fix(router.py): refactor to cleanup optional pre-call checks

* fix: fix ruff check

* test: add missing unit test
2025-07-19 15:17:13 -07:00
Ishaan Jaff
805fbf55a2
[QA] Disable Logging settings for Keys (#12774)
* fix keyData metadata access

* fix helpers
2025-07-19 15:15:44 -07:00
Cole McIntosh
bd134fa2db
Fix MoonshotChatConfig to address limitations of kimi-thinking-preview model by excluding additional parameters (#12772) 2025-07-19 15:10:57 -07:00
Ishaan Jaff
93badc72dc ui fix formatNumberWithCommas 2025-07-19 14:42:41 -07:00
Ishaan Jaff
76d461dcae fix add model 2025-07-19 14:32:41 -07:00
Jugal D. Bhatt
b443817a56
[Key Access] Litellm disabled callbacks for UI (#12769)
* add disabled callbacks to ui

* added body

* update edit settings

* add tests
2025-07-19 14:32:05 -07:00
Krish Dholakia
ee066481f8
UI - Support 'batch' model health checks + make 'team-only' model concept clearer (#12770)
* fix(add_model_modes.tsx): add 'batch' mode to ui

* fix(main.py): support health checks on batches + support litellm_credentials on batches

* fix(add_model_tab.tsx): clarify what 'team' on add model means
2025-07-19 14:30:38 -07:00
Jugal D. Bhatt
92c9e38eca
[JSON Logs] fix ciruclar ref error by adding safe dumps (#12764)
* fix ciruclar ref error by adding safe dumps

* fix ruff

* fix ruff

* Update spend_tracking_utils.py
2025-07-19 13:45:27 -07:00
Cole McIntosh
ceb4a143c9
fix: correct Groq model naming convention for moonshotai/kimi-k2-instruct (#12768)
- Changed groq/moonshotai-kimi-k2-instruct to groq/moonshotai/kimi-k2-instruct in model_prices_and_context_window.json
- Added groq/moonshotai/kimi-k2-instruct and groq/qwen-qwq-32b to the supported models table in Groq documentation
2025-07-19 13:36:40 -07:00
Ishaan Jaff
05af269425 Revert "ui fix linting"
This reverts commit 85184c7f82.
2025-07-19 12:42:45 -07:00
Ishaan Jaff
5c7e5d4324 Revert "Regenerate Key State Management and Authentication Issues (#12729)"
This reverts commit 663abbe275.
2025-07-19 12:42:20 -07:00
Krish Dholakia
e03bc3ec7e
feat(proxy_server.py): add model hub to the swagger (#12767)
user request
2025-07-19 12:33:57 -07:00
Ishaan Jaff
7e2546da2d docs vllm rerank 2025-07-19 12:11:50 -07:00
Ishaan Jaff
a305c4a54c docs vLLM Rerank 2025-07-19 12:11:19 -07:00
Ishaan Jaff
3ca3772ef0 docs Vector Stores 2025-07-19 11:55:58 -07:00
Ishaan Jaff
4b13e3e214
[Docs] 1.74.6.rc note (#12765)
* draft 1.74.6

* add correct models

* fix

* update moonshot pricing

* docs

* docs fix

* changes till HELM

* Helm Chart

* upto circular references

* docs Groq

* fix typo

* docs

* docs fix

* docs fix
2025-07-19 11:54:22 -07:00
Krish Dholakia
ab09d0621d
Litellm gemini grounding metadata stream (#12673)
* fix(prompt_templates/factory.py): handle anthropic cache control on individual tool results

Fixes issue where cache control on individual tool result was being ignored

* test(test_vertex_And_google_ai_studio_gemini.py): initial unit test covering translation for grounding metadata on streaming chunk

* fix(vertex_and_google_ai_studio.py): ensure grounding metadata is preserved on streaming

Closes https://github.com/BerriAI/litellm/issues/10237

* fix(core_helpers.py): include usage in expected openai keys
2025-07-19 11:52:12 -07:00
Krrish Dholakia
6d0e575f74 docs(docusaurus.config.js): route to new support onboarding form
gives user both slack + discord invites
2025-07-19 11:43:36 -07:00
Krish Dholakia
d72b3389a1
Bulk Edit Users on UI (#12763)
* feat(bulk_edit_user.tsx): initial working ui for editing users in bulk on the ui

easier to give access / assign to a default team

* feat(team_endpoints-+-bulk_edit_users.tsx): add bulk adding users to teams

make it easier to add existing users to a default team

* fix(bulk_edit_user.tsx): fix ui linting error

* fix: fix linting error
2025-07-19 11:04:23 -07:00
Ishaan Jaff
96f7eb6f78 bump litellm enterprise version 2025-07-19 10:12:33 -07:00
Ishaan Jaff
06574a72b5
[Feat] Backend - Add support for disabling callbacks in request body (#12762)
* allow using standard_callback_dynamic_params to disable callbacks

* fix is_callback_disabled_dynamically

* test_callback_disabled_via_request_body_multiple
2025-07-19 10:10:30 -07:00
tanjiro
657ca3b81a
Fix Y-axis labels overlap on Spend per Tag (#12754)
* fix spend per tag bar chart labels

* remove console.log
2025-07-19 09:40:40 -07:00
tanjiro
f8e5dc5034
copy button (#12760) 2025-07-19 09:39:14 -07:00
Ishaan Jaff
4915d15cca bump: version 1.74.5 → 1.74.6 2025-07-18 18:48:39 -07:00
Ishaan Jaff
d0af0db766 ui new build 2025-07-18 18:47:53 -07:00
Ishaan Jaff
c89fad06e0 fix vtx linting 2025-07-18 18:45:13 -07:00
Ishaan Jaff
85184c7f82 ui fix linting 2025-07-18 18:42:24 -07:00
Ishaan Jaff
7eca3efc92 Revert "ui fix linting"
This reverts commit 586918dddb.
2025-07-18 18:38:53 -07:00
Ishaan Jaff
02f987d63d Revert "fix linting ui"
This reverts commit 1ff766e738.
2025-07-18 18:38:44 -07:00
Ishaan Jaff
2880fc9837 add list of v0 models by provider 2025-07-18 18:37:48 -07:00
Ishaan Jaff
1ff766e738 fix linting ui 2025-07-18 18:36:44 -07:00
Ishaan Jaff
586918dddb ui fix linting 2025-07-18 18:35:32 -07:00
Ishaan Jaff
bf50544b97 fix code qa 2025-07-18 18:34:51 -07:00
Cole McIntosh
bf046c9d5d
feat: add v0 provider support (#12751)
* feat: add v0 provider support to LiteLLM

- Add v0 as a new OpenAI-compatible provider
- Support all three v0 models: v0-1.0-md, v0-1.5-md, v0-1.5-lg
- Configure correct token limits and pricing for each model
- Enable vision support for all v0 models (multimodal)
- Add provider detection for v0/ prefix and api.v0.dev endpoint
- Include comprehensive unit tests for the provider

The v0 provider uses the standard OpenAI-compatible implementation
and supports all standard features including streaming, function
calling, and system messages.

* fix: add v0 provider to ProviderConfigManager

Add V0ChatConfig to the get_provider_chat_config method to fix
test_supports_tool_choice test failure. The v0 provider needs to
be included in the provider config manager to return the correct
configuration for tool choice support detection.

* docs: add documentation for v0 provider

- Add comprehensive v0 provider documentation
- Cover all supported models and their capabilities
- Include examples for SDK usage, proxy configuration, and all features
- Document supported OpenAI parameters based on v0 API docs
- Add v0 to the providers sidebar navigation

* fix: correct v0 supported OpenAI parameters

Based on review feedback and v0 API documentation:
- v0 only supports: messages, model, stream, tools, tool_choice
- Remove unsupported parameters like temperature, max_tokens, etc.
- Update tests to verify correct parameter set
- Update documentation to reflect actual API capabilities
- Remove JSON mode example as response_format is not supported

Reference: https://v0.dev/docs/v0-model-api#request-body

* fix: remove supports_response_schema from v0 models

Remove the supports_response_schema property from all v0 models in the model configuration files as v0 does not support this feature.

Models updated:
- v0/v0-1.0-md
- v0/v0-1.5-md
- v0/v0-1.5-lg
2025-07-18 18:26:44 -07:00
Ishaan Jaff
81eb2fdd30
[Feat] UI Vector Stores - Allow adding Vertex RAG Engine, OpenAI, Azure (#12752)
* fix _pass_through_endpoint_without_required_model

* add get_litellm_managed_vector_store_from_registry

* undo router change

* fix for using router + vector search methods

* add simple helper for _update_request_data_with_litellm_managed_vector_store_registry

* add vector_stores routes

* test_router_avector_store_search_passes_correct_args

* [Feat] UI - Allow clicking into Vector Stores (#12741)

* Add View Vector Store

* add /info for vector store

* fix updated_at

* allow easily testing the KB on litellm

* fix

* rename test

* test_init_vector_store_api_endpoints

* add get_vertex_ai_project

* fixes to vertex transformation for RAG Engine

* fix vectorStoreProviderFields

* Add Vertex Rag engine

* add oai, azure

* fix validate_environment

* fix provider name

* fix tester

* working vertex vector store
2025-07-18 18:25:26 -07:00
Ishaan Jaff
5802a5bbe3
[Feat] LLM API Endpoint - Expose OpenAI Compatible /vector_stores/{vector_store_id}/search endpoint (#12749)
* fix _pass_through_endpoint_without_required_model

* add get_litellm_managed_vector_store_from_registry

* undo router change

* fix for using router + vector search methods

* add simple helper for _update_request_data_with_litellm_managed_vector_store_registry

* add vector_stores routes

* test_router_avector_store_search_passes_correct_args

* [Feat] UI - Allow clicking into Vector Stores (#12741)

* Add View Vector Store

* add /info for vector store

* fix updated_at

* allow easily testing the KB on litellm

* fix

* rename test

* test_init_vector_store_api_endpoints

* test_update_request_data_with_litellm_managed_vector_store_registry
2025-07-18 18:18:53 -07:00
Jugal D. Bhatt
8d35a00974
[LLM Translation] Added model name formats (#12745)
* Added model supports

* invert logic

* Added gpt 35 turbo check

* add test check

* fix ruff check
2025-07-18 17:08:35 -07:00
Jugal D. Bhatt
be60d12ff7
[LLM Translation - Redis] fix: redis caching for embedding response models (#12750)
* fix: redis caching for embedding responses

* add helper

* add mypy fixes

* lint fix

* review changes

* remove file

* fix ruff

* add if check

* add if check
2025-07-18 16:31:10 -07:00
Jugal D. Bhatt
c3c6255689
[LLM Translation] Change System prompts to assistant prompts as a workaround for GH Copilot (#12742)
* add changes for copilot

* Add test

* reverse flag settings

* add settings

* utils changes

* fix tests
2025-07-18 15:48:27 -07:00
dependabot[bot]
a1c06e9f23
build(deps): bump on-headers and compression in /docs/my-website (#12721)
Bumps [on-headers](https://github.com/jshttp/on-headers) and [compression](https://github.com/expressjs/compression). These dependencies needed to be updated together.

Updates `on-headers` from 1.0.2 to 1.1.0
- [Release notes](https://github.com/jshttp/on-headers/releases)
- [Changelog](https://github.com/jshttp/on-headers/blob/master/HISTORY.md)
- [Commits](https://github.com/jshttp/on-headers/compare/v1.0.2...v1.1.0)

Updates `compression` from 1.8.0 to 1.8.1
- [Release notes](https://github.com/expressjs/compression/releases)
- [Changelog](https://github.com/expressjs/compression/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/compression/compare/1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: on-headers
  dependency-version: 1.1.0
  dependency-type: indirect
- dependency-name: compression
  dependency-version: 1.8.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-18 15:20:01 -07:00
Cole McIntosh
d4f5180212
fix(lowest_latency.py): Handle ZeroDivisionError with zero completion tokens (#12734)
* fix(lowest_latency.py): Handle ZeroDivisionError with zero completion tokens (#12641)

Fixes ZeroDivisionError when LLM responses have zero completion tokens, which can
occur with Gemini models on very long contexts that only use tool calls.

Changes:
- Add check for completion_tokens > 0 before division in log_success_event
- Handle both timedelta and float types for response times (supporting both time.time() and datetime)
- Apply fix to both occurrences of the division operation in the file
- Add comprehensive tests for zero completion token scenarios

This ensures the lowest latency routing continues to work properly even when
models return responses with no completion tokens.

* test: Move lowest_latency zero tokens test to test_litellm for CI execution

* refactor: Use safe_divide helper to eliminate code duplication

- Added safe_divide utility function to litellm_core_utils.core_helpers
- Handles both timedelta and float types for numerator
- Prevents ZeroDivisionError and negative denominator issues
- Replaced duplicated division logic in lowest_latency.py
- Added comprehensive unit tests for safe_divide function

This improves code quality by reducing duplication and centralizing the
division safety logic in a reusable helper function.

* refactor: Rename to safe_divide_seconds for clarity

- Renamed safe_divide to safe_divide_seconds to better indicate it handles time durations
- Simplified implementation with single-line ternary for seconds conversion
- Updated all references and tests accordingly

The function name now clearly indicates it's specifically for dividing
time durations (in seconds) by a denominator.

* refactor: Simplify safe_divide_seconds to only accept float arguments

- Changed safe_divide_seconds to accept only float parameters for consistency
- Callers now handle timedelta to seconds conversion explicitly
- Removed timedelta-specific test cases

* fix: Remove unused timedelta import

* fix: Remove Union[timedelta, float] type annotations

Since safe_divide_seconds now only accepts floats, we handle the
timedelta conversion explicitly in the code. The type annotations
are no longer needed and can be simplified.

* Revert "fix: Remove Union[timedelta, float] type annotations"

This reverts commit 19c6c62154.

* fix: Clean up implementation

- Remove unnecessary type annotations
- Use safe_divide_seconds utility for zero-division protection
- Handle both timedelta and float types explicitly
- Maintain compatibility with both datetime and time.time() usage
2025-07-18 15:19:47 -07:00