The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix python3.8
Ishaan Jaffer0144881b9049
diff --git a/litellm/proxy/auth/oauth2_check.py b/litellm/proxy/auth/oauth2_check.pyindex c9d6d4b7df8..bb00141ad0a 100644--- a/litellm/proxy/auth/oauth2_check.py+++ b/litellm/proxy/auth/oauth2_check.py@@ -1,6 +1,6 @@import base64import os-from typing import Dict, Tuple, cast+from typing import Dict, Optional, Tuple, castimport httpx@@ -20,8 +20,8 @@ class Oauth2Handler:@staticmethoddef _is_introspection_endpoint(token_info_endpoint: str,- oauth_client_id: str | None,- oauth_client_secret: str | None,+ oauth_client_id: Optional[str],+ oauth_client_secret: Optional[str],) -> bool:"""Determine if this is an introspection endpoint (requires POST) or token info endpoint (uses GET).@@ -43,8 +43,8 @@ class Oauth2Handler:@staticmethoddef _prepare_introspection_request(token: str,- oauth_client_id: str | None,- oauth_client_secret: str | None,+ oauth_client_id: Optional[str],+ oauth_client_secret: Optional[str],) -> Tuple[Dict[str, str], Dict[str, str]]:"""Prepare headers and data for OAuth2 introspection endpoint (RFC 7662).@@ -92,7 +92,7 @@ class Oauth2Handler:user_id_field_name: str,user_role_field_name: str,user_team_id_field_name: str,- ) -> Tuple[str | None, str | None, str | None]:+ ) -> Tuple[Optional[str], Optional[str], Optional[str]]:"""Extract user information from OAuth2 response.