Commit graph

5263 commits

Author SHA1 Message Date
Ishaan Jaffer
6784326ec0 fix DYNAMIC_RATE_LIMIT_ERROR_THRESHOLD_PER_MINUTE 2025-10-17 18:07:12 -07:00
Ishaan Jaff
3852fc96c1
[Oct Staging Branch] (#15460)
* Implement fix for thinking_blocks and converse API calls

This fixes Claude's models via the Converse API, which should also fix
Claude Code.

* Add thinking literal

* Fix mypy issues

* Type fix for redacted thinking

* Add voyage model integration in sagemaker

* Add config file logic

* Use already exiting voyage transformation

* refactor code as per comments

* fix merge error

* refactor code as per comments

* refactor code as per comments

* UI new build

* [Fix] router - regression when adding/removing models  (#15451)

* fix(router): update model_name_to_deployment_indices on deployment removal

When a deployment is deleted, the model_name_to_deployment_indices map
was not being updated, causing stale index references. This could lead
to incorrect routing behavior when deployments with the same model_name
were dynamically removed.

Changes:
- Update _update_deployment_indices_after_removal to maintain
  model_name_to_deployment_indices mapping
- Remove deleted indices and decrement indices greater than removed index
- Clean up empty entries when no deployments remain for a model name
- Update test to verify proper index shifting and cleanup behavior

* fix(router): remove redundant index building during initialization

Remove duplicate index building operations that were causing unnecessary
work during router initialization:

1. Removed redundant `_build_model_id_to_deployment_index_map` call in
   __init__ - `set_model_list` already builds all indices from scratch

2. Removed redundant `_build_model_name_index` call at end of
   `set_model_list` - the index is already built incrementally via
   `_create_deployment` -> `_add_model_to_list_and_index_map`

Both indices (model_id_to_deployment_index_map and
model_name_to_deployment_indices) are properly maintained as lookup
indexes through existing helper methods. This change eliminates O(N)
duplicate work during initialization without any behavioral changes.

The indices continue to be correctly synchronized with model_list on
all operations (add/remove/upsert).

* fix(prometheus): Fix Prometheus metric collection in a multi-workers environment (#14929)

Co-authored-by: sotazhang <sotazhang@tencent.com>

* Add tiered pricing and cost calculation for xai

* Use generic cost calculator

* Resolve conflicts in generated HTML files

* Remove penalty params as supported params for gemini preview model (#15503)

* fix conversion of thinking block

* add application level encryption in SQS (#15512)

* docs: fix doc

* docs(index.md): bump rc

* [Fix] GEMINI - CLI -  add google_routes to llm_api_routes (#15500)

* fix: add google_routes to llm_api_routes

* test: test_virtual_key_llm_api_routes_allows_google_routes

* build: bump version

* bump: version 1.78.0 → 1.78.1

* add application level encryption in SQS

* add application level encryption in SQS

---------

Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>
Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
Co-authored-by: deepanshu <deepanshu.lulla@hq.bill.com>

* [Feat] Bedrock Knowledgebase - return search_response when using /chat/completions API with LiteLLM (#15509)

* docs: fix doc

* docs(index.md): bump rc

* [Fix] GEMINI - CLI -  add google_routes to llm_api_routes (#15500)

* fix: add google_routes to llm_api_routes

* test: test_virtual_key_llm_api_routes_allows_google_routes

* add AnthropicCitation

* fix async_post_call_success_deployment_hook

* fix add vector_store_custom_logger to global callbacks

* test_e2e_bedrock_knowledgebase_retrieval_with_llm_api_call

* async_post_call_success_deployment_hook

* add async_post_call_streaming_deployment_hook

* async def test_e2e_bedrock_knowledgebase_retrieval_with_llm_api_call_streaming(setup_vector_store_registry):

* fix _call_post_streaming_deployment_hook

* fix async_post_call_streaming_deployment_hook

* test update

* docs: Accessing Search Results

* docs KB

* fix chatUI

* fix searchResults

* fix onSearchResults

* fix kb

---------

Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>

* [Feat] Add dynamic rate limits on LiteLLM Gateway  (#15518)

* docs: fix doc

* docs(index.md): bump rc

* [Fix] GEMINI - CLI -  add google_routes to llm_api_routes (#15500)

* fix: add google_routes to llm_api_routes

* test: test_virtual_key_llm_api_routes_allows_google_routes

* build: bump version

* bump: version 1.78.0 → 1.78.1

* fix: KeyRequestBase

* fix rpm_limit_type

* fix dynamic rate limits

* fix use dynamic limits here

* fix _should_enforce_rate_limit

* fix _should_enforce_rate_limit

* fix counter

* test_dynamic_rate_limiting_v3

* use _create_rate_limit_descriptors

---------

Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>

* Add google rerank endpoint

* Add docs

* fix mypy error

* fix mypy and lint errors

* Add haiku 4.5 integration

* Add haiku 4.5 integration for other regions as well

* Handle citation field correctly

* Fix filtering headers for signature calcs

* Add haiku 4.5 integration (#15650)

---------

Co-authored-by: Leslie Cheng <leslie.cheng5@gmail.com>
Co-authored-by: Sameer Kankute <sameer@berri.ai>
Co-authored-by: Alexsander Hamir <alexsanderhamirgomesbaptista@gmail.com>
Co-authored-by: Lucas <10226902+LoadingZhang@users.noreply.github.com>
Co-authored-by: sotazhang <sotazhang@tencent.com>
Co-authored-by: Deepanshu Lulla <deepanshu.lulla@gmail.com>
Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>
Co-authored-by: deepanshu <deepanshu.lulla@hq.bill.com>
2025-10-17 17:52:25 -07:00
Alexsander Hamir
eee28a7af8
fix: add missing context (#15688) 2025-10-17 17:39:21 -07:00
Ishaan Jaff
a8be3ae412
[Feat] Add Cost Tracking for /ocr endpoints (#15678)
* mistral/mistral-ocr-latest

* fix: add _hidden_params to OCRResponses

* test: hidden params exists

* feat: add mistral/mistral-ocr-2505-completion

* fix test

* add ModelInfoBase fields

* fix get OCR cost

* check response cost from OCR

* add handling for OCR costs

* add mistral-document-ai-2505

* docs OCR

* ruff check fix
2025-10-17 15:54:10 -07:00
Krish Dholakia
3ff073c811
UI - add arize on ui, LLMs - clarifai refactor to openai compatible route, added azure ai/grok-4 model family
* added oauth mcp to docs

* added azure ai/grok-4 model family

* Revert "added oauth mcp to docs"

This reverts commit 950b7cef44.

* fix: arize ui integration

* need to remove a file

This reverts commit d6c877b73a.

* fix: add arize from ui

* updated clarifai functions to openai compatible (#15615)

* fix: npm build errors

* Snowflake provider support: added embeddings, PAT, account_id (#15372)

* snowflake support PAT, account_id and embeddings

* format

* test embeddings

* format

* complete test

---------

Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>

* Revert "Snowflake provider support: added embeddings, PAT, account_id (#15372)" (#15632)

This reverts commit c6d58e5b4a.

---------

Co-authored-by: mubashir1osmani <mubashir.osmani777@gmail.com>
Co-authored-by: Mubashir Osmani <ilikewafflesomcuh@gmail.com>
Co-authored-by: mogith-pn <143642606+mogith-pn@users.noreply.github.com>
Co-authored-by: Andrey <elkin.andr@gmail.com>
2025-10-16 20:39:15 -07:00
Ishaan Jaffer
ea69f4547d Merge branch 'main' into litellm_oct_staging2 2025-10-16 17:06:29 -07:00
Ishaan Jaff
f69f7d101b
Merge pull request #15618 from BerriAI/litellm_bedrock_invoke_support
[Feat] Allow calling /invoke, /converse routes through AI Gateway + models on config.yaml
2025-10-16 16:56:23 -07:00
Ishaan Jaffer
0bef295b15 doc fix 2025-10-16 16:36:24 -07:00
Ishaan Jaffer
bbf9d6a57b docs boto3 instructions 2025-10-16 16:34:56 -07:00
Ishaan Jaffer
79516563a9 docs add /invoke and /converse routes 2025-10-16 16:25:27 -07:00
Ishaan Jaffer
8c5d6891d4 docs pt 2025-10-16 16:18:13 -07:00
Ishaan Jaffer
fe5dd23a84 docs boto3 pass thoughs 2025-10-16 16:17:02 -07:00
Ishaan Jaffer
c2b69e371c docs pass through 2025-10-16 16:13:08 -07:00
Ishaan Jaffer
f87c86806c docs invoke 2025-10-16 16:13:01 -07:00
Ishaan Jaff
f27f2d4803
Merge branch 'main' into litellm_sso_add_pkce 2025-10-16 15:48:01 -07:00
Ishaan Jaff
f98f299854
Merge pull request #15617 from BerriAI/litellm_october_alexsander_stanging
[OCT] Alexsander PERF improvements
2025-10-16 15:10:02 -07:00
AlexsanderHamir
220fa3feeb Add missing env key 2025-10-16 14:42:27 -07:00
Ishaan Jaffer
1c8b7abddb GENERIC_CLIENT_USE_PKCE 2025-10-16 13:32:12 -07:00
Ishaan Jaffer
193fa19552 fix Okta PKCE 2025-10-16 13:26:14 -07:00
Krish Dholakia
3bf32e8e5c
feature: update pillar security integration to support no persistence mode in litellm proxy
feature: update pillar security integration to support no persistence mode in litellm proxy
2025-10-16 12:13:37 -07:00
Ariel Fogel
b075cf4a6c PLR-2400: support no persistence in litellm proxy 2025-10-16 17:22:58 +03:00
TensorNull
55a6dd3a8b feat(cometapi): Add CometAPI provider support (embeddings, image generation, docs)
- Add CometAPI embedding and image generation transformations and configs
- Add image cost calculator and export/init files
- Register provider in constants, utils, main (embedding path) and sidebars
- Add CometAPI docs page and cookbook notebook (Colab) for usage examples
2025-10-16 13:08:14 +08:00
Ishaan Jaff
bc26845ec4
[Feat] Native /ocr endpoint support (#15573)
* [Feat] Add native litellm.ocr() functions (#15567)

* fix get_supported_ocr_params

* add get_provider_ocr_config

* init OCR

* init ocr functions

* add OCRResponse Base Model

* add ocr to llm http handlers

* add main.py for OCR

* fix linting for OCR

* TestMistralOCR

* update to use DocumentType for Mistral

* fix _prepare_ocr_request

* fix transform

* add main.py for OCR

* add spec to init

* fix OCR

* TestMistralOCR

* ruff fix

* Potential fix for code scanning alert no. 3521: Clear-text logging of sensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* [Feat] Add /ocr route on LiteLLM AI Gateway - Adds support for native mistral ocr calling (#15571)

* fix get_supported_ocr_params

* add get_provider_ocr_config

* init OCR

* init ocr functions

* add OCRResponse Base Model

* add ocr to llm http handlers

* add main.py for OCR

* fix linting for OCR

* TestMistralOCR

* update to use DocumentType for Mistral

* fix _prepare_ocr_request

* fix transform

* add main.py for OCR

* add spec to init

* fix OCR

* TestMistralOCR

* ruff fix

* add router.ocr() methods

* add OCR routes

* feat add ocr routes

* add OCR routes

* feat: add OCR routes in proxy server

* working /ocr routes

* test_router_aocr_with_mistral

* docs Mistral OCR

* docs OCR

* [Feat] Add Azure AI Mistral OCR Integration  (#15572)

* fix get_supported_ocr_params

* add get_provider_ocr_config

* init OCR

* init ocr functions

* add OCRResponse Base Model

* add ocr to llm http handlers

* add main.py for OCR

* fix linting for OCR

* TestMistralOCR

* update to use DocumentType for Mistral

* fix _prepare_ocr_request

* fix transform

* add main.py for OCR

* add spec to init

* fix OCR

* TestMistralOCR

* ruff fix

* add router.ocr() methods

* add OCR routes

* feat add ocr routes

* add OCR routes

* feat: add OCR routes in proxy server

* working /ocr routes

* test_router_aocr_with_mistral

* docs Mistral OCR

* docs OCR

* add azure ai to get_provider_ocr_config

* add AzureAIOCRConfig

* TestAzureAIOCR

* TestAzureAIOCR

* test fixes for azure ai ocr

* fix async OCR transform for Azure

* fix transform_ocr_request

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-10-15 17:20:01 -07:00
Krrish Dholakia
0526334d9c docs: fix url 2025-10-15 08:33:28 -07:00
Ishaan Jaff
a6c57cb5bd
[Feat] Cost Tracking - specify a global vendor discount for costs. (#15546)
* fix cost_discount_config

* add CostBreakdown

* fix: set_cost_breakdown

* test_cost_discount_vertex_ai

* docs fix

* docs fix discounts

* docs fix

* docs custom pricing

* docs fix

* fixes for getting cost breakdown in response headers

* test - response headers wth discount
2025-10-14 20:07:04 -07:00
AlexsanderHamir
5bffa58ee0 feat(ssl): add configurable ECDH curve for TLS performance
Add `ssl_ecdh_curve` setting to configure TLS key exchange curve.
Allows disabling PQC on OpenSSL 3.x for better performance.

Configurable via SDK (litellm.ssl_ecdh_curve), YAML (litellm_settings),
or env var (SSL_ECDH_CURVE). Common curves: X25519, prime256v1, secp384r1.
2025-10-14 13:57:39 -07:00
Krrish Dholakia
b0d963cc0c docs(index.md): bump rc 2025-10-14 13:57:39 -07:00
Krrish Dholakia
cb29e33cad docs: fix doc 2025-10-14 13:57:39 -07:00
AlexsanderHamir
2e57d19a55 update benchmarks 2025-10-14 13:57:39 -07:00
AlexsanderHamir
6df051e87b docs: update benchmark results with improved infrastructure
- Update to 2 instance baseline (1035 RPS @ 200ms median)
- Add 4 instance results (1170 RPS @ 100ms median)
- Update machine specs to 4 CPU / 8GB RAM
- Update Locust settings to 1000 users
2025-10-14 13:57:39 -07:00
mubashir1osmani
6424480571 add ecs to docs 2025-10-14 13:57:39 -07:00
Davi S. Zucon
9d944b1404
small fix code snippet custom_prompt_management.md
passing parameter: 
prompt_id directly to openai client, raises error: 
TypeError: Completions.create() got an unexpected keyword argument 'prompt_id'

instead use: 
extra_body={
        "prompt_id": "1234"
 }
2025-10-14 16:37:00 -03:00
Krrish Dholakia
0c86c3d791 docs(index.md): bump rc 2025-10-13 10:56:14 -07:00
Krrish Dholakia
611bda94cb docs: fix doc 2025-10-13 09:59:07 -07:00
Krish Dholakia
d81843070a
Merge pull request #15461 from BerriAI/litellm_update_docs
[Docs] - Update benchmark results
2025-10-12 22:11:57 -07:00
mubashir1osmani
950ee924fc add ecs to docs 2025-10-12 16:13:56 -04:00
Ishaan Jaffer
e761665f22 docs fix 2025-10-11 18:21:35 -07:00
AlexsanderHamir
5d1fa76d14 update benchmarks 2025-10-11 18:06:37 -07:00
AlexsanderHamir
2cb1db27cb docs: update benchmark results with improved infrastructure
- Update to 2 instance baseline (1035 RPS @ 200ms median)
- Add 4 instance results (1170 RPS @ 100ms median)
- Update machine specs to 4 CPU / 8GB RAM
- Update Locust settings to 1000 users
2025-10-11 18:00:26 -07:00
Imad Saddik
133189e191
Fixed a few typos (#15267) 2025-10-11 17:53:42 -07:00
Alexsander Hamir
300a142926
[Add]: perf summary (#15458)
* add: perf summary

* update docs

* fix: focus on p99
2025-10-11 17:38:13 -07:00
Ishaan Jaffer
087bd2d306 docs fix 2025-10-11 16:49:11 -07:00
Ishaan Jaffer
1ccd949495 docs fix 2025-10-11 16:34:47 -07:00
Ishaan Jaffer
b9fef02f04 docs v1.78.0 2025-10-11 16:33:46 -07:00
Ishaan Jaffer
7288f4355f docs fix 2025-10-11 16:24:21 -07:00
Ishaan Jaffer
54b8bde60c docs fix 2025-10-11 16:23:46 -07:00
Ishaan Jaffer
8d29fc8cdd docs 2025-10-11 16:12:00 -07:00
Krish Dholakia
8c4c4acda2
Merge pull request #15457 from BerriAI/litellm_docs_10_11_2025
Litellm docs 10 11 2025
2025-10-11 15:16:13 -07:00
Krrish Dholakia
3f921d8dbe docs(index.md): document mcp oauth support 2025-10-11 15:14:15 -07:00
Krrish Dholakia
9b5943ae50 docs: cleanup docs 2025-10-11 15:09:24 -07:00