From 574eb207c86ba063127caffee30e33c9e5566f49 Mon Sep 17 00:00:00 2001 From: shivam Date: Sat, 11 Apr 2026 15:08:10 -0700 Subject: [PATCH] fix: import LITELLM_PASS_THROUGH_CUSTOM_BODY_STATE_KEY for bedrock passthrough Fixes NameError when bedrock_proxy_route sets custom body on request.state. Remove unused lazy-loader helper. Made-with: Cursor --- .../pass_through_endpoints/llm_passthrough_endpoints.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py b/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py index 165c7b24cb..6e354290fe 100644 --- a/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py +++ b/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py @@ -37,6 +37,7 @@ from litellm.proxy.common_utils.http_parsing_utils import ( from litellm.proxy.pass_through_endpoints.common_utils import get_litellm_virtual_key from litellm.proxy.pass_through_endpoints.pass_through_endpoints import ( HttpPassThroughEndpointHelpers, + LITELLM_PASS_THROUGH_CUSTOM_BODY_STATE_KEY, create_pass_through_route, create_websocket_passthrough_route, websocket_passthrough_request, @@ -88,14 +89,6 @@ def is_passthrough_request_streaming(request_body: dict) -> bool: return request_body.get("stream", False) -def _get_litellm_pass_through_custom_body_state_key() -> str: - from litellm.proxy.pass_through_endpoints.pass_through_endpoints import ( - LITELLM_PASS_THROUGH_CUSTOM_BODY_STATE_KEY, - ) - - return LITELLM_PASS_THROUGH_CUSTOM_BODY_STATE_KEY - - async def llm_passthrough_factory_proxy_route( custom_llm_provider: str, endpoint: str,