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
refactor(sdk): import UserAPIKeyAuth from litellm.types.proxy.auth (#45806)
nate-berria1e5c90e56b3
diff --git a/litellm/_service_logger.py b/litellm/_service_logger.pyindex 24625382d0c..6385aa96272 100644--- a/litellm/_service_logger.py+++ b/litellm/_service_logger.py@@ -16,7 +16,7 @@ from .types.services import ServiceLoggerPayload, ServiceTypesif TYPE_CHECKING:from opentelemetry.trace import Span as _Span- from litellm.proxy._types import UserAPIKeyAuth+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthSpan = _Span | AnyOTELClass = OpenTelemetrydiff --git a/litellm/integrations/SlackAlerting/slack_alerting.py b/litellm/integrations/SlackAlerting/slack_alerting.pyindex 6eeb8f0582e..94a3564e5cb 100644--- a/litellm/integrations/SlackAlerting/slack_alerting.py+++ b/litellm/integrations/SlackAlerting/slack_alerting.py@@ -38,7 +38,6 @@ from litellm.llms.custom_httpx.http_handler import (get_async_httpx_client,httpxSpecialProvider,)-from litellm.proxy._types import UserAPIKeyAuthfrom litellm.repositories.table_repositories import InvitationLinkRepositoryfrom litellm.repositories.team_repository import TeamRepositoryfrom litellm.repositories.user_repository import UserRepository@@ -52,6 +51,7 @@ from litellm.types.integrations.slack_alerting import (VirtualKeyEvent,WebhookEvent,)+from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthfrom litellm.types.proxy.model_deprecation import (DEFAULT_DEPRECATION_CHECK_INTERVAL_SECONDS,DEPRECATION_IDLE_POLL_SECONDS,diff --git a/litellm/integrations/custom_guardrail.py b/litellm/integrations/custom_guardrail.pyindex fab30deda93..45b20211ac5 100644--- a/litellm/integrations/custom_guardrail.py+++ b/litellm/integrations/custom_guardrail.py@@ -44,7 +44,7 @@ from litellm.types.utils import (if TYPE_CHECKING:from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObjfrom litellm.llms.base_llm.guardrail_translation.base_translation import BaseTranslation- from litellm.proxy._types import UserAPIKeyAuth+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthdc: Final = DualCache()@@ -119,7 +119,7 @@ def is_guardrail_intervention(e: Exception) -> bool:def _user_api_key_auth_from_request(request_data: Mapping[str, object]) -> "UserAPIKeyAuth":- from litellm.proxy._types import UserAPIKeyAuth+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthmetadata: Final = request_data.get(get_metadata_variable_name_from_kwargs(request_data))stamped: Final[Mapping[str, object]] = metadata if isinstance(metadata, dict) else {}diff --git a/litellm/integrations/custom_logger.py b/litellm/integrations/custom_logger.pyindex 45fce665bf0..5ca9840185b 100644--- a/litellm/integrations/custom_logger.py+++ b/litellm/integrations/custom_logger.py@@ -35,12 +35,12 @@ if TYPE_CHECKING:from litellm.llms.base_llm.anthropic_messages.transformation import (BaseAnthropicMessagesConfig,)- from litellm.proxy._types import UserAPIKeyAuthfrom litellm.types.mcp import (MCPPostCallResponseObject,MCPPreCallRequestObject,MCPPreCallResponseObject,)+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthfrom litellm.types.router import PreRoutingHookResponseSpan = _Spandiff --git a/litellm/integrations/datadog/datadog.py b/litellm/integrations/datadog/datadog.pyindex 7046b8d017a..6518cda5ae3 100644--- a/litellm/integrations/datadog/datadog.py+++ b/litellm/integrations/datadog/datadog.py@@ -66,7 +66,7 @@ from ..additional_logging_utils import AdditionalLoggingUtilsif TYPE_CHECKING:from fastapi import HTTPException- from litellm.proxy._types import UserAPIKeyAuth+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthclass _DatadogLoggingKwargs(TypedDict, total=False):diff --git a/litellm/integrations/otel/langfuse_logger.py b/litellm/integrations/otel/langfuse_logger.pyindex 8f6a7d5eb51..c869474f532 100644--- a/litellm/integrations/otel/langfuse_logger.py+++ b/litellm/integrations/otel/langfuse_logger.py@@ -13,7 +13,7 @@ from litellm.integrations.otel.model.trace_controls import caller_trace_controlsfrom litellm.integrations.otel.plumbing.context import request_root_spanif TYPE_CHECKING:- from litellm.proxy._types import UserAPIKeyAuth+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthfrom litellm.types.utils import ModelResponseStreamdiff --git a/litellm/integrations/otel/logger.py b/litellm/integrations/otel/logger.pyindex d8dccc39c13..0844b043a6f 100644--- a/litellm/integrations/otel/logger.py+++ b/litellm/integrations/otel/logger.py@@ -89,7 +89,7 @@ if TYPE_CHECKING:from opentelemetry.metrics import MeterProviderfrom litellm.caching.dual_cache import DualCache- from litellm.proxy._types import UserAPIKeyAuth+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthfrom litellm.types.services import ServiceLoggerPayloadfrom litellm.types.utils import (CallTypesLiteral,diff --git a/litellm/integrations/prometheus.py b/litellm/integrations/prometheus.pyindex 797c443e712..708a75aad99 100644--- a/litellm/integrations/prometheus.py+++ b/litellm/integrations/prometheus.py@@ -53,7 +53,6 @@ from litellm.models.end_user import LiteLLM_EndUserTablefrom litellm.models.team import LiteLLM_TeamTablefrom litellm.models.user import LiteLLM_UserTablefrom litellm.models.verification_token import LiteLLM_DeletedVerificationToken-from litellm.proxy._types import UserAPIKeyAuthfrom litellm.repositories.base_repository import BaseRepositoryfrom litellm.repositories.budget_repository import BudgetRepositoryfrom litellm.repositories.organization_repository import OrganizationRepository@@ -67,6 +66,7 @@ from litellm.types.integrations.prometheus import (sanitize_prometheus_label_value,validate_prometheus_deployment_and_latency_caller_identity,)+from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthfrom litellm.types.proxy.carried_budget_state import (KeyBudgetSnapshot,OrgBudgetSnapshot,diff --git a/litellm/integrations/rubrik.py b/litellm/integrations/rubrik.pyindex fe7264553df..57e8323cdc3 100644--- a/litellm/integrations/rubrik.py+++ b/litellm/integrations/rubrik.py@@ -44,7 +44,7 @@ if TYPE_CHECKING:from litellm.litellm_core_utils.litellm_logging import (Logging as LiteLLMLoggingObj,)- from litellm.proxy._types import UserAPIKeyAuth+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuth_WEBHOOK_PATH_RESPONSE_MODERATION: Final = "/v1/after_completion/openai/v1"_WEBHOOK_PATH_PROMPT_MODERATION: Final = "/v1/before_prompt/openai/v1"diff --git a/litellm/integrations/shadow_eval_logger.py b/litellm/integrations/shadow_eval_logger.pyindex 046f510266a..962c7707409 100644--- a/litellm/integrations/shadow_eval_logger.py+++ b/litellm/integrations/shadow_eval_logger.py@@ -631,13 +631,13 @@ async def _key_or_team_is_over_budget(metadata: Mapping[str, object]) -> bool:"""try:from litellm.exceptions import BudgetExceededError- from litellm.proxy._types import UserAPIKeyAuthfrom litellm.proxy.auth.auth_checks import (get_team_object,team_max_budget_check,virtual_key_max_budget_check,)from litellm.proxy.proxy_server import prisma_client, proxy_logging_obj, user_api_key_cache+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthexcept ImportError:return Falsediff --git a/litellm/integrations/websearch_interception/handler.py b/litellm/integrations/websearch_interception/handler.pyindex 0fb482cbbd9..c92e32aeb7f 100644--- a/litellm/integrations/websearch_interception/handler.py+++ b/litellm/integrations/websearch_interception/handler.py@@ -77,10 +77,10 @@ if TYPE_CHECKING:from litellm.llms.base_llm.anthropic_messages.transformation import (BaseAnthropicMessagesConfig,)- from litellm.proxy._types import UserAPIKeyAuthfrom litellm.types.llms.anthropic_messages.anthropic_response import (AnthropicMessagesResponse,)+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthfrom litellm.types.utils import ModelResponsefrom litellm.utils import CustomStreamWrapperdiff --git a/litellm/litellm_core_utils/health_check_helpers.py b/litellm/litellm_core_utils/health_check_helpers.pyindex 5d14a9761d5..a035f86ea56 100644--- a/litellm/litellm_core_utils/health_check_helpers.py+++ b/litellm/litellm_core_utils/health_check_helpers.py@@ -122,8 +122,8 @@ class HealthCheckHelpers:2. `user_api_key_auth`: This helps identify health check calls in the DB.We need this since the DB requires an API Key to track a log in the SpendLogs Table"""- from litellm.proxy._types import UserAPIKeyAuthfrom litellm.proxy.litellm_pre_call_utils import LiteLLMProxyRequestSetup+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuth_metadata_variable_name: Final = "litellm_metadata"litellm_metadata: Final = HealthCheckHelpers._get_metadata_for_health_check_call()diff --git a/litellm/llms/a2a/chat/guardrail_translation/handler.py b/litellm/llms/a2a/chat/guardrail_translation/handler.pyindex 92dc49ea9c1..afd9ba84c96 100644--- a/litellm/llms/a2a/chat/guardrail_translation/handler.py+++ b/litellm/llms/a2a/chat/guardrail_translation/handler.py@@ -26,7 +26,7 @@ from litellm.types.utils import GenericGuardrailAPIInputsif TYPE_CHECKING:from litellm.integrations.custom_guardrail import CustomGuardrailfrom litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj- from litellm.proxy._types import UserAPIKeyAuth+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthclass _A2ATextPart(TypedDict, total=False):diff --git a/litellm/llms/anthropic/chat/guardrail_translation/handler.py b/litellm/llms/anthropic/chat/guardrail_translation/handler.pyindex 7c1bee14b5b..717bafae5e7 100644--- a/litellm/llms/anthropic/chat/guardrail_translation/handler.py+++ b/litellm/llms/anthropic/chat/guardrail_translation/handler.py@@ -76,10 +76,10 @@ if TYPE_CHECKING:ModifyResponseException,)from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj- from litellm.proxy._types import UserAPIKeyAuthfrom litellm.types.llms.anthropic_messages.anthropic_response import (AnthropicMessagesResponse,)+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuth@dataclass(frozen=True, slots=True)diff --git a/litellm/llms/anthropic/pass_through/adapters/handler.py b/litellm/llms/anthropic/pass_through/adapters/handler.pyindex 454fb43b416..1bdb2b2db2c 100644--- a/litellm/llms/anthropic/pass_through/adapters/handler.py+++ b/litellm/llms/anthropic/pass_through/adapters/handler.py@@ -33,8 +33,8 @@ from litellm.types.utils import ModelResponsefrom litellm.utils import get_model_infoif TYPE_CHECKING:- from litellm.proxy._types import UserAPIKeyAuthfrom litellm.router import Router+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuth# Anthropic-only keys already mapped by the translator; strip on extra_kwargs re-merge.ANTHROPIC_ONLY_REQUEST_KEYS: Final[frozenset[str]] = frozenset({"output_config", "safeguards"})diff --git a/litellm/llms/anthropic/pass_through/context_management/dispatcher.py b/litellm/llms/anthropic/pass_through/context_management/dispatcher.pyindex 09fbaa89237..9b4e12ef2f9 100644--- a/litellm/llms/anthropic/pass_through/context_management/dispatcher.py+++ b/litellm/llms/anthropic/pass_through/context_management/dispatcher.py@@ -13,8 +13,8 @@ from .editors import apply_clear_tool_uses_20250919, apply_compact_20260112from .result import PolyfillResultif TYPE_CHECKING:- from litellm.proxy._types import UserAPIKeyAuthfrom litellm.router import Router+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthEditorResult: TypeAlias = "PolyfillResult | tuple[list[dict[str, object]], AppliedEdit | None]"diff --git a/litellm/llms/anthropic/pass_through/context_management/editors/compact.py b/litellm/llms/anthropic/pass_through/context_management/editors/compact.pyindex 85a20ea4435..deb3d849ae9 100644--- a/litellm/llms/anthropic/pass_through/context_management/editors/compact.py+++ b/litellm/llms/anthropic/pass_through/context_management/editors/compact.py@@ -29,7 +29,6 @@ from litellm.types.llms.anthropic import (if TYPE_CHECKING:from litellm.litellm_core_utils.streaming_handler import CustomStreamWrapper- from litellm.proxy._types import UserAPIKeyAuthfrom litellm.proxy.hooks.parallel_request_limiter_v3 import (RateLimitDescriptor,RateLimitDescriptorRateLimitObject,@@ -41,6 +40,7 @@ if TYPE_CHECKING:AllAnthropicToolsValues,)from litellm.types.llms.openai import ChatCompletionToolParam+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthfrom litellm.types.utils import ModelResponsefrom ..constants import (diff --git a/litellm/llms/base_llm/files/transformation.py b/litellm/llms/base_llm/files/transformation.pyindex cc36962da6b..083e396c0bd 100644--- a/litellm/llms/base_llm/files/transformation.py+++ b/litellm/llms/base_llm/files/transformation.py@@ -22,9 +22,9 @@ from ..chat.transformation import BaseConfigif TYPE_CHECKING:from litellm.litellm_core_utils.litellm_logging import Logging as _LiteLLMLoggingObjfrom litellm.litellm_core_utils.tokenizer import Encoding as Tokenizer- from litellm.proxy._types import UserAPIKeyAuth as _UserAPIKeyAuthfrom litellm.router import Router as _Routerfrom litellm.types.llms.openai import HttpxBinaryResponseContent+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuth as _UserAPIKeyAuthLiteLLMLoggingObj = _LiteLLMLoggingObjSpan = Anydiff --git a/litellm/llms/base_llm/guardrail_translation/base_translation.py b/litellm/llms/base_llm/guardrail_translation/base_translation.pyindex 70b8291d32c..88c4dbfdce6 100644--- a/litellm/llms/base_llm/guardrail_translation/base_translation.py+++ b/litellm/llms/base_llm/guardrail_translation/base_translation.py@@ -11,8 +11,8 @@ if TYPE_CHECKING:ModifyResponseException,)from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj- from litellm.proxy._types import UserAPIKeyAuthfrom litellm.types.llms.openai import AllMessageValues+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuth@dataclass(slots=True)diff --git a/litellm/llms/base_llm/managed_resources/base_managed_resource.py b/litellm/llms/base_llm/managed_resources/base_managed_resource.pyindex 81b3411ed56..bb4cf42fa1e 100644--- a/litellm/llms/base_llm/managed_resources/base_managed_resource.py+++ b/litellm/llms/base_llm/managed_resources/base_managed_resource.py@@ -16,7 +16,7 @@ from litellm.llms.base_llm.managed_resources.isolation import (can_access_resource,resolve_resource_owner_id,)-from litellm.proxy._types import UserAPIKeyAuth+from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthfrom litellm.types.utils import SpecialEnumsMANAGED_RESOURCES_TARGET: Final = "managed_resources"diff --git a/litellm/llms/base_llm/managed_resources/isolation.py b/litellm/llms/base_llm/managed_resources/isolation.pyindex 0a09de79891..547bed21247 100644--- a/litellm/llms/base_llm/managed_resources/isolation.py+++ b/litellm/llms/base_llm/managed_resources/isolation.py@@ -12,10 +12,10 @@ are denied so an empty user_id can never select an unscoped query.from typing import Any, Final-from litellm.proxy._types import (+from litellm.types.proxy.auth.user_api_key_auth import (UserAPIKeyAuth,)-from litellm.proxy._types import (+from litellm.types.proxy.auth.user_api_key_auth import (user_api_key_has_admin_view as _user_has_admin_view,)diff --git a/litellm/llms/bedrock/passthrough/guardrail_translation/handler.py b/litellm/llms/bedrock/passthrough/guardrail_translation/handler.pyindex eac8afd767c..b7b393ada6b 100644--- a/litellm/llms/bedrock/passthrough/guardrail_translation/handler.py+++ b/litellm/llms/bedrock/passthrough/guardrail_translation/handler.py@@ -17,8 +17,8 @@ if TYPE_CHECKING:from litellm.llms.pass_through.guardrail_translation.handler import (PassThroughEndpointHandler,)- from litellm.proxy._types import UserAPIKeyAuthfrom litellm.proxy.utils import ProxyLogging+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuth_CONVERSE_ACTIONS: Final = frozenset({"converse", "converse-stream"})_EVENT_STREAM_CONTENT_TYPE: Final = "vnd.amazon.eventstream"diff --git a/litellm/llms/custom_httpx/llm_http_handler.py b/litellm/llms/custom_httpx/llm_http_handler.pyindex a8462c55332..134ab96ab56 100644--- a/litellm/llms/custom_httpx/llm_http_handler.py+++ b/litellm/llms/custom_httpx/llm_http_handler.py@@ -213,7 +213,6 @@ if TYPE_CHECKING:FakeAnthropicMessagesStreamIterator,)from litellm.llms.base_llm.passthrough.transformation import BasePassthroughConfig- from litellm.proxy._types import UserAPIKeyAuthfrom litellm.types.google_genai.main import GenerateContentResponsefrom litellm.types.llms.openai_evals import (CancelEvalResponse,@@ -225,6 +224,7 @@ if TYPE_CHECKING:Run,RunDeleteResponse,)+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthLiteLLMLoggingObj = _LiteLLMLoggingObjelse:diff --git a/litellm/llms/gemini/google_genai/guardrail_translation/handler.py b/litellm/llms/gemini/google_genai/guardrail_translation/handler.pyindex 0c1fe8171e8..44cdac11325 100644--- a/litellm/llms/gemini/google_genai/guardrail_translation/handler.py+++ b/litellm/llms/gemini/google_genai/guardrail_translation/handler.py@@ -25,7 +25,7 @@ from litellm.types.utils import GenericGuardrailAPIInputsif TYPE_CHECKING:from litellm.integrations.custom_guardrail import CustomGuardrailfrom litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj- from litellm.proxy._types import UserAPIKeyAuth+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuth_EMPTY_REQUEST_DATA: Final[Mapping[str, object]] = MappingProxyType({})diff --git a/litellm/llms/litellm_proxy/skills/handler.py b/litellm/llms/litellm_proxy/skills/handler.pyindex d56dca1699b..77738ae99a2 100644--- a/litellm/llms/litellm_proxy/skills/handler.py+++ b/litellm/llms/litellm_proxy/skills/handler.py@@ -22,8 +22,8 @@ from litellm.llms.litellm_proxy.skills.constants import (MAX_SKILLS_PER_SEARCH,)from litellm.models.skills import LiteLLM_SkillsTable, NewSkillRequest-from litellm.proxy._types import UserAPIKeyAuthfrom litellm.repositories.table_repositories import SkillsRepository+from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuth# Skills are looked up on every chat completion that has skills enabled# (`SkillsInjectionHook` calls ``fetch_skill_from_db``). 60s LRU/TTL cachediff --git a/litellm/llms/litellm_proxy/skills/skill_search.py b/litellm/llms/litellm_proxy/skills/skill_search.pyindex 98fc3bd2395..d8c1b6a368e 100644--- a/litellm/llms/litellm_proxy/skills/skill_search.py+++ b/litellm/llms/litellm_proxy/skills/skill_search.py@@ -21,9 +21,9 @@ from litellm.types.utils import LlmProvidersif TYPE_CHECKING:from litellm.models.skills import LiteLLM_SkillsTable- from litellm.proxy._types import UserAPIKeyAuthfrom litellm.proxy.utils import ProxyLoggingfrom litellm.router import Router+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthDEFAULT_SKILL_SEARCH_TOP_K: Final = 5MAX_SKILL_SEARCH_TOP_K: Final = 100diff --git a/litellm/llms/litellm_proxy/skills/transformation.py b/litellm/llms/litellm_proxy/skills/transformation.pyindex 4cbd9f50301..73e26606497 100644--- a/litellm/llms/litellm_proxy/skills/transformation.py+++ b/litellm/llms/litellm_proxy/skills/transformation.py@@ -22,7 +22,7 @@ from litellm.types.utils import LlmProvidersif TYPE_CHECKING:from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObjfrom litellm.models.skills import LiteLLM_SkillsTable- from litellm.proxy._types import UserAPIKeyAuth+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthclass LiteLLMSkillsTransformationHandler:diff --git a/litellm/llms/openai/chat/guardrail_translation/handler.py b/litellm/llms/openai/chat/guardrail_translation/handler.pyindex d24075dabd3..a12f5f164e4 100644--- a/litellm/llms/openai/chat/guardrail_translation/handler.py+++ b/litellm/llms/openai/chat/guardrail_translation/handler.py@@ -69,7 +69,7 @@ if TYPE_CHECKING:ModifyResponseException,)from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj- from litellm.proxy._types import UserAPIKeyAuth+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthclass OpenAIChatCompletionsHandler(BaseTranslation):diff --git a/litellm/llms/openai/responses/guardrail_translation/handler.py b/litellm/llms/openai/responses/guardrail_translation/handler.pyindex a267b66bb22..61e0127f5b1 100644--- a/litellm/llms/openai/responses/guardrail_translation/handler.py+++ b/litellm/llms/openai/responses/guardrail_translation/handler.py@@ -102,8 +102,8 @@ if TYPE_CHECKING:ModifyResponseException,)from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj- from litellm.proxy._types import UserAPIKeyAuthfrom litellm.types.llms.openai import ResponseInputParam+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthclass _ToolCallShape(NamedTuple):diff --git a/litellm/llms/openai/videos/guardrail_translation/handler.py b/litellm/llms/openai/videos/guardrail_translation/handler.pyindex 7bdcc59ee7e..04511afa783 100644--- a/litellm/llms/openai/videos/guardrail_translation/handler.py+++ b/litellm/llms/openai/videos/guardrail_translation/handler.py@@ -6,7 +6,7 @@ from litellm.types.utils import GenericGuardrailAPIInputsif TYPE_CHECKING:from litellm.integrations.custom_guardrail import CustomGuardrailfrom litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj- from litellm.proxy._types import UserAPIKeyAuth+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthclass OpenAIVideoGenerationHandler(BaseTranslation):diff --git a/litellm/llms/pass_through/guardrail_translation/handler.py b/litellm/llms/pass_through/guardrail_translation/handler.pyindex 6e31569d421..a27ea70fbdb 100644--- a/litellm/llms/pass_through/guardrail_translation/handler.py+++ b/litellm/llms/pass_through/guardrail_translation/handler.py@@ -18,8 +18,8 @@ from litellm.types.utils import GenericGuardrailAPIInputsif TYPE_CHECKING:from litellm.integrations.custom_guardrail import CustomGuardrailfrom litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj- from litellm.proxy._types import UserAPIKeyAuthfrom litellm.proxy.utils import ProxyLogging+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthclass PassThroughEndpointHandler(BaseTranslation):diff --git a/litellm/proxy/_types.py b/litellm/proxy/_types.pyindex 7b2a63974d8..b6c81f17761 100644--- a/litellm/proxy/_types.py+++ b/litellm/proxy/_types.py@@ -25,7 +25,6 @@ from typing_extensions import (ReadOnly,Required,TypedDict,- TypeIs, # noqa: TID251 # narrows the before-validator input without copying it)from litellm._uuid import uuiddiff --git a/litellm/responses/mcp/chat_completions_handler.py b/litellm/responses/mcp/chat_completions_handler.pyindex 5a05dfe0245..a8c93eebff3 100644--- a/litellm/responses/mcp/chat_completions_handler.py+++ b/litellm/responses/mcp/chat_completions_handler.py@@ -15,7 +15,7 @@ from litellm.types.utils import Message, ModelResponsefrom litellm.utils import CustomStreamWrapperif TYPE_CHECKING:- from litellm.proxy._types import UserAPIKeyAuth+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthclass _MCPCompletionKwargs(TypedDict, total=False, extra_items=object):diff --git a/litellm/responses/mcp/litellm_proxy_mcp_handler.py b/litellm/responses/mcp/litellm_proxy_mcp_handler.pyindex d3e3509b8f0..4dd0394005d 100644--- a/litellm/responses/mcp/litellm_proxy_mcp_handler.py+++ b/litellm/responses/mcp/litellm_proxy_mcp_handler.py@@ -42,8 +42,8 @@ if TYPE_CHECKING:from mcp.types import Tool as MCPToolfrom litellm.proxy._experimental.mcp_server.ui_session_utils import GrantedToolsetIds- from litellm.proxy._types import UserAPIKeyAuthfrom litellm.proxy.utils import ProxyLogging+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthelse:MCPTool = Anydiff --git a/litellm/responses/mcp/mcp_streaming_iterator.py b/litellm/responses/mcp/mcp_streaming_iterator.pyindex d2c240f8768..59b50ead83c 100644--- a/litellm/responses/mcp/mcp_streaming_iterator.py+++ b/litellm/responses/mcp/mcp_streaming_iterator.py@@ -27,8 +27,8 @@ if TYPE_CHECKING:from mcp.types import Tool as MCPTool- from litellm.proxy._types import UserAPIKeyAuthfrom litellm.responses.mcp.litellm_proxy_mcp_handler import MCPToolResult+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthelse:MCPTool = Anydiff --git a/litellm/responses/mcp/request_context.py b/litellm/responses/mcp/request_context.pyindex 6628219e280..3254557c1f0 100644--- a/litellm/responses/mcp/request_context.py+++ b/litellm/responses/mcp/request_context.py@@ -18,7 +18,7 @@ from pydantic import TypeAdapterfrom typing_extensions import NotRequired, ReadOnly, TypedDictif TYPE_CHECKING:- from litellm.proxy._types import UserAPIKeyAuth+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthclass _AuthCarryingMetadata(TypedDict):diff --git a/litellm/responses/streaming_iterator.py b/litellm/responses/streaming_iterator.pyindex 00688782d2a..36f433a4741 100644--- a/litellm/responses/streaming_iterator.py+++ b/litellm/responses/streaming_iterator.py@@ -50,7 +50,7 @@ from litellm.utils import async_post_call_success_deployment_hookif TYPE_CHECKING:from litellm.caching.caching_handler import LLMCachingHandler- from litellm.proxy._types import UserAPIKeyAuth+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthfrom litellm.types.responses.streaming_websocket import (PresidioGuardrailCallback,ResponsesBackendWebSocket,diff --git a/litellm/router_strategy/adaptive_router/hooks.py b/litellm/router_strategy/adaptive_router/hooks.pyindex 0bb00a08f51..92207e07c52 100644--- a/litellm/router_strategy/adaptive_router/hooks.py+++ b/litellm/router_strategy/adaptive_router/hooks.py@@ -28,7 +28,7 @@ from litellm.router_strategy.adaptive_router.config import (from litellm.router_strategy.adaptive_router.signals import Turnif TYPE_CHECKING:- from litellm.proxy._types import UserAPIKeyAuth+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuth# Identity fields hashed into a derived session key so the same conversation# from the same caller produces a stable key, while different keys/teams/usersdiff --git a/litellm/types/passthrough_endpoints/managed_id_rewriter.py b/litellm/types/passthrough_endpoints/managed_id_rewriter.pyindex 33749cc2ab8..0603c13d905 100644--- a/litellm/types/passthrough_endpoints/managed_id_rewriter.py+++ b/litellm/types/passthrough_endpoints/managed_id_rewriter.py@@ -24,8 +24,8 @@ from pydantic import JsonValueif TYPE_CHECKING:from litellm.models.managed_files import LiteLLM_ManagedFileTable- from litellm.proxy._types import UserAPIKeyAuthfrom litellm.types.llms.openai import OpenAIFileObject+ from litellm.types.proxy.auth.user_api_key_auth import UserAPIKeyAuthSortOrder: TypeAlias = Literal["asc", "desc"]ResourceKind: TypeAlias = Literal["files", "batches"]