Commit Graph
25979 Commits
Author SHA1 Message Date
Ishaan Jaffer 4400a6c189 test bedrock guardrails 2025-10-04 09:18:26 -07:00
Alexsander HamirandGitHub 5d22229d35 [Fix] Cache - Avoiding expensive operations when cache isn't available (#15182)
* Optimize cache performance by avoiding expensive operations when caching is disabled

- Moved cache availability checks before expensive operations to improve performance for non-cached requests
- Updated client code to handle None responses from caching handler

* clean hot path

* Fix TypeError with isinstance check for CustomStreamWrapper in caching

Fixed `TypeError: typing.Any cannot be used with isinstance()` that was
occurring in the caching handler when checking cached streaming responses.

The issue was caused by CustomStreamWrapper being aliased to `typing.Any`
at runtime through the TYPE_CHECKING conditional import pattern. When the
code attempted to use isinstance(cached_result, CustomStreamWrapper) at
lines 222 and 338, it failed because Python's isinstance() cannot be used
with typing.Any.

Solution: Import CustomStreamWrapper at runtime separately from the
TYPE_CHECKING block, while keeping a type alias for static type checking.
This allows isinstance checks to work properly while maintaining type hints.

* fix: remove unnecessary type checking
2025-10-04 09:10:37 -07:00
Ishaan Jaffer d50fbcdc00 fix: include_cost_in_streaming_usage 2025-10-04 09:05:02 -07:00
Ishaan Jaffer 89934f062c fix ruff check 2025-10-04 08:59:57 -07:00
Ishaan Jaffer 3d981680b0 fix ServerToolUse mypy lint error 2025-10-04 08:59:15 -07:00
Ishaan Jaffer 8e7c593f51 fix: transform_rerank_response 2025-10-04 08:55:48 -07:00
Ishaan Jaffer 67b0c874a3 ci/cd run again 2025-10-04 08:51:21 -07:00
Krish DholakiaandGitHub ad2270fe13 Merge pull request #14764 from daily-kim/litellm_fix_bearer_capitalization
Fix: Authorization header to use correct "Bearer" capitalization
2025-10-03 22:02:46 -07:00
Krish DholakiaandGitHub 7d41f02d02 Merge pull request #14813 from shagunb-acn/bugfix-14404-image-gen-azure-managed-identity
#14404 BugFix - Add support for Azure AD token-based authorization in…
2025-10-03 21:53:59 -07:00
Krish DholakiaandGitHub c83a3ac9b4 Merge pull request #14939 from Toy-97/patch-1
update: DeepInfra model data refresh [2025-09-26]
2025-10-03 21:48:31 -07:00
Krish DholakiaandGitHub 206f67a11e Merge pull request #15183 from uc4w6c/fix/test_mcp_server
test: fix test_mcp_server.py
2025-10-03 21:44:52 -07:00
YutaSaitoandGitHub 81a8766b84 feat: add JP Cross-Region Inference (#15188) 2025-10-03 21:20:04 -07:00
Yuta Saito 359aaa947f test: fix test_mcp_server.py 2025-10-04 08:18:15 +09:00
Ishaan JaffandGitHub 10d6d72ae3 [Feat] VertexAI - Support googlemap grounding in vertex ai (#15179)
* add VertexToolName

* test_vertex_tool_params

* fix: working maps grounding

* test_gemini_google_maps_tool_simple

* test_vertex_ai_map_google_maps_tool_with_location

* fix  # noqa: PLR0915

* _extract_google_maps_retrieval_config

* fixes for linting

* docs: **Google Maps**
2025-10-03 16:07:51 -07:00
Ishaan JaffandGitHub 4415b195d1 Add "eu.anthropic.claude-sonnet-4-5-20250929-v1:0" in "model_prices_and_context_window.json" (#15181)
* feat: add eu.anthropic.claude-sonnet-4-5-20250929-v1:0

* fix: nvidia_nim_models
2025-10-03 15:52:18 -07:00
Krish DholakiaandGitHub 3095f43e92 Merge pull request #15007 from TobiMayr/feature/add-max-requests-env-var
feature/add max requests env var
2025-10-03 15:30:15 -07:00
Krish DholakiaandGitHub c5de073732 Merge pull request #15072 from speglich/fix/oci-support
Fix OCI Generative AI  Integration when using Proxy
2025-10-03 15:29:21 -07:00
Krish DholakiaandGitHub 343eeaf53f Merge pull request #15102 from BerriAI/litellm_message_api_cost_tracking
(Feat) Add cost tracking for /v1/messages
2025-10-03 15:27:49 -07:00
Krish DholakiaandGitHub b41041fc49 Merge pull request #15146 from JVenberg/fix/session-cookie-infinite-logout-loop
[Fix] Session Token Cookie Infinite Logout Loop
2025-10-03 15:23:49 -07:00
Krish DholakiaandGitHub f05dc27551 Merge pull request #15160 from danielaskdd/fix-whitespace-handling
Fix(critical) : Preserve Whitespace Characters in Model Response Streams
2025-10-03 15:23:07 -07:00
rishiganesh2002andGitHub d36c8d6bbe [Feat] MCP Gateway Fine-grained Tools Addition (#15153)
* feat: UI to add specific tools under creating MCP connection

* chore: pydantic + prisma changes

* feat: adding specific MCP tools now works

* fix: allowed tools filtering

* chore: filtered list to mcp server cost config

* chore: update Readme

* chore: refactor the filtering

* test: Added tests

When the allowed_tests is null, empty list or populated

* chore: resolve the proxy issue

* feat: updating MCP tool filtering
2025-10-03 10:16:29 -07:00
yangdx 8b95cd3ed2 Fix whitespace handling in _has_meaningful_content function
• Preserve newlines and spaces as content
• Remove .strip() call on strings
• Treat all non-empty strings as meaningful
• Update logic comment for clarity
• Fix edge case with whitespace-only text
2025-10-03 13:46:51 +08:00
shagunb-acnandGitHub 13d38e2bed Merge branch 'BerriAI:main' into bugfix-14404-image-gen-azure-managed-identity 2025-10-03 10:07:31 +05:30
Sameer Kankute 507b0973b4 fix lint code 2025-10-03 08:21:07 +05:30
Ishaan Jaffer 94a89cd7de ruff fix 2025-10-02 19:22:31 -07:00
Krish DholakiaandGitHub 1d548d7235 Merge pull request #15155 from BerriAI/litellm_dev_10_02_2025_p1
Litellm dev 10 02 2025 p1
2025-10-02 19:04:59 -07:00
Ishaan JaffandGitHub efa782d6d2 [Feat] Add Nvidia NIM Rerank Support (#15152)
* feat: add NvidiaNimRerankConfig

* fix: NvidiaNimRerankConfig

* fix: NvidiaNimRerankConfig

* fix routing to nvidia nim

* docs nvidia nim rerank

* TestNvidiaNim

* nvidia nim rerank fixes

* fix rerank

* transform_rerank_response

* Usage with LiteLLM Proxy

* fixes linting

* NvidiaNimRerankConfig.DEFAULT_NIM_RERANK_API_BASE

* fix Custom API Base URL

* fix rerank base

* fix main.py

* fix transform

* fix linting

* map_cohere_rerank_params

* ruff fix

* linting fixes

* ruff fix
2025-10-02 18:58:52 -07:00
Alexsander HamirandGitHub 79c24be48b [Fix] - Router: optimize unhealthy deployment filtering in retry path (O(n*m) → O(n+m)) (#15110)
* perf(router): optimize unhealthy deployment filtering in retry path

Convert unhealthy_deployments list to set for O(1) lookups in
_async_get_healthy_deployments, reducing complexity from O(n*m) to O(n+m).

This method is called on every retry attempt (inside the retry loop), so
the optimization compounds during failures:

Before: 100 deployments × 50 unhealthy = 5,000 operations per call
After:  100 deployments + 50 unhealthy = 150 operations per call

Impact during cascading failures:
- With 1000 req/sec, 40% error rate, 3 retries
- Prevents 32M+ operations/sec during incidents
- Critical for preventing router CPU spikes when you need performance most

Matches the pattern already used in _filter_cooldown_deployments (line 7272).

* fix: Undefined name HTTPException
2025-10-02 18:55:18 -07:00
Sameer KankuteandGitHub 544db8d140 (feat)Litellm x twelvelabs bedrock[Async Invoke Support] (#14871)
* Add async invoke support

* Add docs and correct embedding response

* fix cicd erros

* fix cicd erros

* fix mypy error

* Add litellm param input_type

* Update the docs
2025-10-02 18:52:33 -07:00
Ishaan Jaffer 9c29f35c4b test_end_user_jwt_auth 2025-10-02 18:48:11 -07:00
Krish DholakiaandGitHub bfd5f8a6f1 Merge pull request #15156 from DrQuacks/top-api-key-tags
Top api key tags
2025-10-02 18:47:17 -07:00
DrQuacks 9a27eb5d0c edited tests to allow build 2025-10-02 18:32:26 -07:00
João Speglich afc9d258e3 oci: fix drop params parameter 2025-10-02 22:01:04 -03:00
Krish DholakiaandGitHub a630022256 Merge pull request #15151 from DrQuacks/top-api-key-tags
Top api key tags
2025-10-02 17:37:32 -07:00
Krish DholakiaandGitHub 54095a256a Merge pull request #15015 from anthony-liner/fix/langfuse-total-tokens
fix: set usage_details.total in langfuse integration
2025-10-02 17:33:43 -07:00
Ishaan JaffandGitHub 09106222c7 [Fix]: Handle non-serializable objects in Langfuse logging (#15148)
* fix: safe_deep_copy

* fix: import copy
2025-10-02 17:31:01 -07:00
Krish DholakiaandGitHub 7b8426af53 Merge pull request #15130 from deepanshululla/feature/logging_payload_spec_update
Add provider name to payload specification
2025-10-02 17:29:24 -07:00
Krish DholakiaandGitHub 6b3db2fd49 Merge pull request #15140 from niharm/fix-sonnet-4-5-200k-pricing
Price Fix: Add 200K prices for Sonnet 4.5
2025-10-02 17:28:47 -07:00
DrQuacks d303bf6743 port less than 1 cent to spend column 2025-10-02 16:55:36 -07:00
DrQuacks 8760276918 dropdown for more than two tags 2025-10-02 16:45:36 -07:00
DrQuacks a91a7e7750 added testing file for api keys dashboard 2025-10-02 16:17:02 -07:00
DrQuacks 4d340fa48f spend data in tags tooltip 2025-10-02 15:34:09 -07:00
Georg WölfleinandGitHub dbfa8ec921 Fix end user cost tracking in the responses API (#15124)
#13860
2025-10-02 15:13:57 -07:00
Ishaan JaffandGitHub f8f4207994 [Security Fix] fix: don't log JWT SSO token on .info() log (#15145)
* fix: get_redirect_response_from_openid

* fix info log check

* fix: forward_upstream_to_client
2025-10-02 15:07:37 -07:00
Jack Venberg 560e96570e Fix: Session Token Cookie Infinite Logout Loop 2025-10-02 15:02:07 -07:00
Amir RefaeeandGitHub 8991657d67 added railtracks to projects using litellm (#15144) 2025-10-02 14:21:38 -07:00
Mubashir OsmaniandGitHub f2107a189d add azure_ai grok-4 model family (#15137)
* added oauth mcp to docs

* added azure ai/grok-4 model family

* Revert "added oauth mcp to docs"

This reverts commit 950b7cef44f14b2db1429f6fbd32548a7c95d325.
2025-10-02 14:21:12 -07:00
DrQuacks 7c5f789b67 styling tags, only showing tag column on tags tab 2025-10-02 13:49:01 -07:00
nihar cd7acd2eb2 Add 200K prices for Sonnet 4.5 2025-10-02 12:39:44 -07:00
DrQuacks fec3b55313 bringing tags into api top api keys table 2025-10-02 12:37:07 -07:00