Commit Graph

9 Commits

Author SHA1 Message Date
Ishaan Jaff dc2c1122bf [Feat] UI QA: Pass through endpoints (#11939)
* use ID for pass through management

* use id for pass through

* fix columns

* fix PassThroughInfoView

* cleanup

* working edit and delete pass through

* fix rendering id for pt row

* fixes for pt info view

* working delete pass through

* fix use NumericalInput

* fix alignment

* qa - creating pt

* show route preview

* fix show just 1 msg

* test_create_pass_through_endpoint

* fix ui linting
2025-06-20 18:35:38 -07:00
Ishaan Jaff 3a1a8f5a78 [Bug Fix] - Ensure "Request" is tracked for pass through requests on LiteLLM Proxy (#11873)
* fixes for pt tracing

* test_pass_through_request_contains_proxy_server_request_in_kwargs
2025-06-18 21:15:09 -07:00
Ishaan Jaff dfdbfdd71c [Feat] Passthrough - Add support for setting custom cost per pass through request (#11870)
* use cost_per_request

* fix cost_per_request

* fixes cost_per_request

* fixes for cost per request for pass through

* ui fix param name

* fixes for _set_cost_per_request

* test cost per request pass through endpoints

* Update tests/test_litellm/proxy/pass_through_endpoints/test_pass_through_endpoints.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* tests pass through endpoints

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-18 16:24:38 -07:00
Ishaan Jaff 0eb8a3de10 [Feat] v2 Pass through endpoints - Add support for subroutes for pass through endpoints + Cleaned up UI (#11827)
* fix: add construct_target_url_with_subpath

* add InitPassThroughEndpointHelpers

* added debugging for pass through routes

* add PassThroughGenericEndpoint to include subpath and input_cost_per_request

* polish page

* Add Pass-Through Endpoint

* polish pass through ui

* fixes for initialize_pass_through_endpoints

* PassThroughGenericEndpoint

* test_add_subpath_route

* test_initialize_pass_through_endpoints_with_include_subpath

* fix code QA check
2025-06-17 20:52:28 -07:00
Ishaan Jaff 35d74af5a0 [Fix] Pass through - Langfuse don't log request to Langfuse passthrough on Langfuse (#11768)
* dont log lf pass through request

* test_is_langfuse_route

* Update litellm/proxy/pass_through_endpoints/success_handler.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-16 17:30:23 -07:00
Alvaro Sevilla 196a7269f6 fix(vertex_ai): support global location in vertex ai passthrough (#11661)
* Support global location in vertex ai passthrough

* refactor
2025-06-13 09:51:04 -07:00
Cole McIntosh e191e72746 Fix: Respect user_header_name property for budget selection and user identification (#11419)
* 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
2025-06-06 14:21:02 -07:00
Krish Dholakia 44a69421ea Anthropic - Files API w/ form-data support on passthrough + File ID support on /chat/completion (#11256)
* fix(anthropic/chat): support passing 'file_id' param to anthropic

Partial fix for LIT-200

* feat(anthropic/chat): use correct anthropic content block based on file object

* fix(anthropic/chat): fix file id for container_upload message type

* fix(anthropic/chat/transformation.py): fix check for adding code execution to tool calls - needed for 'container_upload' message type

* fix(llm_passthrough_endpoints.py): support reading form data for anthropic passthrough

* refactor(llm_passthrough_endpoints.py): refactor block into function for easier testing

* test: add unit test

* fix: don't pass in empty tools list

* [Fix] Responses API - Session management  (#11254)

* fix: import session handling

* fix: imports for session handler

* tests: tests for session handler

* Update enterprise/litellm_enterprise/enterprise_callbacks/session_handler.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* bump: bump litellm enterprise

* fixes: test_create_user_default_budget

* fix: fix linting error

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-29 23:54:24 -07:00
Krish Dholakia ef42461c1e Litellm fix GitHub action testing (#11163)
* test: add __init__.py files

* refactor: rename test folder to avoid naming conflict

* test: update workflows

* test: update tests

* test: update imports

* test: update tests

* test: remove unused import

* ci(test-litellm.yml): add pytest retry to github workflow

* test: fix test
2025-05-26 14:41:42 -07:00