From 76368ca425cbb8d70ac5e1fc5352706e428f99ca Mon Sep 17 00:00:00 2001 From: Zachary Lyon Date: Mon, 21 Sep 2026 14:12:08 -0700 Subject: [PATCH] style(proxy): resolve operator timeout without a dict-literal default Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Pxz11TQKYvCXvKawNUa2g4 --- .../pass_through_endpoints/llm_passthrough_endpoints.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py b/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py index 39cbf8e98c7..4e98cf35118 100644 --- a/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py +++ b/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py @@ -3293,10 +3293,9 @@ async def _tinyfish_body_field_names(request: Request) -> frozenset[str]: def _tinyfish_route_timeout() -> float | None: # only raise the 600s default to cover legal 1200s runs; an operator's configured timeout still wins proxy_server: Final = sys.modules.get("litellm.proxy.proxy_server") + operator_settings: Final = getattr(proxy_server, "general_settings", None) operator_timeout: Final = ( - getattr(proxy_server, "general_settings", {}).get("pass_through_request_timeout") - if proxy_server is not None - else None + operator_settings.get("pass_through_request_timeout") if isinstance(operator_settings, Mapping) else None ) return None if operator_timeout is not None else TINYFISH_PASSTHROUGH_TIMEOUT_SECONDS