mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-20 00:11:50 +00:00
* Refactor get_end_user_id_from_request_body to support user ID retrieval from custom headers and multiple request body formats. Enhance tests to cover various scenarios including header precedence and fallback mechanisms. * Refactor get_end_user_id_from_request_body function to accept request_body as the first parameter, improving clarity and flexibility. Update tests for compatibility and add new cases to ensure correct functionality across various request body formats. * Update _user_api_key_auth_builder and user_api_key_auth to pass request object to get_end_user_id_from_request_body, enhancing user ID retrieval from request data. * refactor(auth_utils.py): update get_end_user_id_from_request_body to accept request_headers instead of request, and adjust related function calls in user_api_key_auth and tests * refactor(tests): update mock request handling in LLM pass-through endpoint tests - Replaced the Request object with a Mock for better flexibility in testing. - Enhanced mock setup to include user API key handling and virtual key retrieval. - Updated test calls to reflect changes in mock request structure and added necessary patches for new dependencies. * refactor(vertex_and_google_ai_studio_gemini.py): remove redundant variable declaration for url_context_metadata, linting error |
||
|---|---|---|
| .. | ||
| anthropic_endpoints | ||
| auth | ||
| client | ||
| common_utils | ||
| db | ||
| experimental/mcp_server | ||
| guardrails | ||
| health_endpoints | ||
| hooks | ||
| image_endpoints | ||
| management_endpoints | ||
| middleware | ||
| openai_files_endpoint | ||
| pass_through_endpoints | ||
| spend_tracking | ||
| test_configs | ||
| types_utils | ||
| ui_crud_endpoints | ||
| test_caching_routes.py | ||
| test_common_request_processing.py | ||
| test_custom_proxy.py | ||
| test_litellm_pre_call_utils.py | ||
| test_proxy_cli.py | ||
| test_proxy_server.py | ||
| test_proxy_utils.py | ||
| test_route_llm_request.py | ||
| test_spend_log_cleanup.py | ||
| test_team_member_update.py | ||