diff --git a/litellm/completion_extras/litellm_responses_transformation/transformation.py b/litellm/completion_extras/litellm_responses_transformation/transformation.py index 35fc93bbeb0..5d1d6d412dd 100644 --- a/litellm/completion_extras/litellm_responses_transformation/transformation.py +++ b/litellm/completion_extras/litellm_responses_transformation/transformation.py @@ -49,6 +49,7 @@ if TYPE_CHECKING: ALL_RESPONSES_API_TOOL_PARAMS, AllMessageValues, ChatCompletionImageObject, + ChatCompletionRedactedThinkingBlock, ChatCompletionThinkingBlock, OpenAIMessageContentListBlock, ) @@ -579,7 +580,8 @@ class LiteLLMResponsesTransformationHandler(CompletionTransformationBridge): content: Optional[ Union[ str, - Iterable[Union["OpenAIMessageContentListBlock", "ChatCompletionThinkingBlock"]], + List[Any], + Iterable[Union["OpenAIMessageContentListBlock", "ChatCompletionThinkingBlock", "ChatCompletionRedactedThinkingBlock"]], ] ], role: str, diff --git a/litellm/proxy/auth/user_api_key_auth.py b/litellm/proxy/auth/user_api_key_auth.py index 8ad3b83c043..c4ffc1a60f1 100644 --- a/litellm/proxy/auth/user_api_key_auth.py +++ b/litellm/proxy/auth/user_api_key_auth.py @@ -164,7 +164,7 @@ def _get_bearer_token( def _apply_budget_limits_to_end_user_params( end_user_params: dict, budget_info: LiteLLM_BudgetTable, - end_user_id: str, + end_user_id: Optional[str], ) -> None: """ Helper function to apply budget limits to end user parameters. diff --git a/litellm/proxy/management_endpoints/common_utils.py b/litellm/proxy/management_endpoints/common_utils.py index 999c53e6b82..76a11c4dfd4 100644 --- a/litellm/proxy/management_endpoints/common_utils.py +++ b/litellm/proxy/management_endpoints/common_utils.py @@ -16,6 +16,7 @@ from litellm.proxy._types import ( from litellm.proxy.utils import _premium_user_check if TYPE_CHECKING: + from litellm.proxy._types import NewProjectRequest, UpdateProjectRequest from litellm.proxy.utils import PrismaClient, ProxyLogging @@ -283,6 +284,8 @@ def _set_object_metadata_field( KeyRequestBase, LiteLLM_OrganizationTable, LiteLLM_ProjectTable, + "NewProjectRequest", + "UpdateProjectRequest", ], field_name: str, value: Any, diff --git a/litellm/proxy/public_endpoints/public_endpoints.py b/litellm/proxy/public_endpoints/public_endpoints.py index ac5d9126145..09fc6477829 100644 --- a/litellm/proxy/public_endpoints/public_endpoints.py +++ b/litellm/proxy/public_endpoints/public_endpoints.py @@ -76,7 +76,7 @@ _ENDPOINT_METADATA: Dict[str, Dict[str, str]] = { _SLUG_SUFFIX_RE = re.compile(r"\s*\(`[^`]+`\)\s*$") # Loaded once on first request; never invalidated (local file, no TTL needed). -_cached_endpoints: Optional[List[Dict[str, Any]]] = None +_cached_endpoints: Optional[SupportedEndpointsResponse] = None def _clean_display_name(raw: str) -> str: