From 5d7bfbc9509e6b347e7c6db007f99c11fe753cf6 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Tue, 4 Aug 2026 23:12:31 -0700 Subject: [PATCH] refactor(proxy): tighten pass-through credential type annotations --- .../pass_through_endpoints/passthrough_endpoint_router.py | 2 +- litellm/types/router.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/litellm/proxy/pass_through_endpoints/passthrough_endpoint_router.py b/litellm/proxy/pass_through_endpoints/passthrough_endpoint_router.py index 65729adb3e5..dc53686b3cc 100644 --- a/litellm/proxy/pass_through_endpoints/passthrough_endpoint_router.py +++ b/litellm/proxy/pass_through_endpoints/passthrough_endpoint_router.py @@ -22,7 +22,7 @@ def _get_proxy_llm_router() -> "Router | None": return llm_router -def _get_str_value(values: dict | None, key: str) -> str | None: +def _get_str_value(values: dict[str, object] | None, key: str) -> str | None: value: Final = values.get(key) if values is not None else None return value if isinstance(value, str) else None diff --git a/litellm/types/router.py b/litellm/types/router.py index ddb575545ea..86811dc5b3c 100644 --- a/litellm/types/router.py +++ b/litellm/types/router.py @@ -382,8 +382,8 @@ class LiteLLMParamsTypedDict(TypedDict, total=False): ## RESPONSES API → CHAT COMPLETIONS BRIDGE ## use_chat_completions_api: Optional[bool] ## PASS-THROUGH ENDPOINTS ## - use_in_pass_through: Optional[bool] - litellm_credential_name: Optional[str] + use_in_pass_through: bool | None + litellm_credential_name: str | None ## UNIFIED PROJECT/REGION ## region_name: Optional[str] ## VERTEX AI ##