Commit Graph

26356 Commits

Author SHA1 Message Date
Ishaan Jaffer
1bb3eabb91 fix MYPY lint 2025-10-11 10:53:20 -07:00
Ishaan Jaffer
ce6102d54f test_azure_responses_api_status_error 2025-10-11 10:41:15 -07:00
Ishaan Jaffer
86881a8fc1 test_azure_responses_api_status_error 2025-10-11 10:21:07 -07:00
Ishaan Jaffer
34579b640e fix sec san 2025-10-11 10:15:35 -07:00
Ishaan Jaffer
33a4676184 test fix 2025-10-11 10:05:22 -07:00
Ishaan Jaffer
b2747211c8 test install on python 3.8 2025-10-11 09:53:25 -07:00
Ishaan Jaffer
4b675ccab3 fix: _handle_raw_dict_response_item 2025-10-11 09:45:57 -07:00
Ishaan Jaffer
2bce4ab74d fix: sec scans 2025-10-11 09:34:48 -07:00
Ishaan Jaffer
732618f55f test_together_ai_embedding 2025-10-11 09:33:19 -07:00
Ishaan Jaffer
8c4ca82235 fix: postgresql auth_ui_unit_tests 2025-10-11 09:23:31 -07:00
Ishaan Jaffer
c467986b8b test_gemini_context_caching_with_ttl 2025-10-11 09:20:20 -07:00
Ishaan Jaffer
41953185bf fix litellm_proxy_unit_testing 2025-10-11 09:16:59 -07:00
Ishaan Jaffer
e7d5840cd2 CreateTagModal test 2025-10-11 09:08:05 -07:00
Ishaan Jaffer
2a0088261a fix posthog.py 2025-10-11 09:05:16 -07:00
Ishaan Jaffer
97f0daa22b fix: mypy linting 2025-10-11 09:02:42 -07:00
Ishaan Jaffer
8dc5960332 _base_validate_azure_environment 2025-10-11 08:59:19 -07:00
Ishaan Jaffer
a163bf9f51 test fix: MicrosoftSSOHandler 2025-10-11 08:55:23 -07:00
Ishaan Jaffer
3aa0f6ed72 test_generate_key_with_object_permission 2025-10-11 08:54:15 -07:00
Ishaan Jaffer
4d79280175 Gemma test fixes 2025-10-11 08:51:08 -07:00
Ishaan Jaffer
87719640eb test tag mgmt 2025-10-11 08:48:37 -07:00
Ishaan Jaffer
cf994860e2 new DB Build 2025-10-11 08:44:42 -07:00
Ishaan Jaffer
63d34cfe8f DB - add LiteLLM_TagTable 2025-10-11 08:43:34 -07:00
Ishaan Jaffer
698c0b219c test code QA checks 2025-10-11 08:41:56 -07:00
Sameer Kankute
138bdbb6d8
fix mapped tests 1 (#15445)
* fix mapped tests

* fix mapped tests
2025-10-11 08:33:08 -07:00
Ishaan Jaffer
9bde1c1a4c TestEnkryptAIGuardrailHooks 2025-10-10 19:59:41 -07:00
Ishaan Jaffer
8cb66168bc test fix 2025-10-10 19:57:17 -07:00
Ishaan Jaffer
5377b17bdd doc fix 2025-10-10 19:55:02 -07:00
Alexsander Hamir
0374fe02f7
fix: prevent session leaks when recreating aiohttp sessions (#15443)
Closes old sessions before creating new ones to prevent accumulation. Replaces 'pass' placeholder with asyncio.create_task(old_session.close()) when sessions are recreated due to event loop changes.
2025-10-10 19:43:52 -07:00
Alexsander Hamir
5f5a7c917a
fix: handle closed aiohttp sessions with detection and retry (#15442)
Fixes RuntimeError "Session is closed" by:
- Checking session.closed before use and recreating if needed
- Catching RuntimeError during requests and retrying with new session
- Validating newly created sessions aren't already closed

Adds tests for both proactive detection and reactive retry scenarios.
2025-10-10 19:42:58 -07:00
Alexsander Hamir
2c9356c437
[Fix] - shared session parsing and usage issue (#15440)
* Fix: Add shared_session to all_litellm_params to prevent JSON serialization error

The shared_session parameter (aiohttp.ClientSession) was being passed through
to provider API calls, causing "Object of type ClientSession is not JSON
serializable" errors during embedding requests.

Added shared_session to the all_litellm_params list so it's properly filtered
out as a LiteLLM-internal parameter and not passed to the provider's API.

* Fix: Add shared_session support for embedding calls with connection pooling

The shared_session parameter was not being properly handled in embedding calls,
causing it to be passed through to provider API requests where it's not needed.

Changes:
- Added shared_session to all_litellm_params to filter it from provider API request body
- Extract shared_session in main embedding() function and pass it explicitly
- Updated OpenAI embedding handlers (embedding() and aembedding()) to accept shared_session
- Pass shared_session to _get_openai_client for HTTP client creation

This enables proper connection pooling for embedding requests when shared_session
is provided, improving performance for high-throughput scenarios.

* test: add regression test for shared_session in embedding calls

Add comprehensive test to prevent JSON serialization errors when using
shared_session.

The test verifies two critical aspects:
1. shared_session is in all_litellm_params to prevent "Object of type
   ClientSession is not JSON serializable" errors
2. shared_session flows through the complete call chain across 6 layers:
   - litellm.embedding()
   - OpenAI.embedding/aembedding()
   - _get_openai_client()
   - AsyncHTTPHandler.create_client()
   - _create_async_transport()
   - _create_aiohttp_transport()

Similar to test_acompletion_session_reuse_e2e.py but focused on
embedding endpoints. Uses inspect.getsource() to verify the parameter
is not only accepted but actually passed through each layer.
2025-10-10 19:26:53 -07:00
Ishaan Jaff
527c8f59fa
[Feat] Tag Management - Add support for setting tag based budgets (#15433)
* feat: add LiteLLM_TagTable

* fix: use new table for tag management

* fix - allow setting budgets for tags

* working tag creation

* fix schema.prisma

* add tag info

* ui fixes

* ui fix tag info

* TAG_CACHE_IN_MEMORY_TTL_SECONDS

* add Litellm_EntityType

* fix get_aggregated_db_spend_update_transactions

* fix: _update_entity_spend_in_db

* fix _tag_max_budget_check

* add tag budget check

* add tag_list_transactions

* test_get_tag_objects_batch

* test_update_tag_db_without_prisma_client

* fix get_tags_from_request_body

* get_tags_from_request_body

* fix get_tags_from_request_body

* fix spend tracking utils

* get_tags_from_request_body

* test_get_tags_from_request_body_with_metadata_tags

* feat: add _update_tag_cache spend tracking

* fix _PROXY_track_cost_callback

* test_tag_cache_update_multiple_tags

* fix tag info

* docs fix

* docs tag budgets

* doc fix

* docs fix

* fix tag budget

* docs tag budgets

* docs fix

* ruff fix
2025-10-10 19:24:50 -07:00
Achintya Rajan
6b66e12dea
Litellm UI API Reference page updates (#15438)
* added new CodeBlock for better visuals

* added doc link
2025-10-10 18:18:31 -07:00
Pablo Gomez
f27a823256
Deletion of unnecessary and error causing volume section comment (#15425) 2025-10-10 17:51:27 -07:00
Alexsander Hamir
9d7dea42d0
[Fix] - SensitiveDataMasker converts lists to string (#15420)
* fix: preserve lists in SensitiveDataMasker to prevent string conversion

Added 'list' to allowed primitive types in mask_dict() to prevent lists like
tags from being converted to string representations in API responses.

Before: {"tags": "['East US 2', 'production', 'test']"}
After:  {"tags": ["East US 2", "production", "test"]}

* add: unit test
2025-10-10 17:50:51 -07:00
Copilot
b9eb05ea63
[Feature]: Include server_name in /v1/mcp/server/health endpoint response (#15431)
* Initial plan

* Add server_name to MCP health check response

Co-authored-by: ishaan-jaff <29436595+ishaan-jaff@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ishaan-jaff <29436595+ishaan-jaff@users.noreply.github.com>
2025-10-10 17:37:53 -07:00
Krish Dholakia
bb8dfe46c0
Merge pull request #15435 from BerriAI/litellm_ui_models_and_endpoints_refactor
Models & Endpoints Initial Refactor
2025-10-10 16:48:45 -07:00
Achintya Rajan
44ded6c4b5 import fixes & cleanup 2025-10-10 16:39:42 -07:00
Achintya Rajan
5a32a336e6 renamed component 2025-10-10 16:32:35 -07:00
Achintya Rajan
6cf9cce38f Update model_dashboard.tsx 2025-10-10 16:31:28 -07:00
Achintya Rajan
f8f94b71f0 extracted FilterByContent 2025-10-10 16:29:49 -07:00
Achintya Rajan
a7e897a671 Update model_dashboard.tsx 2025-10-10 16:20:24 -07:00
Achintya Rajan
f456dbecbd moved updateModelMetrics down 2025-10-10 16:15:35 -07:00
Achintya Rajan
25252d06d1 moved FilterByContent down 2025-10-10 16:03:07 -07:00
Achintya Rajan
29002b4f3b extracted ModelAnalyticsTab.tsx 2025-10-10 15:48:02 -07:00
Achintya Rajan
020cecfe33 ModelRetrySettingsTab and PriceDataManagementTab 2025-10-10 15:32:55 -07:00
Achintya Rajan
ae39196315 removed props, transferred management down 2025-10-10 15:11:22 -07:00
Achintya Rajan
ff06e6d4ea extracted AllModelsTab, eliminating props 2025-10-10 15:02:38 -07:00
Ishaan Jaff
bf209415da
[Feat] VertexAI Gemma model family streaming support + Added MedGemma (#15427)
* test_acompletion_filters_stream_and_stream_options

* fix: stream_options

* docs medgemma

* lint fix

* docs
2025-10-10 14:22:27 -07:00
Brandon Cook
a0e81a7f1c
feat: add Bedrock AU Cross-Region Inference (#15402) 2025-10-10 14:18:51 -07:00
Sameer Kankute
a2123f7596
fix lint errors (#15406)
* fix lint errors

* fix mypy error

* Update docs error
2025-10-10 14:16:23 -07:00