litellm/tests/unit/test_private_usage_aliases.py
Mateo Wang 58258409c9
refactor(proxy): expose public names for private proxy helpers (#45170)
* refactor(proxy): expose public names for private proxy helpers

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(proxy): keep original class names behind public aliases

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(proxy): preserve internal callback filtering

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(proxy): keep _PROXY_ class names for managed files hooks

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(proxy): keep old private names in package exports

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(proxy): preserve recursive auth helper name

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(proxy): align MCP limiter tests with server enforcement

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(proxy): match main's MCP limiter tests

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(proxy): keep old private names bound in importing modules

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(proxy): preserve compatibility imports through strict lint

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(proxy): use exact pyright suppression in password helper test

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* style(proxy): add reasons to compatibility import noqa comments

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(proxy): update IN-list baseline for renamed helpers

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-07 18:59:27 -07:00

5429 lines
153 KiB
Python

import inspect
from collections.abc import Awaitable, Callable
from importlib import import_module
from types import MethodType
from typing import Final, cast
import pytest
PROXY_CLASS_NAME_ALIAS_CASES: Final = (
(
"litellm.proxy.hooks.dynamic_rate_limiter",
"_PROXY_DynamicRateLimitHandler",
"PROXY_DynamicRateLimitHandler",
),
(
"litellm.proxy.hooks.dynamic_rate_limiter_v3",
"_PROXY_DynamicRateLimitHandlerV3",
"PROXY_DynamicRateLimitHandlerV3",
),
(
"litellm.proxy.common_utils.config_sync_pubsub",
"_ConfigSyncPubSub",
"ConfigSyncPubSub",
),
(
"litellm.proxy.guardrails.guardrail_hooks.presidio",
"_OPTIONAL_PresidioPIIMasking",
"OPTIONAL_PresidioPIIMasking",
),
(
"litellm.proxy.hooks.prompt_injection_detection",
"_OPTIONAL_PromptInjectionDetection",
"OPTIONAL_PromptInjectionDetection",
),
(
"litellm.proxy.hooks.batch_redis_get",
"_PROXY_BatchRedisRequests",
"PROXY_BatchRedisRequests",
),
(
"litellm.proxy.hooks.azure_content_safety",
"_PROXY_AzureContentSafety",
"PROXY_AzureContentSafety",
),
(
"litellm.proxy.guardrails.guardrail_hooks.cisco_ai_defense.cisco_ai_defense_mcp",
"_CiscoAIDefenseMcpMixin",
"CiscoAIDefenseMcpMixin",
),
(
"litellm.proxy.hooks.cache_control_check",
"_PROXY_CacheControlCheck",
"PROXY_CacheControlCheck",
),
(
"litellm.proxy.hooks.max_budget_per_session_limiter",
"_PROXY_MaxBudgetPerSessionHandler",
"PROXY_MaxBudgetPerSessionHandler",
),
(
"litellm.proxy.hooks.max_iterations_limiter",
"_PROXY_MaxIterationsHandler",
"PROXY_MaxIterationsHandler",
),
(
"litellm.proxy.hooks.parallel_request_limiter",
"_PROXY_MaxParallelRequestsHandler",
"PROXY_MaxParallelRequestsHandler",
),
(
"litellm.proxy.hooks.parallel_request_limiter_v3",
"_PROXY_MaxParallelRequestsHandler_v3",
"PROXY_MaxParallelRequestsHandler_v3",
),
(
"litellm.proxy.hooks.sensitive_data_routing",
"_PROXY_SensitiveDataRoutingHandler",
"PROXY_SensitiveDataRoutingHandler",
),
(
"litellm.proxy.hooks.batch_rate_limiter",
"_PROXY_BatchRateLimiter",
"PROXY_BatchRateLimiter",
),
(
"litellm.proxy.hooks.model_max_budget_limiter",
"_PROXY_VirtualKeyModelMaxBudgetLimiter",
"PROXY_VirtualKeyModelMaxBudgetLimiter",
),
(
"litellm.proxy.hooks.proxy_track_cost_callback",
"_ProxyDBLogger",
"ProxyDBLogger",
),
(
"enterprise.litellm_enterprise.proxy.hooks.managed_files",
"_PROXY_LiteLLMManagedFiles",
"PROXY_LiteLLMManagedFiles",
),
(
"enterprise.litellm_enterprise.proxy.hooks.managed_vector_stores",
"_PROXY_LiteLLMManagedVectorStores",
"PROXY_LiteLLMManagedVectorStores",
),
)
PACKAGE_EXPORT_ALIAS_CASES: Final = (
("litellm.proxy.hooks", "_PROXY_CacheControlCheck", "PROXY_CacheControlCheck"),
(
"litellm.proxy.hooks",
"_PROXY_MaxBudgetPerSessionHandler",
"PROXY_MaxBudgetPerSessionHandler",
),
("litellm.proxy.hooks", "_PROXY_MaxIterationsHandler", "PROXY_MaxIterationsHandler"),
("litellm.proxy.hooks", "_PROXY_MaxParallelRequestsHandler", "PROXY_MaxParallelRequestsHandler"),
(
"litellm.proxy.hooks",
"_PROXY_MaxParallelRequestsHandler_v3",
"PROXY_MaxParallelRequestsHandler_v3",
),
(
"litellm.proxy.hooks",
"_PROXY_SensitiveDataRoutingHandler",
"PROXY_SensitiveDataRoutingHandler",
),
(
"litellm.proxy.management_endpoints.policy_endpoints",
"_build_all_names_per_competitor",
"build_all_names_per_competitor",
),
(
"litellm.proxy.management_endpoints.policy_endpoints",
"_build_comparison_blocked_words",
"build_comparison_blocked_words",
),
(
"litellm.proxy.management_endpoints.policy_endpoints",
"_build_competitor_guardrail_definitions",
"build_competitor_guardrail_definitions",
),
(
"litellm.proxy.management_endpoints.policy_endpoints",
"_build_name_blocked_words",
"build_name_blocked_words",
),
(
"litellm.proxy.management_endpoints.policy_endpoints",
"_build_recommendation_blocked_words",
"build_recommendation_blocked_words",
),
(
"litellm.proxy.management_endpoints.policy_endpoints",
"_build_refinement_prompt",
"build_refinement_prompt",
),
(
"litellm.proxy.management_endpoints.policy_endpoints",
"_clean_competitor_line",
"clean_competitor_line",
),
(
"litellm.proxy.management_endpoints.policy_endpoints",
"_parse_variations_response",
"parse_variations_response",
),
)
MODULE_IMPORT_ALIAS_CASES: Final = (
(
"litellm.litellm_core_utils.custom_logger_registry",
"_PROXY_DynamicRateLimitHandler",
"PROXY_DynamicRateLimitHandler",
),
(
"litellm.litellm_core_utils.custom_logger_registry",
"_PROXY_DynamicRateLimitHandlerV3",
"PROXY_DynamicRateLimitHandlerV3",
),
(
"litellm.proxy._experimental.mcp_server.auth.user_api_key_auth_mcp",
"_read_request_body",
"read_request_body",
),
(
"litellm.proxy._experimental.mcp_server.auth.user_api_key_auth_mcp",
"_run_centralized_common_checks",
"run_centralized_common_checks",
),
(
"litellm.proxy._experimental.mcp_server.bridge_token_flow",
"_V2_GCM_PREFIX",
"V2_GCM_PREFIX",
),
(
"litellm.proxy._experimental.mcp_server.db",
"_get_salt_key",
"get_salt_key",
),
(
"litellm.proxy._experimental.mcp_server.discoverable_endpoints",
"_bridge_mint_error_response",
"bridge_mint_error_response",
),
(
"litellm.proxy._experimental.mcp_server.discoverable_endpoints",
"_extract_user_id_from_request",
"extract_user_id_from_request",
),
(
"litellm.proxy._experimental.mcp_server.discoverable_endpoints",
"_finish_bridge_mint",
"finish_bridge_mint",
),
(
"litellm.proxy._experimental.mcp_server.discoverable_endpoints",
"_prepare_bridge_mint",
"prepare_bridge_mint",
),
(
"litellm.proxy._experimental.mcp_server.discoverable_endpoints",
"_prepare_bridge_refresh",
"prepare_bridge_refresh",
),
(
"litellm.proxy._experimental.mcp_server.discoverable_endpoints",
"_read_request_body",
"read_request_body",
),
(
"litellm.proxy._experimental.mcp_server.discoverable_endpoints",
"_reload_active_user_by_id",
"reload_active_user_by_id",
),
(
"litellm.proxy._experimental.mcp_server.mcp_server_manager",
"_is_mcp_admitted_user_subject",
"is_mcp_admitted_user_subject",
),
(
"litellm.proxy._experimental.mcp_server.mcp_server_manager",
"_redact_mcp_resource_url",
"redact_mcp_resource_url",
),
(
"litellm.proxy._experimental.mcp_server.oauth2_flow_backfill",
"_decode_oauth_payload",
"decode_oauth_payload",
),
(
"litellm.proxy._experimental.mcp_server.operations",
"_caller_authorization_fans_out",
"caller_authorization_fans_out",
),
(
"litellm.proxy._experimental.mcp_server.operations",
"_client_forwarded_authorization_headers",
"client_forwarded_authorization_headers",
),
(
"litellm.proxy._experimental.mcp_server.operations",
"_redact_mcp_resource_url",
"redact_mcp_resource_url",
),
(
"litellm.proxy._experimental.mcp_server.operations",
"_request_auth_header",
"request_auth_header",
),
(
"litellm.proxy._experimental.mcp_server.operations",
"_request_extra_headers",
"request_extra_headers",
),
(
"litellm.proxy._experimental.mcp_server.operations",
"_request_resolved_auth_headers",
"request_resolved_auth_headers",
),
(
"litellm.proxy._experimental.mcp_server.operations",
"_resolve_openapi_tool_auth",
"resolve_openapi_tool_auth",
),
(
"litellm.proxy._experimental.mcp_server.operations",
"_should_strip_caller_authorization",
"should_strip_caller_authorization",
),
(
"litellm.proxy._experimental.mcp_server.rest_endpoints",
"_UPSTREAM_OAUTH_DISCOVERY_AUTH_TYPES",
"UPSTREAM_OAUTH_DISCOVERY_AUTH_TYPES",
),
(
"litellm.proxy._experimental.mcp_server.rest_endpoints",
"_apply_toolset_scope",
"apply_toolset_scope",
),
(
"litellm.proxy._experimental.mcp_server.rest_endpoints",
"_inherit_credentials_from_existing_server",
"inherit_credentials_from_existing_server",
),
(
"litellm.proxy._experimental.mcp_server.rest_endpoints",
"_redact_mcp_resource_url",
"redact_mcp_resource_url",
),
(
"litellm.proxy._experimental.mcp_server.rest_endpoints",
"_safe_get_request_headers",
"safe_get_request_headers",
),
(
"litellm.proxy._experimental.mcp_server.server",
"_is_mcp_admitted_user_subject",
"is_mcp_admitted_user_subject",
),
(
"litellm.proxy._experimental.mcp_server.server",
"_mcp_active_toolset_id",
"mcp_active_toolset_id",
),
(
"litellm.proxy._experimental.mcp_server.server",
"_mcp_gateway_initialize_instructions",
"mcp_gateway_initialize_instructions",
),
(
"litellm.proxy._experimental.mcp_server.server",
"_mcp_gateway_server_name",
"mcp_gateway_server_name",
),
(
"litellm.proxy.anthropic_endpoints.endpoints",
"_read_request_body",
"read_request_body",
),
(
"litellm.proxy.anthropic_endpoints.gateway_endpoints",
"_safe_set_request_parsed_body",
"safe_set_request_parsed_body",
),
(
"litellm.proxy.auth.auth_checks",
"_safe_get_request_headers",
"safe_get_request_headers",
),
(
"litellm.proxy.auth.auth_checks",
"_safe_get_request_query_params",
"safe_get_request_query_params",
),
(
"litellm.proxy.auth.auth_exception_handler",
"_get_request_ip_address",
"get_request_ip_address",
),
(
"litellm.proxy.auth.fallback_budget",
"_is_model_cost_zero",
"is_model_cost_zero",
),
(
"litellm.proxy.auth.ip_address_utils",
"_get_request_ip_address",
"get_request_ip_address",
),
(
"litellm.proxy.auth.resolvers.store",
"_cache_key_object",
"cache_key_object",
),
(
"litellm.proxy.auth.resolvers.store",
"_copy_user_api_key_auth_for_cache",
"copy_user_api_key_auth_for_cache",
),
(
"litellm.proxy.auth.resolvers.store",
"_fetch_key_object_from_db_with_reconnect",
"fetch_key_object_from_db_with_reconnect",
),
(
"litellm.proxy.auth.route_checks",
"_user_is_org_admin",
"user_is_org_admin",
),
(
"litellm.proxy.auth.user_api_key_auth",
"_cache_key_object",
"cache_key_object",
),
(
"litellm.proxy.auth.user_api_key_auth",
"_can_object_call_model",
"can_object_call_model",
),
(
"litellm.proxy.auth.user_api_key_auth",
"_check_end_user_budget",
"check_end_user_budget",
),
(
"litellm.proxy.auth.user_api_key_auth",
"_delete_cache_key_object",
"delete_cache_key_object",
),
(
"litellm.proxy.auth.user_api_key_auth",
"_get_user_role",
"get_user_role",
),
(
"litellm.proxy.auth.user_api_key_auth",
"_is_model_cost_zero",
"is_model_cost_zero",
),
(
"litellm.proxy.auth.user_api_key_auth",
"_is_user_proxy_admin",
"is_user_proxy_admin",
),
(
"litellm.proxy.auth.user_api_key_auth",
"_read_request_body",
"read_request_body",
),
(
"litellm.proxy.auth.user_api_key_auth",
"_realtime_request_body",
"realtime_request_body",
),
(
"litellm.proxy.auth.user_api_key_auth",
"_safe_get_request_headers",
"safe_get_request_headers",
),
(
"litellm.proxy.auth.user_api_key_auth",
"_safe_get_request_query_params",
"safe_get_request_query_params",
),
(
"litellm.proxy.auth.user_api_key_auth",
"_safe_set_request_parsed_body",
"safe_set_request_parsed_body",
),
(
"litellm.proxy.auth.user_api_key_auth",
"_team_member_max_budget_alert_check",
"team_member_max_budget_alert_check",
),
(
"litellm.proxy.auth.user_api_key_auth",
"_virtual_key_max_budget_alert_check",
"virtual_key_max_budget_alert_check",
),
(
"litellm.proxy.auth.user_api_key_auth",
"_virtual_key_max_budget_check",
"virtual_key_max_budget_check",
),
(
"litellm.proxy.auth.user_api_key_auth",
"_virtual_key_soft_budget_check",
"virtual_key_soft_budget_check",
),
(
"litellm.proxy.batches_endpoints.endpoints",
"_is_base64_encoded_unified_file_id",
"is_base64_encoded_unified_file_id",
),
(
"litellm.proxy.batches_endpoints.endpoints",
"_read_request_body",
"read_request_body",
),
(
"litellm.proxy.common_request_processing",
"_check_and_merge_model_level_guardrails",
"check_and_merge_model_level_guardrails",
),
(
"litellm.proxy.common_utils.auth_cache_invalidation_pubsub",
"_ConfigSyncPubSub",
"ConfigSyncPubSub",
),
(
"litellm.proxy.common_utils.auth_cache_invalidation_pubsub",
"_pubsub_capable_client",
"pubsub_capable_client",
),
(
"litellm.proxy.common_utils.key_rotation_manager",
"_calculate_key_rotation_time",
"calculate_key_rotation_time",
),
(
"litellm.proxy.common_utils.openai_endpoint_utils",
"_read_request_body",
"read_request_body",
),
(
"litellm.proxy.container_endpoints.endpoints",
"_read_request_body",
"read_request_body",
),
(
"litellm.proxy.custom_hooks.custom_ui_sso_hook",
"_safe_get_request_headers",
"safe_get_request_headers",
),
(
"litellm.proxy.db.db_span",
"_is_exception_related_to_db",
"is_exception_related_to_db",
),
(
"litellm.proxy.fine_tuning_endpoints.endpoints",
"_is_base64_encoded_unified_file_id",
"is_base64_encoded_unified_file_id",
),
(
"litellm.proxy.google_endpoints.agents_endpoints",
"_read_request_body",
"read_request_body",
),
(
"litellm.proxy.google_endpoints.agents_endpoints",
"_safe_get_request_query_params",
"safe_get_request_query_params",
),
(
"litellm.proxy.google_endpoints.endpoints",
"_read_request_body",
"read_request_body",
),
(
"litellm.proxy.guardrails.guardrail_endpoints",
"_user_has_admin_view",
"user_api_key_has_admin_view",
),
(
"litellm.proxy.guardrails.guardrail_hooks.azure.prompt_shield",
"_RESPONSES_API_CALL_TYPES",
"RESPONSES_API_CALL_TYPES",
),
(
"litellm.proxy.guardrails.guardrail_hooks.azure.text_moderation",
"_RESPONSES_API_CALL_TYPES",
"RESPONSES_API_CALL_TYPES",
),
(
"litellm.proxy.guardrails.guardrail_hooks.cisco_ai_defense.cisco_ai_defense",
"_CiscoAIDefenseMcpMixin",
"CiscoAIDefenseMcpMixin",
),
(
"litellm.proxy.guardrails.guardrail_hooks.litellm_content_filter.competitor_intent.airline",
"_compile_marker",
"compile_marker",
),
(
"litellm.proxy.guardrails.guardrail_hooks.litellm_content_filter.competitor_intent.airline",
"_count_signals",
"count_signals",
),
(
"litellm.proxy.guardrails.guardrail_hooks.litellm_content_filter.competitor_intent.airline",
"_word_boundary_match",
"word_boundary_match",
),
(
"litellm.proxy.guardrails.guardrail_registry",
"_OPTIONAL_PresidioPIIMasking",
"OPTIONAL_PresidioPIIMasking",
),
(
"litellm.proxy.health_endpoints._health_endpoints",
"_clean_endpoint_data",
"clean_endpoint_data",
),
(
"litellm.proxy.health_endpoints._health_endpoints",
"_update_litellm_params_for_health_check",
"update_litellm_params_for_health_check",
),
(
"litellm.proxy.hooks.dynamic_rate_limiter_v3",
"_PROXY_MaxParallelRequestsHandler_v3",
"PROXY_MaxParallelRequestsHandler_v3",
),
(
"litellm.proxy.hooks.key_management_event_hooks",
"_hash_token_if_needed",
"hash_token_if_needed",
),
(
"litellm.proxy.hooks.proxy_track_cost_callback",
"_sanitize_error_information_for_spend_logs",
"sanitize_error_information_for_spend_logs",
),
(
"litellm.proxy.litellm_pre_call_utils",
"_safe_get_request_headers",
"safe_get_request_headers",
),
(
"litellm.proxy.management_endpoints.access_group_endpoints",
"_cache_access_object",
"cache_access_object",
),
(
"litellm.proxy.management_endpoints.access_group_endpoints",
"_cache_key_object",
"cache_key_object",
),
(
"litellm.proxy.management_endpoints.access_group_endpoints",
"_cache_team_object",
"cache_team_object",
),
(
"litellm.proxy.management_endpoints.access_group_endpoints",
"_get_team_object_from_cache",
"get_team_object_from_cache",
),
(
"litellm.proxy.management_endpoints.auto_router_endpoints",
"_virtual_key_max_budget_check",
"virtual_key_max_budget_check",
),
(
"litellm.proxy.management_endpoints.budget_management_endpoints",
"_user_has_admin_view",
"user_api_key_has_admin_view",
),
(
"litellm.proxy.management_endpoints.common_utils",
"_premium_user_check",
"premium_user_check",
),
(
"litellm.proxy.management_endpoints.credential_migration",
"_ALGO_AES_GCM",
"ALGO_AES_GCM",
),
(
"litellm.proxy.management_endpoints.credential_migration",
"_ENCRYPTION_ALGORITHM_SETTING",
"ENCRYPTION_ALGORITHM_SETTING",
),
(
"litellm.proxy.management_endpoints.credential_migration",
"_V2_GCM_PREFIX",
"V2_GCM_PREFIX",
),
(
"litellm.proxy.management_endpoints.credential_migration",
"_get_salt_key",
"get_salt_key",
),
(
"litellm.proxy.management_endpoints.customer_endpoints",
"_set_object_permission",
"set_object_permission",
),
(
"litellm.proxy.management_endpoints.internal_user_endpoints",
"_check_permissions_caller_permission",
"check_permissions_caller_permission",
),
(
"litellm.proxy.management_endpoints.internal_user_endpoints",
"_set_object_permission",
"set_object_permission",
),
(
"litellm.proxy.management_endpoints.internal_user_endpoints",
"_user_has_admin_view",
"user_api_key_has_admin_view",
),
(
"litellm.proxy.management_endpoints.jwt_key_mapping_endpoints",
"_user_has_admin_view",
"user_api_key_has_admin_view",
),
(
"litellm.proxy.management_endpoints.key_management_endpoints",
"_add_model_to_db",
"add_model_to_db",
),
(
"litellm.proxy.management_endpoints.key_management_endpoints",
"_check_disable_global_guardrails_caller_permission",
"check_disable_global_guardrails_caller_permission",
),
(
"litellm.proxy.management_endpoints.key_management_endpoints",
"_check_passthrough_routes_caller_permission",
"check_passthrough_routes_caller_permission",
),
(
"litellm.proxy.management_endpoints.key_management_endpoints",
"_delete_cache_key_object",
"delete_cache_key_object",
),
(
"litellm.proxy.management_endpoints.key_management_endpoints",
"_hash_token_if_needed",
"hash_token_if_needed",
),
(
"litellm.proxy.management_endpoints.key_management_endpoints",
"_is_master_key",
"is_master_key",
),
(
"litellm.proxy.management_endpoints.key_management_endpoints",
"_set_object_metadata_field",
"set_object_metadata_field",
),
(
"litellm.proxy.management_endpoints.key_management_endpoints",
"_set_object_permission",
"set_object_permission",
),
(
"litellm.proxy.management_endpoints.key_management_endpoints",
"_team_member_has_permission",
"team_member_has_permission",
),
(
"litellm.proxy.management_endpoints.key_management_endpoints",
"_user_has_admin_view",
"user_api_key_has_admin_view",
),
(
"litellm.proxy.management_endpoints.mcp_management_endpoints",
"_raise_if_not_oauth2",
"raise_if_not_oauth2",
),
(
"litellm.proxy.management_endpoints.mcp_management_endpoints",
"_read_request_body",
"read_request_body",
),
(
"litellm.proxy.management_endpoints.mcp_management_endpoints",
"_user_api_key_auth_builder",
"user_api_key_auth_builder",
),
(
"litellm.proxy.management_endpoints.mcp_management_endpoints",
"_user_has_admin_view",
"user_api_key_has_admin_view",
),
(
"litellm.proxy.management_endpoints.model_management_endpoints",
"_refresh_cached_team",
"refresh_cached_team",
),
(
"litellm.proxy.management_endpoints.organization_endpoints",
"_set_object_metadata_field",
"set_object_metadata_field",
),
(
"litellm.proxy.management_endpoints.organization_endpoints",
"_user_has_admin_view",
"user_api_key_has_admin_view",
),
(
"litellm.proxy.management_endpoints.prompt_cache_prediction",
"_PROXY_MaxParallelRequestsHandler_v3",
"PROXY_MaxParallelRequestsHandler_v3",
),
(
"litellm.proxy.management_endpoints.prompt_cache_prediction",
"_read_request_body",
"read_request_body",
),
(
"litellm.proxy.management_endpoints.scim.scim_v2",
"_delete_cache_key_object",
"delete_cache_key_object",
),
(
"litellm.proxy.management_endpoints.scim.scim_v2",
"_premium_user_check",
"premium_user_check",
),
(
"litellm.proxy.management_endpoints.scim.scim_v2",
"_safe_get_request_headers",
"safe_get_request_headers",
),
(
"litellm.proxy.management_endpoints.session_endpoints",
"_persist_deleted_verification_tokens",
"persist_deleted_verification_tokens",
),
(
"litellm.proxy.management_endpoints.team_callback_endpoints",
"_CALLBACK_VAR_ENCRYPTED_PREFIX",
"CALLBACK_VAR_ENCRYPTED_PREFIX",
),
(
"litellm.proxy.management_endpoints.team_callback_endpoints",
"_get_validated_callback_metadata",
"get_validated_callback_metadata",
),
(
"litellm.proxy.management_endpoints.team_callback_endpoints",
"_refresh_cached_team",
"refresh_cached_team",
),
(
"litellm.proxy.management_endpoints.team_endpoints",
"_cache_team_object",
"cache_team_object",
),
(
"litellm.proxy.management_endpoints.team_endpoints",
"_check_disable_global_guardrails_caller_permission",
"check_disable_global_guardrails_caller_permission",
),
(
"litellm.proxy.management_endpoints.team_endpoints",
"_check_passthrough_routes_caller_permission",
"check_passthrough_routes_caller_permission",
),
(
"litellm.proxy.management_endpoints.team_endpoints",
"_set_object_metadata_field",
"set_object_metadata_field",
),
(
"litellm.proxy.management_endpoints.team_endpoints",
"_set_object_permission",
"set_object_permission",
),
(
"litellm.proxy.management_endpoints.team_endpoints",
"_team_member_has_permission",
"team_member_has_permission",
),
(
"litellm.proxy.management_endpoints.team_endpoints",
"_update_metadata_fields",
"update_metadata_fields",
),
(
"litellm.proxy.management_endpoints.team_endpoints",
"_upsert_budget_and_membership",
"upsert_budget_and_membership",
),
(
"litellm.proxy.management_endpoints.team_endpoints",
"_user_has_admin_view",
"user_api_key_has_admin_view",
),
(
"litellm.proxy.management_endpoints.ui_sso",
"_get_request_ip_address",
"get_request_ip_address",
),
(
"litellm.proxy.management_helpers.access_group_key_sync",
"_delete_cache_access_object",
"delete_cache_access_object",
),
(
"litellm.proxy.management_helpers.access_group_team_sync",
"_delete_cache_access_object",
"delete_cache_access_object",
),
(
"litellm.proxy.management_helpers.auto_router_permissions",
"_check_team_member_model_access",
"check_team_member_model_access",
),
(
"litellm.proxy.management_helpers.bulk_team_member_budgets",
"_upsert_budget_and_membership",
"upsert_budget_and_membership",
),
(
"litellm.proxy.management_helpers.bulk_user_creation",
"_check_permissions_caller_permission",
"check_permissions_caller_permission",
),
(
"litellm.proxy.management_helpers.bulk_user_creation",
"_set_object_permission",
"set_object_permission",
),
(
"litellm.proxy.management_helpers.bulk_user_deletion",
"_persist_deleted_verification_tokens",
"persist_deleted_verification_tokens",
),
(
"litellm.proxy.management_helpers.utils",
"_read_request_body",
"read_request_body",
),
(
"litellm.proxy.openai_files_endpoints.files_endpoints",
"_is_base64_encoded_unified_file_id",
"is_base64_encoded_unified_file_id",
),
(
"litellm.proxy.openai_files_endpoints.files_endpoints",
"_read_request_body",
"read_request_body",
),
(
"litellm.proxy.pass_through_endpoints.llm_passthrough_endpoints",
"_get_bearer_token",
"get_bearer_token",
),
(
"litellm.proxy.pass_through_endpoints.llm_passthrough_endpoints",
"_read_request_body",
"read_request_body",
),
(
"litellm.proxy.pass_through_endpoints.llm_passthrough_endpoints",
"_safe_get_request_headers",
"safe_get_request_headers",
),
(
"litellm.proxy.pass_through_endpoints.llm_passthrough_endpoints",
"_safe_set_request_parsed_body",
"safe_set_request_parsed_body",
),
(
"litellm.proxy.pass_through_endpoints.pass_through_endpoints",
"_get_dynamic_logging_metadata",
"get_dynamic_logging_metadata",
),
(
"litellm.proxy.pass_through_endpoints.pass_through_endpoints",
"_read_request_body",
"read_request_body",
),
(
"litellm.proxy.pass_through_endpoints.pass_through_endpoints",
"_safe_get_request_headers",
"safe_get_request_headers",
),
(
"litellm.proxy.proxy_server",
"_OPTIONAL_PromptInjectionDetection",
"OPTIONAL_PromptInjectionDetection",
),
(
"litellm.proxy.proxy_server",
"_PROXY_VirtualKeyModelMaxBudgetLimiter",
"PROXY_VirtualKeyModelMaxBudgetLimiter",
),
(
"litellm.proxy.proxy_server",
"_ProxyDBLogger",
"ProxyDBLogger",
),
(
"litellm.proxy.proxy_server",
"_add_model_to_db",
"add_model_to_db",
),
(
"litellm.proxy.proxy_server",
"_add_team_model_to_db",
"add_team_model_to_db",
),
(
"litellm.proxy.proxy_server",
"_cache_user_row",
"cache_user_row",
),
(
"litellm.proxy.proxy_server",
"_deduplicate_litellm_router_models",
"deduplicate_litellm_router_models",
),
(
"litellm.proxy.proxy_server",
"_fetch_global_spend_with_event_coordination",
"fetch_global_spend_with_event_coordination",
),
(
"litellm.proxy.proxy_server",
"_get_docs_url",
"get_docs_url",
),
(
"litellm.proxy.proxy_server",
"_get_openapi_url",
"get_openapi_url",
),
(
"litellm.proxy.proxy_server",
"_get_projected_spend_over_limit",
"get_projected_spend_over_limit",
),
(
"litellm.proxy.proxy_server",
"_get_redoc_url",
"get_redoc_url",
),
(
"litellm.proxy.proxy_server",
"_is_azure_model_router_request",
"is_azure_model_router_request",
),
(
"litellm.proxy.proxy_server",
"_is_projected_spend_over_limit",
"is_projected_spend_over_limit",
),
(
"litellm.proxy.proxy_server",
"_is_valid_team_configs",
"is_valid_team_configs",
),
(
"litellm.proxy.proxy_server",
"_read_request_body",
"read_request_body",
),
(
"litellm.proxy.proxy_server",
"_realtime_request_body",
"realtime_request_body",
),
(
"litellm.proxy.proxy_server",
"_safe_get_request_headers",
"safe_get_request_headers",
),
(
"litellm.proxy.proxy_server",
"_should_return_raw_model_name",
"should_return_raw_model_name",
),
(
"litellm.proxy.proxy_server",
"_user_has_admin_privileges",
"user_has_admin_privileges",
),
(
"litellm.proxy.proxy_server",
"_user_has_admin_view",
"user_api_key_has_admin_view",
),
(
"litellm.proxy.rag_endpoints.endpoints",
"_read_request_body",
"read_request_body",
),
(
"litellm.proxy.rag_endpoints.endpoints",
"_safe_get_request_headers",
"safe_get_request_headers",
),
(
"litellm.proxy.realtime_endpoints.endpoints",
"_read_request_body",
"read_request_body",
),
(
"litellm.proxy.response_api_endpoints.endpoints",
"_read_request_body",
"read_request_body",
),
(
"litellm.proxy.response_api_endpoints.endpoints",
"_safe_set_request_parsed_body",
"safe_set_request_parsed_body",
),
(
"litellm.proxy.search_endpoints.search_tool_registry",
"_get_salt_key",
"get_salt_key",
),
(
"litellm.proxy.spend_tracking.cloudzero_endpoints",
"_user_has_admin_view",
"user_api_key_has_admin_view",
),
(
"litellm.proxy.spend_tracking.vantage_endpoints",
"_user_has_admin_view",
"user_api_key_has_admin_view",
),
(
"litellm.proxy.utils",
"_PROXY_CacheControlCheck",
"PROXY_CacheControlCheck",
),
(
"litellm.proxy.utils",
"_PROXY_MaxParallelRequestsHandler",
"PROXY_MaxParallelRequestsHandler",
),
(
"litellm.proxy.utils",
"_PROXY_MaxParallelRequestsHandler_v3",
"PROXY_MaxParallelRequestsHandler_v3",
),
(
"litellm.proxy.utils",
"_PROXY_SensitiveDataRoutingHandler",
"PROXY_SensitiveDataRoutingHandler",
),
(
"litellm.proxy.utils",
"_is_exception_related_to_db",
"is_exception_related_to_db",
),
(
"litellm.proxy.vertex_ai_endpoints.langfuse_endpoints",
"_get_dynamic_logging_metadata",
"get_dynamic_logging_metadata",
),
(
"litellm.proxy.vertex_ai_endpoints.langfuse_endpoints",
"_safe_get_request_headers",
"safe_get_request_headers",
),
(
"litellm.proxy.video_endpoints.endpoints",
"_read_request_body",
"read_request_body",
),
)
ALIAS_CASES: Final = (
(
"enterprise.enterprise_hooks.banned_keywords",
"",
"_ENTERPRISE_BannedKeywords",
"ENTERPRISE_BannedKeywords",
False,
),
(
"enterprise.enterprise_hooks.blocked_user_list",
"",
"_ENTERPRISE_BlockedUserList",
"ENTERPRISE_BlockedUserList",
False,
),
(
"enterprise.enterprise_hooks.google_text_moderation",
"",
"_ENTERPRISE_GoogleTextModeration",
"ENTERPRISE_GoogleTextModeration",
False,
),
(
"enterprise.enterprise_hooks.openai_moderation",
"",
"_ENTERPRISE_OpenAI_Moderation",
"ENTERPRISE_OpenAI_Moderation",
False,
),
(
"enterprise.litellm_enterprise.proxy.hooks.managed_files",
"",
"_PROXY_LiteLLMManagedFiles",
"PROXY_LiteLLMManagedFiles",
False,
),
(
"enterprise.litellm_enterprise.proxy.hooks.managed_vector_stores",
"",
"_PROXY_LiteLLMManagedVectorStores",
"PROXY_LiteLLMManagedVectorStores",
False,
),
("litellm", "", "_calculate_retry_after", "calculate_retry_after", False),
("litellm", "", "_turn_on_debug", "turn_on_debug", False),
("litellm", "", "_turn_on_json", "turn_on_json", False),
("litellm._lazy_imports", "", "_get_default_encoding", "get_default_encoding", False),
("litellm._lazy_imports", "", "_get_lazy_import_registry", "get_lazy_import_registry", False),
("litellm._lazy_imports", "", "_get_messages_reach_token_count", "get_messages_reach_token_count", False),
("litellm._lazy_imports", "", "_get_token_counter_new", "get_token_counter_new", False),
("litellm._logging", "", "_is_debugging_on", "is_debugging_on", False),
("litellm._logging", "", "_redact_string", "redact_string", False),
("litellm._logging", "", "_turn_on_debug", "turn_on_debug", False),
("litellm._logging", "", "_turn_on_json", "turn_on_json", False),
("litellm._redis", "", "_generate_gcp_iam_access_token", "generate_gcp_iam_access_token", False),
(
"litellm._redis_credential_provider",
"",
"_generate_gcp_iam_access_token",
"generate_gcp_iam_access_token",
False,
),
("litellm", "", "_should_retry", "should_retry", False),
("litellm.batches.batch_utils", "", "_count_entry_tokens", "count_entry_tokens", False),
("litellm.batches.batch_utils", "", "_estimate_batch_entry_tokens", "estimate_batch_entry_tokens", False),
("litellm.batches.batch_utils", "", "_extract_file_access_credentials", "extract_file_access_credentials", False),
("litellm.batches.batch_utils", "", "_get_file_content_as_dictionary", "get_file_content_as_dictionary", False),
("litellm.batches.batch_utils", "", "_handle_completed_batch", "handle_completed_batch", False),
("litellm.batches.batch_utils", "", "_iter_batch_input_lines", "iter_batch_input_lines", False),
("litellm.caching.caching", "Cache", "_get_cache_logic", "get_cache_logic", False),
(
"litellm.caching.caching",
"Cache",
"_get_preset_cache_key_from_kwargs",
"get_preset_cache_key_from_kwargs",
False,
),
("litellm.caching.caching", "Cache", "_supports_async", "supports_async", False),
(
"litellm.caching.caching_handler",
"LLMCachingHandler",
"_add_streaming_response_to_cache",
"add_streaming_response_to_cache",
False,
),
("litellm.caching.caching_handler", "LLMCachingHandler", "_async_get_cache", "async_get_cache", False),
(
"litellm.caching.caching_handler",
"LLMCachingHandler",
"_combine_cached_embedding_response_with_api_result",
"combine_cached_embedding_response_with_api_result",
False,
),
(
"litellm.caching.caching_handler",
"LLMCachingHandler",
"_should_store_result_in_cache",
"should_store_result_in_cache",
False,
),
(
"litellm.caching.caching_handler",
"LLMCachingHandler",
"_sync_add_streaming_response_to_cache",
"sync_add_streaming_response_to_cache",
False,
),
("litellm.caching.caching_handler", "LLMCachingHandler", "_sync_get_cache", "sync_get_cache", False),
(
"litellm.completion_extras.litellm_responses_transformation.transformation",
"LiteLLMResponsesTransformationHandler",
"_map_reasoning_effort",
"map_reasoning_effort",
False,
),
("litellm.cost_calculator", "", "_infer_call_type", "infer_call_type", False),
("litellm.cost_calculator", "", "_select_model_name_for_cost_calc", "select_model_name_for_cost_calc", False),
(
"litellm.integrations.SlackAlerting.utils",
"",
"_add_langfuse_trace_id_to_alert",
"add_langfuse_trace_id_to_alert",
False,
),
(
"litellm.integrations.arize.arize_phoenix_prompt_manager",
"ArizePhoenixTemplateManager",
"_load_prompt_from_arize",
"load_prompt_from_arize",
False,
),
(
"litellm.integrations.bitbucket.bitbucket_prompt_manager",
"BitBucketTemplateManager",
"_load_prompt_from_bitbucket",
"load_prompt_from_bitbucket",
False,
),
(
"litellm.integrations.dotprompt",
"",
"_get_prompt_data_from_dotprompt_content",
"get_prompt_data_from_dotprompt_content",
False,
),
(
"litellm.integrations.dotprompt.prompt_manager",
"PromptManager",
"_parse_frontmatter",
"parse_frontmatter",
False,
),
("litellm.integrations.dynamodb", "DyanmoDBLogger", "_async_log_event", "async_log_event", False),
("litellm.integrations.focus.export_engine", "FocusExportEngine", "_build_filename", "build_filename", False),
("litellm.integrations.focus.export_engine", "FocusExportEngine", "_count_unique", "count_unique", False),
("litellm.integrations.focus.export_engine", "FocusExportEngine", "_database", "database", True),
("litellm.integrations.focus.export_engine", "FocusExportEngine", "_destination", "destination", True),
("litellm.integrations.focus.export_engine", "FocusExportEngine", "_serializer", "serializer", True),
("litellm.integrations.focus.export_engine", "FocusExportEngine", "_sum_column", "sum_column", False),
("litellm.integrations.focus.export_engine", "FocusExportEngine", "_transformer", "transformer", True),
(
"litellm.integrations.gitlab.gitlab_prompt_manager",
"GitLabTemplateManager",
"_id_to_repo_path",
"id_to_repo_path",
False,
),
(
"litellm.integrations.gitlab.gitlab_prompt_manager",
"GitLabTemplateManager",
"_load_prompt_from_gitlab",
"load_prompt_from_gitlab",
False,
),
(
"litellm.integrations.opentelemetry",
"",
"_build_metric_attribute_filter",
"build_metric_attribute_filter",
False,
),
(
"litellm.integrations.opentelemetry",
"",
"_resolve_metric_attribute_filter",
"resolve_metric_attribute_filter",
False,
),
(
"litellm.integrations.prometheus_helpers",
"PrometheusLabelFactoryContext",
"_custom_by_sanitized_key",
"custom_by_sanitized_key",
True,
),
(
"litellm.integrations.prometheus_helpers",
"PrometheusLabelFactoryContext",
"_sanitized_enum",
"sanitized_enum",
True,
),
("litellm.integrations.prometheus_helpers", "PrometheusLabelFactoryContext", "_tag_labels", "tag_labels", True),
(
"litellm.integrations.prometheus_helpers",
"",
"_get_cached_end_user_id_for_cost_tracking",
"get_cached_end_user_id_for_cost_tracking",
False,
),
(
"litellm.integrations.weave.weave_otel",
"",
"_get_weave_authorization_header",
"get_weave_authorization_header",
False,
),
(
"litellm.litellm_core_utils.core_helpers",
"",
"_get_parent_otel_span_from_kwargs",
"get_parent_otel_span_from_kwargs",
False,
),
("litellm.litellm_core_utils.dd_tracing", "", "_should_use_dd_profiler", "should_use_dd_profiler", False),
(
"litellm.litellm_core_utils.exception_mapping_utils",
"",
"_add_key_name_and_team_to_alert",
"add_key_name_and_team_to_alert",
False,
),
(
"litellm.litellm_core_utils.get_litellm_params",
"",
"_get_base_model_from_litellm_call_metadata",
"get_base_model_from_litellm_call_metadata",
False,
),
(
"litellm.litellm_core_utils.get_llm_provider_logic",
"",
"_is_non_openai_azure_model",
"is_non_openai_azure_model",
False,
),
(
"litellm.litellm_core_utils.get_model_cost_map",
"GetModelCostMap",
"_get_backup_model_count",
"get_backup_model_count",
False,
),
(
"litellm.litellm_core_utils.health_check_helpers",
"HealthCheckHelpers",
"_update_model_params_with_health_check_tracking_information",
"update_model_params_with_health_check_tracking_information",
False,
),
(
"litellm.litellm_core_utils.health_check_utils",
"",
"_create_health_check_response",
"create_health_check_response",
False,
),
("litellm.litellm_core_utils.litellm_logging", "Logging", "_defer_async_logging", "defer_async_logging", True),
(
"litellm.litellm_core_utils.litellm_logging",
"Logging",
"_enqueue_deferred_logging",
"enqueue_deferred_logging",
True,
),
("litellm.litellm_core_utils.litellm_logging", "Logging", "_get_trace_id", "get_trace_id", False),
(
"litellm.litellm_core_utils.litellm_logging",
"Logging",
"_is_sync_litellm_request",
"is_sync_litellm_request",
False,
),
("litellm.litellm_core_utils.litellm_logging", "Logging", "_llm_caching_handler", "llm_caching_handler", True),
(
"litellm.litellm_core_utils.litellm_logging",
"Logging",
"_on_detached_stream_failure",
"on_detached_stream_failure",
True,
),
(
"litellm.litellm_core_utils.litellm_logging",
"Logging",
"_response_cost_calculator",
"response_cost_calculator",
False,
),
(
"litellm.litellm_core_utils.litellm_logging",
"Logging",
"_update_completion_start_time",
"update_completion_start_time",
False,
),
(
"litellm.litellm_core_utils.litellm_logging",
"StandardLoggingPayloadSetup",
"_get_request_tags",
"get_request_tags",
False,
),
("litellm.litellm_core_utils.litellm_logging", "", "_get_masked_values", "get_masked_values", False),
(
"litellm.litellm_core_utils.llm_cost_calc.tool_call_cost_tracking",
"StandardBuiltInToolCostTracking",
"_get_file_search_tool_call",
"get_file_search_tool_call",
False,
),
(
"litellm.litellm_core_utils.llm_cost_calc.tool_call_cost_tracking",
"StandardBuiltInToolCostTracking",
"_get_web_search_options",
"get_web_search_options",
False,
),
(
"litellm.litellm_core_utils.llm_cost_calc.utils",
"CostCalculatorUtils",
"_call_type_has_image_response",
"call_type_has_image_response",
False,
),
(
"litellm.litellm_core_utils.llm_cost_calc.utils",
"",
"_generic_cost_per_character",
"generic_cost_per_character",
False,
),
("litellm.litellm_core_utils.llm_cost_calc.utils", "", "_get_cost_per_unit", "get_cost_per_unit", False),
(
"litellm.litellm_core_utils.llm_cost_calc.utils",
"",
"_get_regional_uplift_multiplier",
"get_regional_uplift_multiplier",
False,
),
(
"litellm.litellm_core_utils.llm_cost_calc.utils",
"",
"_get_service_tier_cost_key",
"get_service_tier_cost_key",
False,
),
("litellm.litellm_core_utils.llm_cost_calc.utils", "", "_is_above_128k", "is_above_128k", False),
(
"litellm.litellm_core_utils.llm_request_utils",
"",
"_ensure_extra_body_is_safe",
"ensure_extra_body_is_safe",
False,
),
(
"litellm.litellm_core_utils.llm_response_utils.convert_dict_to_response",
"",
"_handle_invalid_parallel_tool_calls",
"handle_invalid_parallel_tool_calls",
False,
),
(
"litellm.litellm_core_utils.llm_response_utils.convert_dict_to_response",
"",
"_safe_convert_created_field",
"safe_convert_created_field",
False,
),
(
"litellm.litellm_core_utils.llm_response_utils.convert_dict_to_response",
"",
"_should_convert_tool_call_to_json_mode",
"should_convert_tool_call_to_json_mode",
False,
),
(
"litellm.litellm_core_utils.logging_callback_manager",
"LoggingCallbackManager",
"_add_custom_callback_generic_api_str",
"add_custom_callback_generic_api_str",
False,
),
(
"litellm.litellm_core_utils.logging_callback_manager",
"LoggingCallbackManager",
"_get_all_callbacks",
"get_all_callbacks",
False,
),
(
"litellm.litellm_core_utils.logging_utils",
"",
"_assemble_complete_response_from_streaming_chunks",
"assemble_complete_response_from_streaming_chunks",
False,
),
(
"litellm.litellm_core_utils.model_param_helper",
"ModelParamHelper",
"_get_all_llm_api_params",
"get_all_llm_api_params",
False,
),
(
"litellm.litellm_core_utils.model_param_helper",
"ModelParamHelper",
"_get_relevant_args_to_use_for_logging",
"get_relevant_args_to_use_for_logging",
False,
),
(
"litellm.litellm_core_utils.model_param_helper",
"ModelParamHelper",
"_relevant_logging_args",
"relevant_logging_args",
False,
),
(
"litellm.litellm_core_utils.prompt_templates.common_utils",
"",
"_audio_or_image_in_message_content",
"audio_or_image_in_message_content",
False,
),
(
"litellm.litellm_core_utils.prompt_templates.common_utils",
"",
"_extract_reasoning_content",
"extract_reasoning_content",
False,
),
(
"litellm.litellm_core_utils.prompt_templates.common_utils",
"",
"_get_image_mime_type_from_url",
"get_image_mime_type_from_url",
False,
),
(
"litellm.litellm_core_utils.prompt_templates.common_utils",
"",
"_parse_content_for_reasoning",
"parse_content_for_reasoning",
False,
),
(
"litellm.litellm_core_utils.prompt_templates.factory",
"BedrockConverseMessagesProcessor",
"_process_file_message",
"process_file_message",
False,
),
(
"litellm.litellm_core_utils.prompt_templates.factory",
"BedrockImageProcessor",
"_validate_format",
"validate_format",
False,
),
(
"litellm.litellm_core_utils.prompt_templates.factory",
"",
"_encode_tool_call_id_with_signature",
"encode_tool_call_id_with_signature",
False,
),
(
"litellm.litellm_core_utils.prompt_templates.factory",
"",
"_get_thought_signature_from_tool",
"get_thought_signature_from_tool",
False,
),
("litellm.litellm_core_utils.prompt_templates.factory", "", "_parse_mime_type", "parse_mime_type", False),
(
"litellm.litellm_core_utils.prompt_templates.huggingface_template_handler",
"",
"_aget_chat_template_file",
"aget_chat_template_file",
False,
),
(
"litellm.litellm_core_utils.prompt_templates.huggingface_template_handler",
"",
"_aget_tokenizer_config",
"aget_tokenizer_config",
False,
),
(
"litellm.litellm_core_utils.prompt_templates.huggingface_template_handler",
"",
"_extract_token_value",
"extract_token_value",
False,
),
(
"litellm.litellm_core_utils.prompt_templates.huggingface_template_handler",
"",
"_get_chat_template_file",
"get_chat_template_file",
False,
),
(
"litellm.litellm_core_utils.prompt_templates.huggingface_template_handler",
"",
"_get_tokenizer_config",
"get_tokenizer_config",
False,
),
(
"litellm.litellm_core_utils.realtime_streaming",
"RealTimeStreaming",
"_detect_beta_header",
"detect_beta_header",
False,
),
(
"litellm.litellm_core_utils.realtime_streaming",
"RealTimeStreaming",
"_maybe_inject_guardrail_auto_response_disable",
"maybe_inject_guardrail_auto_response_disable",
False,
),
(
"litellm.litellm_core_utils.realtime_streaming",
"RealTimeStreaming",
"_session_created_sent_to_client",
"session_created_sent_to_client",
True,
),
("litellm.litellm_core_utils.secret_redaction", "", "_python_redact_string", "python_redact_string", False),
(
"litellm.litellm_core_utils.secret_redaction",
"",
"_python_redact_structured_value",
"python_redact_structured_value",
False,
),
("litellm.litellm_core_utils.sensitive_data_masker", "SensitiveDataMasker", "_mask_value", "mask_value", False),
(
"litellm.litellm_core_utils.streaming_handler",
"CustomStreamWrapper",
"_strip_sse_data_from_chunk",
"strip_sse_data_from_chunk",
False,
),
(
"litellm.proxy.enterprise.litellm_enterprise.proxy.utils",
"",
"_should_block_robots",
"should_block_robots",
False,
),
("litellm.realtime_api.main", "", "_realtime_health_check", "realtime_health_check", False),
(
"litellm.responses.litellm_completion_transformation.transformation",
"LiteLLMCompletionResponsesConfig",
"_tool_call_id_from_responses_item",
"tool_call_id_from_responses_item",
False,
),
(
"litellm.responses.litellm_completion_transformation.transformation",
"LiteLLMCompletionResponsesConfig",
"_transform_chat_completion_annotations_to_response_output_annotations",
"transform_chat_completion_annotations_to_response_output_annotations",
False,
),
(
"litellm.responses.litellm_completion_transformation.transformation",
"LiteLLMCompletionResponsesConfig",
"_transform_chat_completion_usage_to_responses_usage",
"transform_chat_completion_usage_to_responses_usage",
False,
),
(
"litellm.responses.litellm_completion_transformation.transformation",
"LiteLLMCompletionResponsesConfig",
"_transform_tool_choice_for_responses_api_response",
"transform_tool_choice_for_responses_api_response",
False,
),
(
"litellm.responses.mcp.litellm_proxy_mcp_handler",
"LiteLLM_Proxy_MCP_Handler",
"_add_mcp_output_elements_to_response",
"add_mcp_output_elements_to_response",
False,
),
(
"litellm.responses.mcp.litellm_proxy_mcp_handler",
"LiteLLM_Proxy_MCP_Handler",
"_create_follow_up_input",
"create_follow_up_input",
False,
),
(
"litellm.responses.mcp.litellm_proxy_mcp_handler",
"LiteLLM_Proxy_MCP_Handler",
"_create_follow_up_messages_for_chat",
"create_follow_up_messages_for_chat",
False,
),
(
"litellm.responses.mcp.litellm_proxy_mcp_handler",
"LiteLLM_Proxy_MCP_Handler",
"_create_tool_execution_events",
"create_tool_execution_events",
False,
),
(
"litellm.responses.mcp.litellm_proxy_mcp_handler",
"LiteLLM_Proxy_MCP_Handler",
"_execute_tool_calls",
"execute_tool_calls",
False,
),
(
"litellm.responses.mcp.litellm_proxy_mcp_handler",
"LiteLLM_Proxy_MCP_Handler",
"_extract_tool_call_details",
"extract_tool_call_details",
False,
),
(
"litellm.responses.mcp.litellm_proxy_mcp_handler",
"LiteLLM_Proxy_MCP_Handler",
"_extract_tool_calls_from_chat_response",
"extract_tool_calls_from_chat_response",
False,
),
(
"litellm.responses.mcp.litellm_proxy_mcp_handler",
"LiteLLM_Proxy_MCP_Handler",
"_extract_tool_calls_from_response",
"extract_tool_calls_from_response",
False,
),
(
"litellm.responses.mcp.litellm_proxy_mcp_handler",
"LiteLLM_Proxy_MCP_Handler",
"_get_parent_request_tags",
"get_parent_request_tags",
False,
),
(
"litellm.responses.mcp.litellm_proxy_mcp_handler",
"LiteLLM_Proxy_MCP_Handler",
"_is_persistence_disabled",
"is_persistence_disabled",
False,
),
(
"litellm.responses.mcp.litellm_proxy_mcp_handler",
"LiteLLM_Proxy_MCP_Handler",
"_make_follow_up_call",
"make_follow_up_call",
False,
),
(
"litellm.responses.mcp.litellm_proxy_mcp_handler",
"LiteLLM_Proxy_MCP_Handler",
"_prepare_follow_up_call_params",
"prepare_follow_up_call_params",
False,
),
(
"litellm.responses.mcp.litellm_proxy_mcp_handler",
"LiteLLM_Proxy_MCP_Handler",
"_prepare_initial_call_params",
"prepare_initial_call_params",
False,
),
(
"litellm.responses.mcp.litellm_proxy_mcp_handler",
"LiteLLM_Proxy_MCP_Handler",
"_process_mcp_tools_to_openai_format",
"process_mcp_tools_to_openai_format",
False,
),
(
"litellm.responses.mcp.litellm_proxy_mcp_handler",
"LiteLLM_Proxy_MCP_Handler",
"_process_mcp_tools_without_openai_transform",
"process_mcp_tools_without_openai_transform",
False,
),
(
"litellm.responses.mcp.litellm_proxy_mcp_handler",
"LiteLLM_Proxy_MCP_Handler",
"_should_auto_execute_tools",
"should_auto_execute_tools",
False,
),
(
"litellm.responses.mcp.litellm_proxy_mcp_handler",
"LiteLLM_Proxy_MCP_Handler",
"_should_use_litellm_mcp_gateway",
"should_use_litellm_mcp_gateway",
False,
),
(
"litellm.responses.mcp.litellm_proxy_mcp_handler",
"LiteLLM_Proxy_MCP_Handler",
"_split_mcp_tools",
"split_mcp_tools",
False,
),
(
"litellm.responses.mcp.litellm_proxy_mcp_handler",
"LiteLLM_Proxy_MCP_Handler",
"_transform_mcp_tools_to_openai",
"transform_mcp_tools_to_openai",
False,
),
("litellm.responses.streaming_iterator", "", "_get_openai_response_types", "get_openai_response_types", False),
("litellm.responses.utils", "ResponseAPILoggingUtils", "_is_response_api_usage", "is_response_api_usage", False),
(
"litellm.responses.utils",
"ResponseAPILoggingUtils",
"_transform_response_api_usage_to_chat_usage",
"transform_response_api_usage_to_chat_usage",
False,
),
("litellm.responses.utils", "ResponsesAPIRequestUtils", "_build_container_id", "build_container_id", False),
("litellm.responses.utils", "ResponsesAPIRequestUtils", "_decode_container_id", "decode_container_id", False),
(
"litellm.responses.utils",
"ResponsesAPIRequestUtils",
"_decode_encrypted_item_id",
"decode_encrypted_item_id",
False,
),
(
"litellm.responses.utils",
"ResponsesAPIRequestUtils",
"_decode_responses_api_response_id",
"decode_responses_api_response_id",
False,
),
(
"litellm.responses.utils",
"ResponsesAPIRequestUtils",
"_encode_container_id_on_output_item",
"encode_container_id_on_output_item",
False,
),
(
"litellm.responses.utils",
"ResponsesAPIRequestUtils",
"_encode_container_ids_in_annotations",
"encode_container_ids_in_annotations",
False,
),
(
"litellm.responses.utils",
"ResponsesAPIRequestUtils",
"_restore_encrypted_content_item_ids_in_input",
"restore_encrypted_content_item_ids_in_input",
False,
),
(
"litellm.responses.utils",
"ResponsesAPIRequestUtils",
"_unwrap_encrypted_content_with_model_id",
"unwrap_encrypted_content_with_model_id",
False,
),
(
"litellm.responses.utils",
"ResponsesAPIRequestUtils",
"_update_responses_api_response_id_with_model_id",
"update_responses_api_response_id_with_model_id",
False,
),
(
"litellm.responses.utils",
"ResponsesAPIRequestUtils",
"_wrap_encrypted_content_with_model_id",
"wrap_encrypted_content_with_model_id",
False,
),
("litellm.router", "Router", "_are_all_deployments_blocked", "are_all_deployments_blocked", False),
("litellm.router", "Router", "_deployment_usable_by_team", "deployment_usable_by_team", False),
("litellm.router", "Router", "_get_all_deployments", "get_all_deployments", False),
("litellm.router", "Router", "_get_model_from_alias", "get_model_from_alias", False),
(
"litellm.router",
"Router",
"_get_router_deployment_budget_limiter",
"get_router_deployment_budget_limiter",
False,
),
("litellm.router", "Router", "_is_deployment_blocked", "is_deployment_blocked", False),
(
"litellm.router",
"Router",
"_is_model_access_group_for_wildcard_route",
"is_model_access_group_for_wildcard_route",
False,
),
("litellm.router", "Router", "_replay_model_cost_registrations", "replay_model_cost_registrations", False),
("litellm.router", "Router", "_routing_groups", "routing_groups", True),
("litellm.router", "Router", "_update_redis_cache", "update_redis_cache", False),
(
"litellm.router_strategy.adaptive_router.adaptive_router",
"AdaptiveRouter",
"_state_loaded",
"state_loaded",
True,
),
(
"litellm.router_strategy.tag_based_routing",
"",
"_get_tags_from_request_kwargs",
"get_tags_from_request_kwargs",
False,
),
("litellm.router_utils.add_retry_fallback_headers", "HiddenParamsAsyncIteratorWrapper", "_inner", "inner", True),
("litellm.router_utils.add_retry_fallback_headers", "", "_HiddenParamsHost", "HiddenParamsHost", False),
(
"litellm.router_utils.batch_utils",
"",
"_get_router_metadata_variable_name",
"get_router_metadata_variable_name",
False,
),
("litellm.router_utils.common_utils", "", "_is_proxy_admin_request", "is_proxy_admin_request", False),
(
"litellm.router_utils.cooldown_callbacks",
"",
"_get_prometheus_logger_from_callbacks",
"get_prometheus_logger_from_callbacks",
False,
),
(
"litellm.router_utils.cooldown_handlers",
"",
"_async_get_cooldown_deployments",
"async_get_cooldown_deployments",
False,
),
(
"litellm.router_utils.cooldown_handlers",
"",
"_async_get_cooldown_deployments_with_debug_info",
"async_get_cooldown_deployments_with_debug_info",
False,
),
("litellm.router_utils.cooldown_handlers", "", "_get_cooldown_deployments", "get_cooldown_deployments", False),
("litellm.router_utils.cooldown_handlers", "", "_set_cooldown_deployments", "set_cooldown_deployments", False),
(
"litellm.router_utils.fallback_event_handlers",
"",
"_check_non_standard_fallback_format",
"check_non_standard_fallback_format",
False,
),
(
"litellm.router_utils.pattern_match_deployments",
"PatternMatchRouter",
"_pattern_to_regex",
"pattern_to_regex",
False,
),
("litellm.types.agents", "", "_normalize_a2a_jsonrpc_response", "normalize_a2a_jsonrpc_response", False),
("litellm.types.completion", "", "_CompletionDispatchContext", "CompletionDispatchContext", False),
(
"litellm.types.integrations.prometheus",
"",
"_sanitize_prometheus_label_name",
"sanitize_prometheus_label_name",
False,
),
(
"litellm.types.integrations.prometheus",
"",
"_sanitize_prometheus_label_value",
"sanitize_prometheus_label_value",
False,
),
("litellm.types.utils", "", "_generate_id", "generate_id", False),
("litellm.utils", "ProviderConfigManager", "_get_bedrock_mantle_config", "get_bedrock_mantle_config", False),
(
"litellm.utils",
"",
"_add_custom_logger_callback_to_specific_event",
"add_custom_logger_callback_to_specific_event",
False,
),
("litellm.utils", "", "_add_path_to_api_base", "add_path_to_api_base", False),
("litellm.utils", "", "_apply_openai_param_overrides", "apply_openai_param_overrides", False),
("litellm.utils", "", "_cached_get_model_info_helper", "cached_get_model_info_helper", False),
("litellm.utils", "", "_calculate_retry_after", "calculate_retry_after", False),
("litellm.utils", "", "_count_characters", "count_characters", False),
("litellm.utils", "", "_get_base_model_from_metadata", "get_base_model_from_metadata", False),
("litellm.utils", "", "_get_bundled_model_cost_map", "get_bundled_model_cost_map", False),
("litellm.utils", "", "_get_deployment_order", "get_deployment_order", False),
("litellm.utils", "", "_get_model_cost_key", "get_model_cost_key", False),
("litellm.utils", "", "_get_model_info_helper", "get_model_info_helper", False),
("litellm.utils", "", "_get_potential_model_names", "get_potential_model_names", False),
("litellm.utils", "", "_remove_additional_properties", "remove_additional_properties", False),
("litellm.utils", "", "_remove_json_schema_refs", "remove_json_schema_refs", False),
("litellm.utils", "", "_remove_strict_from_schema", "remove_strict_from_schema", False),
("litellm.utils", "", "_select_tokenizer", "select_tokenizer", False),
("litellm.utils", "", "_should_retry", "should_retry", False),
("litellm.utils", "", "_supports_factory", "supports_factory", False),
("litellm.utils", "", "_update_dictionary", "update_dictionary", False),
(
"litellm.vector_stores.vector_store_registry",
"VectorStoreIndexRegistry",
"_get_vector_store_indexes_from_db",
"get_vector_store_indexes_from_db",
False,
),
(
"litellm.vector_stores.vector_store_registry",
"VectorStoreRegistry",
"_get_vector_stores_from_db",
"get_vector_stores_from_db",
False,
),
)
PROPERTY_CASES: Final = (
("litellm.integrations.focus.export_engine", "FocusExportEngine", "_database", "database"),
("litellm.integrations.focus.export_engine", "FocusExportEngine", "_destination", "destination"),
("litellm.integrations.focus.export_engine", "FocusExportEngine", "_serializer", "serializer"),
("litellm.integrations.focus.export_engine", "FocusExportEngine", "_transformer", "transformer"),
(
"litellm.integrations.prometheus_helpers",
"PrometheusLabelFactoryContext",
"_custom_by_sanitized_key",
"custom_by_sanitized_key",
),
("litellm.integrations.prometheus_helpers", "PrometheusLabelFactoryContext", "_sanitized_enum", "sanitized_enum"),
("litellm.integrations.prometheus_helpers", "PrometheusLabelFactoryContext", "_tag_labels", "tag_labels"),
("litellm.litellm_core_utils.litellm_logging", "Logging", "_defer_async_logging", "defer_async_logging"),
("litellm.litellm_core_utils.litellm_logging", "Logging", "_enqueue_deferred_logging", "enqueue_deferred_logging"),
("litellm.litellm_core_utils.litellm_logging", "Logging", "_llm_caching_handler", "llm_caching_handler"),
(
"litellm.litellm_core_utils.litellm_logging",
"Logging",
"_on_detached_stream_failure",
"on_detached_stream_failure",
),
(
"litellm.litellm_core_utils.realtime_streaming",
"RealTimeStreaming",
"_session_created_sent_to_client",
"session_created_sent_to_client",
),
("litellm.router", "Router", "_routing_groups", "routing_groups"),
("litellm.router_strategy.adaptive_router.adaptive_router", "AdaptiveRouter", "_state_loaded", "state_loaded"),
("litellm.router_utils.add_retry_fallback_headers", "HiddenParamsAsyncIteratorWrapper", "_inner", "inner"),
)
CLASS_PROPERTY_CASES: Final = ()
LLMS_ALIAS_CASES: Final = (
(
"litellm.llms.anthropic.pass_through.adapters.transformation",
"LiteLLMAnthropicMessagesAdapter",
"_translate_openai_usage_to_anthropic_usage",
"translate_openai_usage_to_anthropic_usage",
False,
),
(
"litellm.llms.anthropic.pass_through.adapters.transformation",
"LiteLLMAnthropicMessagesAdapter",
"_translate_openai_usage_to_anthropic_usage_delta",
"translate_openai_usage_to_anthropic_usage_delta",
False,
),
(
"litellm.llms.anthropic.pass_through.adapters.transformation",
"LiteLLMAnthropicMessagesAdapter",
"_translate_streaming_openai_chunk_to_anthropic_content_block",
"translate_streaming_openai_chunk_to_anthropic_content_block",
False,
),
(
"litellm.llms.anthropic.pass_through.context_management.dispatcher",
"",
"_normalize_spec",
"normalize_spec",
False,
),
(
"litellm.llms.anthropic.pass_through.messages.streaming_iterator",
"",
"_is_message_stop_chunk",
"is_message_stop_chunk",
False,
),
(
"litellm.llms.anthropic.pass_through.messages.streaming_iterator",
"",
"_is_provider_error_chunk",
"is_provider_error_chunk",
False,
),
(
"litellm.llms.anthropic.pass_through.messages.transformation",
"",
"_messages_carry_output_config",
"messages_carry_output_config",
False,
),
("litellm.llms.azure.azure", "", "_check_dynamic_azure_params", "check_dynamic_azure_params", False),
(
"litellm.llms.base_llm.base_utils",
"",
"_convert_tool_response_to_message",
"convert_tool_response_to_message",
False,
),
(
"litellm.llms.bedrock.batches.handler",
"BedrockBatchesHandler",
"_handle_async_invoke_status",
"handle_async_invoke_status",
False,
),
(
"litellm.llms.bedrock.batches.handler",
"BedrockBatchesHandler",
"_handle_model_invocation_job_status",
"handle_model_invocation_job_status",
False,
),
("litellm.llms.bedrock.common_utils", "", "_get_all_bedrock_regions", "get_all_bedrock_regions", False),
(
"litellm.llms.custom_httpx.aiohttp_transport",
"LiteLLMAiohttpTransport",
"_get_valid_client_session",
"get_valid_client_session",
False,
),
(
"litellm.llms.custom_httpx.http_handler",
"",
"_build_aiohttp_keepalive_socket_factory",
"build_aiohttp_keepalive_socket_factory",
False,
),
("litellm.llms.custom_httpx.http_handler", "", "_get_httpx_client", "get_httpx_client", False),
(
"litellm.llms.custom_httpx.http_handler",
"AsyncHTTPHandler",
"_create_aiohttp_transport",
"create_aiohttp_transport",
False,
),
(
"litellm.llms.custom_httpx.http_handler",
"AsyncHTTPHandler",
"_create_async_transport",
"create_async_transport",
False,
),
(
"litellm.llms.custom_httpx.http_handler",
"AsyncHTTPHandler",
"_create_httpx_proxy_mounts",
"create_httpx_proxy_mounts",
False,
),
(
"litellm.llms.custom_httpx.http_handler",
"AsyncHTTPHandler",
"_should_use_aiohttp_transport",
"should_use_aiohttp_transport",
False,
),
(
"litellm.llms.huggingface.common_utils",
"",
"_fetch_inference_provider_mapping",
"fetch_inference_provider_mapping",
False,
),
("litellm.llms.oci.chat.cohere", "", "_extract_text_content", "extract_text_content", False),
("litellm.llms.oci.chat.generic", "", "_normalize_oci_finish_reason", "normalize_oci_finish_reason", False),
("litellm.llms.oci.chat.generic", "", "_synthesize_oci_tool_call_id", "synthesize_oci_tool_call_id", False),
("litellm.llms.ollama.common_utils", "", "_convert_image", "convert_image", False),
("litellm.llms.openai.chat.gpt_5_transformation", "", "_get_effort_level", "get_effort_level", False),
("litellm.llms.openai.completion.utils", "", "_transform_prompt", "transform_prompt", False),
(
"litellm.llms.openai.cost_calculation",
"",
"_video_output_cost_per_second",
"video_output_cost_per_second",
False,
),
(
"litellm.llms.openai.fine_tuning.handler",
"",
"_litellm_fine_tuning_job_from_response",
"litellm_fine_tuning_job_from_response",
False,
),
(
"litellm.llms.vertex_ai.batches.transformation",
"VertexAIBatchTransformation",
"_get_batch_id_from_vertex_ai_batch_response",
"get_batch_id_from_vertex_ai_batch_response",
False,
),
("litellm.llms.vertex_ai.common_utils", "", "_build_json_schema", "build_json_schema", False),
("litellm.llms.vertex_ai.common_utils", "", "_build_vertex_schema", "build_vertex_schema", False),
("litellm.llms.vertex_ai.common_utils", "", "_check_text_in_content", "check_text_in_content", False),
(
"litellm.llms.vertex_ai.common_utils",
"",
"_convert_vertex_datetime_to_openai_datetime",
"convert_vertex_datetime_to_openai_datetime",
False,
),
("litellm.llms.vertex_ai.common_utils", "", "_get_gemini_url", "get_gemini_url", False),
("litellm.llms.vertex_ai.common_utils", "", "_get_vertex_url", "get_vertex_url", False),
("litellm.llms.vertex_ai.gemini.transformation", "", "_camel_to_snake", "camel_to_snake", False),
(
"litellm.llms.vertex_ai.gemini.transformation",
"",
"_gemini_convert_messages_with_history",
"gemini_convert_messages_with_history",
False,
),
("litellm.llms.vertex_ai.gemini.transformation", "", "_snake_to_camel", "snake_to_camel", False),
(
"litellm.llms.vertex_ai.gemini.transformation",
"",
"_transform_request_body",
"transform_request_body",
False,
),
(
"litellm.llms.vertex_ai.gemini.transformation",
"",
"_transform_system_message",
"transform_system_message",
False,
),
(
"litellm.llms.vertex_ai.gemini_embeddings.batch_embed_content_transformation",
"",
"_is_file_reference",
"is_file_reference",
False,
),
(
"litellm.llms.vertex_ai.vertex_llm_base",
"",
"_graft_default_vertex_path",
"graft_default_vertex_path",
False,
),
("litellm.llms.watsonx.common_utils", "", "_generate_watsonx_token", "generate_watsonx_token", False),
("litellm.llms.watsonx.common_utils", "", "_get_api_params", "get_api_params", False),
)
PROXY_ALIAS_CASES: Final = (
(
'litellm.proxy._experimental.mcp_server.auth.user_api_key_auth_mcp',
'',
'_is_mcp_admitted_user_subject',
'is_mcp_admitted_user_subject',
False,
),
(
'litellm.proxy._experimental.mcp_server.auth.user_api_key_auth_mcp',
'MCPRequestHandler',
'_get_mcp_auth_header_from_headers',
'get_mcp_auth_header_from_headers',
False,
),
(
'litellm.proxy._experimental.mcp_server.auth.user_api_key_auth_mcp',
'MCPRequestHandler',
'_get_mcp_server_auth_headers_from_headers',
'get_mcp_server_auth_headers_from_headers',
False,
),
(
'litellm.proxy._experimental.mcp_server.auth.user_api_key_auth_mcp',
'MCPRequestHandler',
'_get_mcp_servers_from_access_groups',
'get_mcp_servers_from_access_groups',
False,
),
(
'litellm.proxy._experimental.mcp_server.auth.user_api_key_auth_mcp',
'MCPRequestHandler',
'_get_oauth2_headers_from_headers',
'get_oauth2_headers_from_headers',
False,
),
(
'litellm.proxy._experimental.mcp_server.auth.user_api_key_auth_mcp',
'MCPRequestHandler',
'_safe_get_headers_from_scope',
'safe_get_headers_from_scope',
False,
),
(
'litellm.proxy._experimental.mcp_server.bridge_token_flow',
'',
'_bridge_mint_error_response',
'bridge_mint_error_response',
False,
),
(
'litellm.proxy._experimental.mcp_server.bridge_token_flow',
'',
'_extract_user_id_from_request',
'extract_user_id_from_request',
False,
),
(
'litellm.proxy._experimental.mcp_server.bridge_token_flow',
'',
'_finish_bridge_mint',
'finish_bridge_mint',
False,
),
(
'litellm.proxy._experimental.mcp_server.bridge_token_flow',
'',
'_prepare_bridge_mint',
'prepare_bridge_mint',
False,
),
(
'litellm.proxy._experimental.mcp_server.bridge_token_flow',
'',
'_prepare_bridge_refresh',
'prepare_bridge_refresh',
False,
),
(
'litellm.proxy._experimental.mcp_server.bridge_token_flow',
'',
'_reload_active_user_by_id',
'reload_active_user_by_id',
False,
),
(
'litellm.proxy._experimental.mcp_server.byok_oauth_endpoints',
'',
'_user_id_from_session_cookie',
'user_id_from_session_cookie',
False,
),
(
'litellm.proxy._experimental.mcp_server.db',
'',
'_decode_oauth_payload',
'decode_oauth_payload',
False,
),
(
'litellm.proxy._experimental.mcp_server.discoverable_endpoints',
'',
'_raise_if_not_oauth2',
'raise_if_not_oauth2',
False,
),
(
'litellm.proxy._experimental.mcp_server.mcp_context',
'',
'_mcp_active_toolset_id',
'mcp_active_toolset_id',
False,
),
(
'litellm.proxy._experimental.mcp_server.mcp_context',
'',
'_mcp_gateway_initialize_instructions',
'mcp_gateway_initialize_instructions',
False,
),
(
'litellm.proxy._experimental.mcp_server.mcp_context',
'',
'_mcp_gateway_server_name',
'mcp_gateway_server_name',
False,
),
(
'litellm.proxy._experimental.mcp_server.mcp_server_manager',
'',
'_UPSTREAM_OAUTH_DISCOVERY_AUTH_TYPES',
'UPSTREAM_OAUTH_DISCOVERY_AUTH_TYPES',
False,
),
(
'litellm.proxy._experimental.mcp_server.mcp_server_manager',
'',
'_caller_authorization_fans_out',
'caller_authorization_fans_out',
False,
),
(
'litellm.proxy._experimental.mcp_server.mcp_server_manager',
'',
'_client_forwarded_authorization_headers',
'client_forwarded_authorization_headers',
False,
),
(
'litellm.proxy._experimental.mcp_server.mcp_server_manager',
'',
'_resolve_openapi_tool_auth',
'resolve_openapi_tool_auth',
False,
),
(
'litellm.proxy._experimental.mcp_server.mcp_server_manager',
'',
'_should_strip_caller_authorization',
'should_strip_caller_authorization',
False,
),
(
'litellm.proxy._experimental.mcp_server.mcp_server_manager',
'MCPServerManager',
'_build_mcp_server_table',
'build_mcp_server_table',
False,
),
(
'litellm.proxy._experimental.mcp_server.mcp_server_manager',
'MCPServerManager',
'_build_stdio_env',
'build_stdio_env',
False,
),
(
'litellm.proxy._experimental.mcp_server.mcp_server_manager',
'MCPServerManager',
'_create_mcp_client',
'create_mcp_client',
False,
),
(
'litellm.proxy._experimental.mcp_server.mcp_server_manager',
'MCPServerManager',
'_ensure_upstream_initialize_instructions_cached',
'ensure_upstream_initialize_instructions_cached',
False,
),
(
'litellm.proxy._experimental.mcp_server.mcp_server_manager',
'MCPServerManager',
'_extract_subject_token',
'extract_subject_token',
False,
),
(
'litellm.proxy._experimental.mcp_server.mcp_server_manager',
'MCPServerManager',
'_get_mcp_server_from_tool_name',
'get_mcp_server_from_tool_name',
False,
),
(
'litellm.proxy._experimental.mcp_server.mcp_server_manager',
'MCPServerManager',
'_get_tools_from_server',
'get_tools_from_server',
False,
),
(
'litellm.proxy._experimental.mcp_server.mcp_server_manager',
'MCPServerManager',
'_is_server_accessible_from_ip',
'is_server_accessible_from_ip',
False,
),
(
'litellm.proxy._experimental.mcp_server.oauth2_token_cache',
'',
'_compute_per_user_token_ttl',
'compute_per_user_token_ttl',
False,
),
(
'litellm.proxy._experimental.mcp_server.oauth_utils',
'',
'_redact_mcp_resource_url',
'redact_mcp_resource_url',
False,
),
(
'litellm.proxy._experimental.mcp_server.server',
'',
'_redact_mcp_resource_url',
'redact_mcp_resource_url',
False,
),
(
'litellm.proxy._experimental.mcp_server.openapi_to_mcp_generator',
'',
'_OPENAPI_TOOL_NAME_MAX_LEN',
'OPENAPI_TOOL_NAME_MAX_LEN',
False,
),
(
'litellm.proxy._experimental.mcp_server.openapi_to_mcp_generator',
'',
'_request_auth_header',
'request_auth_header',
False,
),
(
'litellm.proxy._experimental.mcp_server.openapi_to_mcp_generator',
'',
'_request_extra_headers',
'request_extra_headers',
False,
),
(
'litellm.proxy._experimental.mcp_server.openapi_to_mcp_generator',
'',
'_request_resolved_auth_headers',
'request_resolved_auth_headers',
False,
),
(
'litellm.proxy._experimental.mcp_server.semantic_tool_filter',
'SemanticMCPToolFilter',
'_extract_tool_info',
'extract_tool_info',
False,
),
(
'litellm.proxy._experimental.mcp_server.server',
'',
'_apply_toolset_scope',
'apply_toolset_scope',
False,
),
(
'litellm.proxy._experimental.mcp_server.server_resolution',
'MCPServerRegistry',
'_build_mcp_server_table',
'build_mcp_server_table',
False,
),
(
'litellm.proxy._experimental.mcp_server.server_resolution',
'MCPServerRegistry',
'_is_server_accessible_from_ip',
'is_server_accessible_from_ip',
False,
),
(
'litellm.proxy.anthropic_endpoints.claude_code_endpoints.claude_code_marketplace',
'',
'_get_prisma_client',
'get_prisma_client',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_cache_access_object',
'cache_access_object',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_cache_key_object',
'cache_key_object',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_cache_team_object',
'cache_team_object',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_can_object_call_model',
'can_object_call_model',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_check_end_user_budget',
'check_end_user_budget',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_check_model_access_helper',
'check_model_access_helper',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_check_team_member_model_access',
'check_team_member_model_access',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_copy_user_api_key_auth_for_cache',
'copy_user_api_key_auth_for_cache',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_delete_cache_access_object',
'delete_cache_access_object',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_delete_cache_key_object',
'delete_cache_key_object',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_fetch_key_object_from_db_with_reconnect',
'fetch_key_object_from_db_with_reconnect',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_get_agent_ids_from_access_groups',
'get_agent_ids_from_access_groups',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_get_mcp_server_ids_from_access_groups',
'get_mcp_server_ids_from_access_groups',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_get_models_from_access_groups',
'get_models_from_access_groups',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_get_team_object_from_cache',
'get_team_object_from_cache',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_get_user_role',
'get_user_role',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_is_model_cost_zero',
'is_model_cost_zero',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_is_user_proxy_admin',
'is_user_proxy_admin',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_key_access_group_grants_model',
'key_access_group_grants_model',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_organization_max_budget_check',
'organization_max_budget_check',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_team_max_budget_check',
'team_max_budget_check',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_team_member_max_budget_alert_check',
'team_member_max_budget_alert_check',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_virtual_key_max_budget_alert_check',
'virtual_key_max_budget_alert_check',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_virtual_key_max_budget_check',
'virtual_key_max_budget_check',
False,
),
(
'litellm.proxy.auth.auth_checks',
'',
'_virtual_key_soft_budget_check',
'virtual_key_soft_budget_check',
False,
),
(
'litellm.proxy.auth.auth_checks_organization',
'',
'_user_is_org_admin',
'user_is_org_admin',
False,
),
(
'litellm.proxy.auth.auth_exception_handler',
'UserAPIKeyAuthExceptionHandler',
'_handle_authentication_error',
'handle_authentication_error',
False,
),
(
'litellm.proxy.auth.auth_utils',
'',
'_get_request_ip_address',
'get_request_ip_address',
False,
),
(
'litellm.proxy.auth.resolvers.store',
'IdentityStore',
'_principal_from_key',
'principal_from_key',
False,
),
(
'litellm.proxy.auth.route_checks',
'RouteChecks',
'_get_request_method',
'get_request_method',
False,
),
(
'litellm.proxy.auth.route_checks',
'RouteChecks',
'_is_assistants_api_request',
'is_assistants_api_request',
False,
),
(
'litellm.proxy.auth.route_checks',
'RouteChecks',
'_is_wildcard_pattern',
'is_wildcard_pattern',
False,
),
(
'litellm.proxy.auth.user_api_key_auth',
'',
'_enforce_key_and_fallback_model_access',
'enforce_key_and_fallback_model_access',
False,
),
(
'litellm.proxy.auth.user_api_key_auth',
'',
'_fetch_global_spend_with_event_coordination',
'fetch_global_spend_with_event_coordination',
False,
),
(
'litellm.proxy.auth.user_api_key_auth',
'',
'_get_bearer_token',
'get_bearer_token',
False,
),
(
'litellm.proxy.auth.user_api_key_auth',
'',
'_run_centralized_common_checks',
'run_centralized_common_checks',
False,
),
(
'litellm.proxy.auth.user_api_key_auth',
'',
'_user_api_key_auth_builder',
'user_api_key_auth_builder',
False,
),
(
'litellm.proxy.common_request_processing',
'',
'_is_azure_model_router_request',
'is_azure_model_router_request',
False,
),
(
'litellm.proxy.common_request_processing',
'',
'_should_return_raw_model_name',
'should_return_raw_model_name',
False,
),
(
'litellm.proxy.common_request_processing',
'ProxyBaseLLMRequestProcessing',
'_finalize_streaming_generator_cleanup',
'finalize_streaming_generator_cleanup',
False,
),
(
'litellm.proxy.common_request_processing',
'ProxyBaseLLMRequestProcessing',
'_handle_llm_api_exception',
'handle_llm_api_exception',
False,
),
(
'litellm.proxy.common_request_processing',
'ProxyBaseLLMRequestProcessing',
'_process_chunk_with_cost_injection',
'process_chunk_with_cost_injection',
False,
),
(
'litellm.proxy.common_utils.callback_utils',
'',
'_CALLBACK_VAR_ENCRYPTED_PREFIX',
'CALLBACK_VAR_ENCRYPTED_PREFIX',
False,
),
(
'litellm.proxy.common_utils.config_sync_pubsub',
'',
'_ConfigSyncPubSub',
'ConfigSyncPubSub',
False,
),
(
'litellm.proxy.common_utils.config_sync_pubsub',
'',
'_pubsub_capable_client',
'pubsub_capable_client',
False,
),
(
'litellm.proxy.common_utils.encrypt_decrypt_utils',
'',
'_ALGO_AES_GCM',
'ALGO_AES_GCM',
False,
),
(
'litellm.proxy.common_utils.encrypt_decrypt_utils',
'',
'_ENCRYPTION_ALGORITHM_SETTING',
'ENCRYPTION_ALGORITHM_SETTING',
False,
),
(
'litellm.proxy.common_utils.encrypt_decrypt_utils',
'',
'_V2_GCM_PREFIX',
'V2_GCM_PREFIX',
False,
),
(
'litellm.proxy.common_utils.encrypt_decrypt_utils',
'',
'_get_salt_key',
'get_salt_key',
False,
),
(
'litellm.proxy.common_utils.http_parsing_utils',
'',
'_read_request_body',
'read_request_body',
False,
),
(
'litellm.proxy.common_utils.http_parsing_utils',
'',
'_safe_get_request_headers',
'safe_get_request_headers',
False,
),
(
'litellm.proxy.common_utils.http_parsing_utils',
'',
'_safe_get_request_query_params',
'safe_get_request_query_params',
False,
),
(
'litellm.proxy.common_utils.http_parsing_utils',
'',
'_safe_set_request_parsed_body',
'safe_set_request_parsed_body',
False,
),
(
'litellm.proxy.common_utils.realtime_utils',
'',
'_realtime_request_body',
'realtime_request_body',
False,
),
(
'litellm.proxy.db.db_spend_update_writer',
'DBSpendUpdateWriter',
'_commit_daily_tag_spend_to_db',
'commit_daily_tag_spend_to_db',
False,
),
(
'litellm.proxy.db.db_spend_update_writer',
'DBSpendUpdateWriter',
'_commit_daily_tag_spend_to_db_with_redis',
'commit_daily_tag_spend_to_db_with_redis',
False,
),
(
'litellm.proxy.db.db_spend_update_writer',
'DBSpendUpdateWriter',
'_handle_spend_update_failure',
'handle_spend_update_failure',
False,
),
(
'litellm.proxy.db.db_transaction_queue.redis_update_buffer',
'RedisUpdateBuffer',
'_should_commit_spend_updates_to_redis',
'should_commit_spend_updates_to_redis',
False,
),
(
'litellm.proxy.db.log_db_metrics',
'',
'_is_exception_related_to_db',
'is_exception_related_to_db',
False,
),
(
'litellm.proxy.guardrails.guardrail_hooks.azure.base',
'',
'_RESPONSES_API_CALL_TYPES',
'RESPONSES_API_CALL_TYPES',
False,
),
(
'litellm.proxy.guardrails.guardrail_hooks.cisco_ai_defense.cisco_ai_defense_mcp',
'',
'_CiscoAIDefenseMcpMixin',
'CiscoAIDefenseMcpMixin',
False,
),
(
'litellm.proxy.guardrails.guardrail_hooks.litellm_content_filter.competitor_intent.base',
'',
'_compile_marker',
'compile_marker',
False,
),
(
'litellm.proxy.guardrails.guardrail_hooks.litellm_content_filter.competitor_intent.base',
'',
'_count_signals',
'count_signals',
False,
),
(
'litellm.proxy.guardrails.guardrail_hooks.litellm_content_filter.competitor_intent.base',
'',
'_word_boundary_match',
'word_boundary_match',
False,
),
(
'litellm.proxy.guardrails.guardrail_hooks.presidio',
'',
'_OPTIONAL_PresidioPIIMasking',
'OPTIONAL_PresidioPIIMasking',
False,
),
(
'litellm.proxy.health_check',
'',
'_clean_endpoint_data',
'clean_endpoint_data',
False,
),
(
'litellm.proxy.health_check',
'',
'_update_litellm_params_for_health_check',
'update_litellm_params_for_health_check',
False,
),
(
'litellm.proxy.health_endpoints._health_endpoints',
'',
'_convert_health_check_to_dict',
'convert_health_check_to_dict',
False,
),
(
'litellm.proxy.health_endpoints._health_endpoints',
'',
'_save_background_health_checks_to_db',
'save_background_health_checks_to_db',
False,
),
(
'litellm.proxy.hooks.azure_content_safety',
'',
'_PROXY_AzureContentSafety',
'PROXY_AzureContentSafety',
False,
),
(
'litellm.proxy.hooks.batch_rate_limiter',
'',
'_PROXY_BatchRateLimiter',
'PROXY_BatchRateLimiter',
False,
),
(
'litellm.proxy.hooks.batch_redis_get',
'',
'_PROXY_BatchRedisRequests',
'PROXY_BatchRedisRequests',
False,
),
(
'litellm.proxy.hooks.cache_control_check',
'',
'_PROXY_CacheControlCheck',
'PROXY_CacheControlCheck',
False,
),
(
'litellm.proxy.hooks.dynamic_rate_limiter',
'',
'_PROXY_DynamicRateLimitHandler',
'PROXY_DynamicRateLimitHandler',
False,
),
(
'litellm.proxy.hooks.dynamic_rate_limiter_v3',
'',
'_PROXY_DynamicRateLimitHandlerV3',
'PROXY_DynamicRateLimitHandlerV3',
False,
),
(
'litellm.proxy.hooks.max_budget_per_session_limiter',
'',
'_PROXY_MaxBudgetPerSessionHandler',
'PROXY_MaxBudgetPerSessionHandler',
False,
),
(
'litellm.proxy.hooks.max_iterations_limiter',
'',
'_PROXY_MaxIterationsHandler',
'PROXY_MaxIterationsHandler',
False,
),
(
'litellm.proxy.hooks.model_max_budget_limiter',
'',
'_PROXY_VirtualKeyModelMaxBudgetLimiter',
'PROXY_VirtualKeyModelMaxBudgetLimiter',
False,
),
(
'litellm.proxy.hooks.parallel_request_limiter',
'',
'_PROXY_MaxParallelRequestsHandler',
'PROXY_MaxParallelRequestsHandler',
False,
),
(
'litellm.proxy.hooks.parallel_request_limiter_v3',
'',
'_PROXY_MaxParallelRequestsHandler_v3',
'PROXY_MaxParallelRequestsHandler_v3',
False,
),
(
'litellm.proxy.hooks.parallel_request_limiter_v3',
'_PROXY_MaxParallelRequestsHandler_v3',
'_create_rate_limit_descriptors',
'create_rate_limit_descriptors',
False,
),
(
'litellm.proxy.hooks.prompt_injection_detection',
'',
'_OPTIONAL_PromptInjectionDetection',
'OPTIONAL_PromptInjectionDetection',
False,
),
(
'litellm.proxy.hooks.proxy_track_cost_callback',
'',
'_ProxyDBLogger',
'ProxyDBLogger',
False,
),
(
'litellm.proxy.hooks.sensitive_data_routing',
'',
'_PROXY_SensitiveDataRoutingHandler',
'PROXY_SensitiveDataRoutingHandler',
False,
),
(
'litellm.proxy.litellm_pre_call_utils',
'',
'_add_guardrails_from_key_or_team_metadata',
'add_guardrails_from_key_or_team_metadata',
False,
),
(
'litellm.proxy.litellm_pre_call_utils',
'',
'_get_dynamic_logging_metadata',
'get_dynamic_logging_metadata',
False,
),
(
'litellm.proxy.litellm_pre_call_utils',
'',
'_get_metadata_variable_name',
'get_metadata_variable_name',
False,
),
(
'litellm.proxy.litellm_pre_call_utils',
'',
'_get_validated_callback_metadata',
'get_validated_callback_metadata',
False,
),
(
'litellm.proxy.litellm_pre_call_utils',
'LiteLLMProxyRequestSetup',
'_merge_tags',
'merge_tags',
False,
),
(
'litellm.proxy.management_endpoints.common_utils',
'',
'_check_disable_global_guardrails_caller_permission',
'check_disable_global_guardrails_caller_permission',
False,
),
(
'litellm.proxy.management_endpoints.common_utils',
'',
'_check_passthrough_routes_caller_permission',
'check_passthrough_routes_caller_permission',
False,
),
(
'litellm.proxy.management_endpoints.common_utils',
'',
'_set_object_metadata_field',
'set_object_metadata_field',
False,
),
(
'litellm.proxy.management_endpoints.common_utils',
'',
'_team_member_has_permission',
'team_member_has_permission',
False,
),
(
'litellm.proxy.management_endpoints.common_utils',
'',
'_update_metadata_fields',
'update_metadata_fields',
False,
),
(
'litellm.proxy.management_endpoints.common_utils',
'',
'_upsert_budget_and_membership',
'upsert_budget_and_membership',
False,
),
(
'litellm.proxy.management_endpoints.common_utils',
'',
'_user_has_admin_privileges',
'user_has_admin_privileges',
False,
),
(
'litellm.proxy.management_endpoints.common_utils',
'',
'_user_has_admin_view',
'user_api_key_has_admin_view',
False,
),
(
'litellm.proxy.management_endpoints.config_override_endpoints',
'',
'_clear_hashicorp_vault_state',
'clear_hashicorp_vault_state',
False,
),
(
'litellm.proxy.management_endpoints.config_override_endpoints',
'',
'_get_current_env_values',
'get_current_env_values',
False,
),
(
'litellm.proxy.management_endpoints.config_override_endpoints',
'',
'_parse_config_value',
'parse_config_value',
False,
),
(
'litellm.proxy.management_endpoints.config_override_endpoints',
'',
'_set_env_vars',
'set_env_vars',
False,
),
(
'litellm.proxy.management_endpoints.key_management_endpoints',
'',
'_calculate_key_rotation_time',
'calculate_key_rotation_time',
False,
),
(
'litellm.proxy.management_endpoints.key_management_endpoints',
'',
'_check_permissions_caller_permission',
'check_permissions_caller_permission',
False,
),
(
'litellm.proxy.management_endpoints.key_management_endpoints',
'',
'_get_caller_team_role',
'get_caller_team_role',
False,
),
(
'litellm.proxy.management_endpoints.key_management_endpoints',
'',
'_list_key_helper',
'list_key_helper',
False,
),
(
'litellm.proxy.management_endpoints.key_management_endpoints',
'',
'_persist_deleted_verification_tokens',
'persist_deleted_verification_tokens',
False,
),
(
'litellm.proxy.management_endpoints.key_management_endpoints',
'',
'_rotate_master_key',
'rotate_master_key',
False,
),
(
'litellm.proxy.management_endpoints.mcp_management_endpoints',
'',
'_inherit_credentials_from_existing_server',
'inherit_credentials_from_existing_server',
False,
),
(
'litellm.proxy.management_endpoints.model_management_endpoints',
'',
'_add_model_to_db',
'add_model_to_db',
False,
),
(
'litellm.proxy.management_endpoints.model_management_endpoints',
'',
'_add_team_model_to_db',
'add_team_model_to_db',
False,
),
(
'litellm.proxy.management_endpoints.model_management_endpoints',
'',
'_deduplicate_litellm_router_models',
'deduplicate_litellm_router_models',
False,
),
(
'litellm.proxy.management_endpoints.organization_endpoints',
'',
'_verify_org_access',
'verify_org_access',
False,
),
(
'litellm.proxy.management_endpoints.policy_endpoints.endpoints',
'',
'_build_all_names_per_competitor',
'build_all_names_per_competitor',
False,
),
(
'litellm.proxy.management_endpoints.policy_endpoints.endpoints',
'',
'_build_comparison_blocked_words',
'build_comparison_blocked_words',
False,
),
(
'litellm.proxy.management_endpoints.policy_endpoints.endpoints',
'',
'_build_competitor_guardrail_definitions',
'build_competitor_guardrail_definitions',
False,
),
(
'litellm.proxy.management_endpoints.policy_endpoints.endpoints',
'',
'_build_name_blocked_words',
'build_name_blocked_words',
False,
),
(
'litellm.proxy.management_endpoints.policy_endpoints.endpoints',
'',
'_build_recommendation_blocked_words',
'build_recommendation_blocked_words',
False,
),
(
'litellm.proxy.management_endpoints.policy_endpoints.endpoints',
'',
'_build_refinement_prompt',
'build_refinement_prompt',
False,
),
(
'litellm.proxy.management_endpoints.policy_endpoints.endpoints',
'',
'_clean_competitor_line',
'clean_competitor_line',
False,
),
(
'litellm.proxy.management_endpoints.policy_endpoints.endpoints',
'',
'_parse_variations_response',
'parse_variations_response',
False,
),
(
'litellm.proxy.management_endpoints.team_endpoints',
'',
'_cleanup_members_with_roles',
'cleanup_members_with_roles',
False,
),
(
'litellm.proxy.management_endpoints.team_endpoints',
'',
'_refresh_cached_team',
'refresh_cached_team',
False,
),
(
'litellm.proxy.management_endpoints.team_endpoints',
'TeamMemberBudgetHandler',
'_clean_team_member_fields',
'clean_team_member_fields',
False,
),
(
'litellm.proxy.management_endpoints.ui_sso',
'',
'_sso_return_to_redirect',
'sso_return_to_redirect',
False,
),
(
'litellm.proxy.management_endpoints.ui_sso',
'SSOAuthenticationHandler',
'_delete_pkce_verifier',
'delete_pkce_verifier',
False,
),
(
'litellm.proxy.management_endpoints.ui_sso',
'SSOAuthenticationHandler',
'_get_cli_state',
'get_cli_state',
False,
),
(
'litellm.proxy.management_endpoints.ui_sso',
'SSOAuthenticationHandler',
'_get_user_email_and_id_from_result',
'get_user_email_and_id_from_result',
False,
),
(
'litellm.proxy.management_endpoints.ui_sso',
'SSOAuthenticationHandler',
'_pkce_token_exchange',
'pkce_token_exchange',
False,
),
(
'litellm.proxy.management_endpoints.ui_sso',
'SSOAuthenticationHandler',
'_validate_return_to',
'validate_return_to',
False,
),
(
'litellm.proxy.management_helpers.object_permission_utils',
'',
'_get_allow_all_keys_server_ids',
'get_allow_all_keys_server_ids',
False,
),
(
'litellm.proxy.management_helpers.object_permission_utils',
'',
'_get_team_allowed_mcp_servers',
'get_team_allowed_mcp_servers',
False,
),
(
'litellm.proxy.management_helpers.object_permission_utils',
'',
'_set_object_permission',
'set_object_permission',
False,
),
(
'litellm.proxy.openai_files_endpoints.common_utils',
'',
'_is_base64_encoded_unified_file_id',
'is_base64_encoded_unified_file_id',
False,
),
(
'litellm.proxy.pass_through_endpoints.llm_passthrough_endpoints',
'',
'_extract_model_from_bedrock_endpoint',
'extract_model_from_bedrock_endpoint',
False,
),
(
'litellm.proxy.pass_through_endpoints.llm_passthrough_endpoints',
'BaseOpenAIPassThroughHandler',
'_base_openai_pass_through_handler',
'base_openai_pass_through_handler',
False,
),
(
'litellm.proxy.pass_through_endpoints.llm_provider_handlers.anthropic_passthrough_logging_handler',
'AnthropicPassthroughLoggingHandler',
'_build_complete_streaming_response',
'build_complete_streaming_response',
False,
),
(
'litellm.proxy.pass_through_endpoints.llm_provider_handlers.anthropic_passthrough_logging_handler',
'AnthropicPassthroughLoggingHandler',
'_build_usage_only_response_from_chunks',
'build_usage_only_response_from_chunks',
False,
),
(
'litellm.proxy.pass_through_endpoints.llm_provider_handlers.anthropic_passthrough_logging_handler',
'AnthropicPassthroughLoggingHandler',
'_handle_logging_anthropic_collected_chunks',
'handle_logging_anthropic_collected_chunks',
False,
),
(
'litellm.proxy.pass_through_endpoints.llm_provider_handlers.assembly_passthrough_logging_handler',
'AssemblyAIPassthroughLoggingHandler',
'_get_assembly_base_url_from_region',
'get_assembly_base_url_from_region',
False,
),
(
'litellm.proxy.pass_through_endpoints.llm_provider_handlers.assembly_passthrough_logging_handler',
'AssemblyAIPassthroughLoggingHandler',
'_get_assembly_region_from_url',
'get_assembly_region_from_url',
False,
),
(
'litellm.proxy.pass_through_endpoints.llm_provider_handlers.assembly_passthrough_logging_handler',
'AssemblyAIPassthroughLoggingHandler',
'_should_log_request',
'should_log_request',
False,
),
(
'litellm.proxy.pass_through_endpoints.llm_provider_handlers.openai_passthrough_logging_handler',
'',
'_is_openai_compatible_url',
'is_openai_compatible_url',
False,
),
(
'litellm.proxy.pass_through_endpoints.llm_provider_handlers.openai_passthrough_logging_handler',
'OpenAIPassthroughLoggingHandler',
'_handle_logging_openai_collected_chunks',
'handle_logging_openai_collected_chunks',
False,
),
(
'litellm.proxy.pass_through_endpoints.llm_provider_handlers.vertex_passthrough_logging_handler',
'VertexPassthroughLoggingHandler',
'_handle_logging_vertex_collected_chunks',
'handle_logging_vertex_collected_chunks',
False,
),
(
'litellm.proxy.pass_through_endpoints.pass_through_endpoints',
'HttpPassThroughEndpointHelpers',
'_init_kwargs_for_pass_through_endpoint',
'init_kwargs_for_pass_through_endpoint',
False,
),
(
'litellm.proxy.pass_through_endpoints.pass_through_endpoints',
'HttpPassThroughEndpointHelpers',
'_update_stream_param_based_on_request_body',
'update_stream_param_based_on_request_body',
False,
),
(
'litellm.proxy.pass_through_endpoints.streaming_handler',
'PassThroughStreamingHandler',
'_route_streaming_logging_to_handler',
'route_streaming_logging_to_handler',
False,
),
(
'litellm.proxy.pass_through_endpoints.success_handler',
'PassThroughEndpointLogging',
'_handle_logging',
'handle_logging',
False,
),
(
'litellm.proxy.policy_engine.policy_registry',
'PolicyRegistry',
'_parse_policy',
'parse_policy',
False,
),
(
'litellm.proxy.proxy_cli',
'ProxyInitializationHelpers',
'_apply_uvicorn_max_requests_jitter',
'apply_uvicorn_max_requests_jitter',
False,
),
(
'litellm.proxy.proxy_cli',
'ProxyInitializationHelpers',
'_configure_dev_reload',
'configure_dev_reload',
False,
),
(
'litellm.proxy.proxy_cli',
'ProxyInitializationHelpers',
'_echo_litellm_version',
'echo_litellm_version',
False,
),
(
'litellm.proxy.proxy_cli',
'ProxyInitializationHelpers',
'_get_default_unvicorn_init_args',
'get_default_unvicorn_init_args',
False,
),
(
'litellm.proxy.proxy_cli',
'ProxyInitializationHelpers',
'_get_loop_type',
'get_loop_type',
False,
),
(
'litellm.proxy.proxy_cli',
'ProxyInitializationHelpers',
'_init_granian_server',
'init_granian_server',
False,
),
(
'litellm.proxy.proxy_cli',
'ProxyInitializationHelpers',
'_init_hypercorn_server',
'init_hypercorn_server',
False,
),
(
'litellm.proxy.proxy_cli',
'ProxyInitializationHelpers',
'_is_port_in_use',
'is_port_in_use',
False,
),
(
'litellm.proxy.proxy_cli',
'ProxyInitializationHelpers',
'_maybe_setup_prometheus_multiproc_dir',
'maybe_setup_prometheus_multiproc_dir',
False,
),
(
'litellm.proxy.proxy_cli',
'ProxyInitializationHelpers',
'_run_config_validation',
'run_config_validation',
False,
),
(
'litellm.proxy.proxy_cli',
'ProxyInitializationHelpers',
'_run_gunicorn_server',
'run_gunicorn_server',
False,
),
(
'litellm.proxy.proxy_cli',
'ProxyInitializationHelpers',
'_run_health_check',
'run_health_check',
False,
),
(
'litellm.proxy.proxy_cli',
'ProxyInitializationHelpers',
'_run_ollama_serve',
'run_ollama_serve',
False,
),
(
'litellm.proxy.proxy_cli',
'ProxyInitializationHelpers',
'_run_test_chat_completion',
'run_test_chat_completion',
False,
),
(
'litellm.proxy.proxy_server',
'',
'_build_redis_usage_cache',
'build_redis_usage_cache',
False,
),
(
'litellm.proxy.proxy_server',
'',
'_ensure_spend_counter_initialized',
'ensure_spend_counter_initialized',
False,
),
(
'litellm.proxy.proxy_server',
'',
'_ensure_window_spend_counter_initialized',
'ensure_window_spend_counter_initialized',
False,
),
(
'litellm.proxy.proxy_server',
'',
'_environment_has_redis_connection_target',
'environment_has_redis_connection_target',
False,
),
(
'litellm.proxy.proxy_server',
'',
'_get_model_group_info',
'get_model_group_info',
False,
),
(
'litellm.proxy.proxy_server',
'',
'_increment_spend_counter_cache',
'increment_spend_counter_cache',
False,
),
(
'litellm.proxy.proxy_server',
'',
'_initialize_shared_aiohttp_session',
'initialize_shared_aiohttp_session',
False,
),
(
'litellm.proxy.proxy_server',
'',
'_invalidate_spend_counter',
'invalidate_spend_counter',
False,
),
(
'litellm.proxy.proxy_server',
'',
'_title',
'title',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyConfig',
'_add_deployment_locked',
'add_deployment_locked',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyConfig',
'_decrypt_and_set_db_env_variables',
'decrypt_and_set_db_env_variables',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyConfig',
'_decrypt_db_variables',
'decrypt_db_variables',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyConfig',
'_encrypt_env_variables',
'encrypt_env_variables',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyConfig',
'_encrypt_env_variables_for_db',
'encrypt_env_variables_for_db',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyConfig',
'_get_models_from_db',
'get_models_from_db',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyConfig',
'_init_cache',
'init_cache',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyConfig',
'_init_semantic_filter_settings_in_db',
'init_semantic_filter_settings_in_db',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyConfig',
'_serve_pass_through_endpoints',
'serve_pass_through_endpoints',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyStartupEvent',
'_add_proxy_budget_to_db',
'add_proxy_budget_to_db',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyStartupEvent',
'_attach_router_to_prompt_injection_detectors',
'attach_router_to_prompt_injection_detectors',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyStartupEvent',
'_get_transaction_buffer_redis_cache',
'get_transaction_buffer_redis_cache',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyStartupEvent',
'_init_coordination_redis_from_db',
'init_coordination_redis_from_db',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyStartupEvent',
'_init_dd_tracer',
'init_dd_tracer',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyStartupEvent',
'_init_pyroscope',
'init_pyroscope',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyStartupEvent',
'_initialize_jwt_auth',
'initialize_jwt_auth',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyStartupEvent',
'_initialize_semantic_tool_filter',
'initialize_semantic_tool_filter',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyStartupEvent',
'_initialize_startup_logging',
'initialize_startup_logging',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyStartupEvent',
'_setup_prisma_client',
'setup_prisma_client',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyStartupEvent',
'_sync_ui_settings_to_general_settings',
'sync_ui_settings_to_general_settings',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyStartupEvent',
'_update_default_team_member_budget',
'update_default_team_member_budget',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyStartupEvent',
'_validate_redis_transaction_buffer_config',
'validate_redis_transaction_buffer_config',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyStartupEvent',
'_warm_global_spend_cache',
'warm_global_spend_cache',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyStartupEvent',
'_warn_budget_without_db',
'warn_budget_without_db',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyStartupEvent',
'_warn_fail_closed_rate_limits_without_redis',
'warn_fail_closed_rate_limits_without_redis',
False,
),
(
'litellm.proxy.proxy_server',
'ProxyStartupEvent',
'_warn_if_mock_testing_params_enabled',
'warn_if_mock_testing_params_enabled',
False,
),
(
'litellm.proxy.spend_tracking.spend_management_endpoints',
'',
'_get_spend_report_for_time_range',
'get_spend_report_for_time_range',
False,
),
(
'litellm.proxy.spend_tracking.spend_management_endpoints',
'',
'_is_admin_view_safe',
'is_admin_view_safe',
False,
),
(
'litellm.proxy.spend_tracking.spend_tracking_utils',
'',
'_is_master_key',
'is_master_key',
False,
),
(
'litellm.proxy.spend_tracking.spend_tracking_utils',
'',
'_sanitize_error_information_for_spend_logs',
'sanitize_error_information_for_spend_logs',
False,
),
(
'litellm.proxy.utils',
'',
'_cache_user_row',
'cache_user_row',
False,
),
(
'litellm.proxy.utils',
'',
'_check_and_merge_model_level_guardrails',
'check_and_merge_model_level_guardrails',
False,
),
(
'litellm.proxy.utils',
'',
'_get_docs_url',
'get_docs_url',
False,
),
(
'litellm.proxy.utils',
'',
'_get_openapi_url',
'get_openapi_url',
False,
),
(
'litellm.proxy.utils',
'',
'_get_projected_spend_over_limit',
'get_projected_spend_over_limit',
False,
),
(
'litellm.proxy.utils',
'',
'_get_redoc_url',
'get_redoc_url',
False,
),
(
'litellm.proxy.utils',
'',
'_hash_token_if_needed',
'hash_token_if_needed',
False,
),
(
'litellm.proxy.utils',
'',
'_is_projected_spend_over_limit',
'is_projected_spend_over_limit',
False,
),
(
'litellm.proxy.utils',
'',
'_is_valid_team_configs',
'is_valid_team_configs',
False,
),
(
'litellm.proxy.utils',
'',
'_monitor_spend_logs_queue',
'monitor_spend_logs_queue',
False,
),
(
'litellm.proxy.utils',
'',
'_premium_user_check',
'premium_user_check',
False,
),
(
'litellm.proxy.utils',
'',
'_raise_failed_update_spend_exception',
'raise_failed_update_spend_exception',
False,
),
(
'litellm.proxy.utils',
'ProxyLogging',
'_arelease_max_parallel_requests_on_disconnect',
'arelease_max_parallel_requests_on_disconnect',
False,
),
(
'litellm.proxy.utils',
'ProxyLogging',
'_callback_capabilities',
'callback_capabilities',
False,
),
(
'litellm.proxy.utils',
'ProxyLogging',
'_convert_mcp_hook_response_to_kwargs',
'convert_mcp_hook_response_to_kwargs',
False,
),
(
'litellm.proxy.utils',
'ProxyLogging',
'_create_mcp_request_object_from_kwargs',
'create_mcp_request_object_from_kwargs',
False,
),
(
'litellm.proxy.utils',
'ProxyLogging',
'_fire_deferred_stream_logging',
'fire_deferred_stream_logging',
False,
),
)
LLMS_FORWARDER_CASES: Final = (
(
"litellm.llms.bedrock.chat.invoke_handler",
"AWSEventStreamDecoder",
"_chunk_parser",
"chunk_parser",
"instance",
False,
),
(
"litellm.llms.aiml.chat.transformation",
"AIMLChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.anthropic.chat.transformation",
"AnthropicConfig",
"_convert_tool_response_to_message",
"convert_tool_response_to_message",
"staticmethod",
False,
),
(
"litellm.llms.anthropic.chat.transformation",
"AnthropicConfig",
"_map_reasoning_effort",
"map_reasoning_effort",
"staticmethod",
False,
),
(
"litellm.llms.anthropic.chat.transformation",
"AnthropicConfig",
"_map_stop_sequences",
"map_stop_sequences",
"instance",
False,
),
(
"litellm.llms.anthropic.chat.transformation",
"AnthropicConfig",
"_map_tool_helper",
"map_tool_helper",
"instance",
False,
),
(
"litellm.llms.anthropic.chat.transformation",
"AnthropicConfig",
"_map_tools",
"map_tools",
"instance",
False,
),
(
"litellm.llms.anthropic.chat.transformation",
"AnthropicConfig",
"_maybe_drop_speed_param",
"maybe_drop_speed_param",
"staticmethod",
False,
),
(
"litellm.llms.anthropic.chat.transformation",
"AnthropicConfig",
"_model_supports_effort_param",
"model_supports_effort_param",
"staticmethod",
False,
),
(
"litellm.llms.anthropic.chat.transformation",
"AnthropicConfig",
"_raise_invalid_reasoning_effort",
"raise_invalid_reasoning_effort",
"staticmethod",
False,
),
(
"litellm.llms.anthropic.chat.transformation",
"AnthropicConfig",
"_validate_effort_for_model",
"validate_effort_for_model",
"staticmethod",
False,
),
(
"litellm.llms.anthropic.common_utils",
"AnthropicModelInfo",
"_apply_sampling_param",
"apply_sampling_param",
"staticmethod",
False,
),
(
"litellm.llms.anthropic.common_utils",
"AnthropicModelInfo",
"_is_adaptive_thinking_model",
"is_adaptive_thinking_model",
"staticmethod",
False,
),
(
"litellm.llms.anthropic.common_utils",
"AnthropicModelInfo",
"_supports_model_capability",
"supports_model_capability",
"staticmethod",
False,
),
(
"litellm.llms.anthropic.completion.transformation",
"AnthropicTextConfig",
"_is_anthropic_text_model",
"is_anthropic_text_model",
"staticmethod",
False,
),
(
"litellm.llms.azure.common_utils",
"BaseAzureLLM",
"_base_validate_azure_environment",
"base_validate_azure_environment",
"staticmethod",
False,
),
(
"litellm.llms.azure.common_utils",
"BaseAzureLLM",
"_get_base_azure_url",
"get_base_azure_url",
"staticmethod",
False,
),
(
"litellm.llms.azure.common_utils",
"BaseAzureLLM",
"_try_get_default_azure_credential_provider",
"try_get_default_azure_credential_provider",
"staticmethod",
False,
),
(
"litellm.llms.azure.realtime.handler",
"AzureOpenAIRealtime",
"_construct_url",
"construct_url",
"instance",
False,
),
(
"litellm.llms.azure_ai.agents.transformation",
"AzureAIAgentsConfig",
"_get_agent_id",
"get_agent_id",
"instance",
False,
),
(
"litellm.llms.azure_ai.chat.transformation",
"AzureAIStudioConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.azure_ai.embed.cohere_transformation",
"AzureAICohereConfig",
"_transform_request",
"transform_request",
"instance",
False,
),
(
"litellm.llms.azure_ai.embed.cohere_transformation",
"AzureAICohereConfig",
"_transform_response",
"transform_response",
"instance",
False,
),
(
"litellm.llms.base_llm.base_model_iterator",
"BaseModelResponseIterator",
"_string_to_dict_parser",
"string_to_dict_parser",
"staticmethod",
False,
),
(
"litellm.llms.base_llm.chat.transformation",
"BaseConfig",
"_add_tools_to_optional_params",
"add_tools_to_optional_params",
"instance",
False,
),
(
"litellm.llms.base_llm.passthrough.transformation",
"BasePassthroughConfig",
"_convert_raw_bytes_to_str_lines",
"convert_raw_bytes_to_str_lines",
"instance",
False,
),
(
"litellm.llms.bedrock.base_aws_llm",
"BaseAWSLLM",
"_get_aws_region_name",
"get_aws_region_name",
"instance",
False,
),
(
"litellm.llms.bedrock.base_aws_llm",
"BaseAWSLLM",
"_validate_aws_region_name",
"validate_aws_region_name",
"staticmethod",
False,
),
(
"litellm.llms.bedrock.batches.transformation",
"BedrockBatchesConfig",
"_parse_timestamps_and_status",
"parse_timestamps_and_status",
"instance",
False,
),
(
"litellm.llms.bedrock.chat.agentcore.transformation",
"AmazonAgentCoreConfig",
"_get_runtime_session_id",
"get_runtime_session_id",
"instance",
False,
),
(
"litellm.llms.bedrock.chat.agentcore.transformation",
"AmazonAgentCoreConfig",
"_get_runtime_user_id",
"get_runtime_user_id",
"instance",
False,
),
(
"litellm.llms.bedrock.embed.amazon_nova_transformation",
"AmazonNovaEmbeddingConfig",
"_transform_async_invoke_response",
"transform_async_invoke_response",
"instance",
False,
),
(
"litellm.llms.bedrock.embed.amazon_nova_transformation",
"AmazonNovaEmbeddingConfig",
"_transform_request",
"transform_request",
"instance",
False,
),
(
"litellm.llms.bedrock.embed.amazon_nova_transformation",
"AmazonNovaEmbeddingConfig",
"_transform_response",
"transform_response",
"instance",
False,
),
(
"litellm.llms.bedrock.embed.amazon_titan_g1_transformation",
"AmazonTitanG1Config",
"_transform_request",
"transform_request",
"instance",
False,
),
(
"litellm.llms.bedrock.embed.amazon_titan_g1_transformation",
"AmazonTitanG1Config",
"_transform_response",
"transform_response",
"instance",
False,
),
(
"litellm.llms.bedrock.embed.amazon_titan_multimodal_transformation",
"AmazonTitanMultimodalEmbeddingG1Config",
"_transform_request",
"transform_request",
"instance",
False,
),
(
"litellm.llms.bedrock.embed.amazon_titan_multimodal_transformation",
"AmazonTitanMultimodalEmbeddingG1Config",
"_transform_response",
"transform_response",
"instance",
False,
),
(
"litellm.llms.bedrock.embed.amazon_titan_v2_transformation",
"AmazonTitanV2Config",
"_transform_request",
"transform_request",
"instance",
False,
),
(
"litellm.llms.bedrock.embed.amazon_titan_v2_transformation",
"AmazonTitanV2Config",
"_transform_response",
"transform_response",
"instance",
False,
),
(
"litellm.llms.bedrock.embed.cohere_transformation",
"BedrockCohereEmbeddingConfig",
"_transform_request",
"transform_request",
"instance",
False,
),
(
"litellm.llms.bedrock.embed.embedding",
"BedrockEmbedding",
"_get_async_invoke_status",
"get_async_invoke_status",
"instance",
True,
),
(
"litellm.llms.bedrock.embed.twelvelabs_marengo_transformation",
"TwelveLabsMarengoEmbeddingConfig",
"_transform_async_invoke_response",
"transform_async_invoke_response",
"instance",
False,
),
(
"litellm.llms.bedrock.embed.twelvelabs_marengo_transformation",
"TwelveLabsMarengoEmbeddingConfig",
"_transform_request",
"transform_request",
"instance",
False,
),
(
"litellm.llms.bedrock.embed.twelvelabs_marengo_transformation",
"TwelveLabsMarengoEmbeddingConfig",
"_transform_response",
"transform_response",
"instance",
False,
),
(
"litellm.llms.bedrock.files.transformation",
"BedrockFilesConfig",
"_transform_openai_jsonl_content_to_bedrock_jsonl_content",
"transform_openai_jsonl_content_to_bedrock_jsonl_content",
"instance",
False,
),
(
"litellm.llms.bedrock.image_edit.amazon_nova_canvas_image_edit_transformation",
"BedrockAmazonNovaCanvasImageEditConfig",
"_is_nova_canvas_image_edit_model",
"is_nova_canvas_image_edit_model",
"classmethod",
False,
),
(
"litellm.llms.bedrock.image_edit.stability_transformation",
"BedrockStabilityImageEditConfig",
"_is_stability_edit_model",
"is_stability_edit_model",
"classmethod",
False,
),
(
"litellm.llms.bedrock.image_generation.amazon_nova_canvas_transformation",
"AmazonNovaCanvasConfig",
"_is_nova_model",
"is_nova_model",
"classmethod",
False,
),
(
"litellm.llms.bedrock.image_generation.amazon_stability3_transformation",
"AmazonStability3Config",
"_is_stability_3_model",
"is_stability_3_model",
"classmethod",
False,
),
(
"litellm.llms.bedrock.image_generation.amazon_titan_transformation",
"AmazonTitanImageGenerationConfig",
"_is_titan_model",
"is_titan_model",
"classmethod",
False,
),
(
"litellm.llms.bedrock.rerank.transformation",
"BedrockRerankConfig",
"_transform_request",
"transform_request",
"instance",
False,
),
(
"litellm.llms.bedrock.rerank.transformation",
"BedrockRerankConfig",
"_transform_response",
"transform_response",
"instance",
False,
),
(
"litellm.llms.bedrock_mantle.chat.transformation",
"BedrockMantleChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.chatgpt.chat.transformation",
"ChatGPTConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.clarifai.chat.transformation",
"ClarifaiConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.codestral.completion.transformation",
"CodestralTextCompletionConfig",
"_chunk_parser",
"chunk_parser",
"instance",
False,
),
(
"litellm.llms.cohere.embed.v1_transformation",
"CohereEmbeddingConfig",
"_populate_embedding_response",
"populate_embedding_response",
"instance",
False,
),
(
"litellm.llms.cohere.embed.v1_transformation",
"CohereEmbeddingConfig",
"_transform_request",
"transform_request",
"instance",
False,
),
(
"litellm.llms.cohere.embed.v1_transformation",
"CohereEmbeddingConfig",
"_transform_response",
"transform_response",
"instance",
False,
),
(
"litellm.llms.custom_httpx.llm_http_handler",
"BaseLLMHTTPHandler",
"_handle_error",
"handle_error",
"instance",
False,
),
(
"litellm.llms.dashscope.chat.transformation",
"DashScopeChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.datarobot.chat.transformation",
"DataRobotConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.deepinfra.chat.transformation",
"DeepInfraConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.docker_model_runner.chat.transformation",
"DockerModelRunnerChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.featherless_ai.chat.transformation",
"FeatherlessAIConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.fireworks_ai.chat.transformation",
"FireworksAIConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.gemini.chat.transformation",
"GoogleAIStudioGeminiConfig",
"_transform_messages",
"transform_messages",
"instance",
False,
),
(
"litellm.llms.github_copilot.chat.transformation",
"GithubCopilotConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.gradient_ai.chat.transformation",
"GradientAIConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.groq.chat.transformation",
"GroqChatConfig",
"_transform_messages",
"transform_messages",
"instance",
False,
),
(
"litellm.llms.groq.chat.transformation",
"GroqChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.heroku.chat.transformation",
"HerokuChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.hosted_vllm.chat.transformation",
"HostedVLLMChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.hyperbolic.chat.transformation",
"HyperbolicChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.inception.chat.transformation",
"InceptionChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.jina_ai.embedding.transformation",
"JinaAIEmbeddingConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.lambda_ai.chat.transformation",
"LambdaAIChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.langflow.chat.transformation",
"LangFlowConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.langgraph.chat.transformation",
"LangGraphConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.lemonade.chat.transformation",
"LemonadeChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.litellm_proxy.chat.transformation",
"LiteLLMProxyChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.llamafile.chat.transformation",
"LlamafileChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.lm_studio.chat.transformation",
"LMStudioChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.mistral.chat.transformation",
"MistralConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.mistral.chat.transformation",
"MistralConfig",
"_transform_messages",
"transform_messages",
"instance",
False,
),
(
"litellm.llms.modelscope.chat.transformation",
"ModelScopeChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.moonshot.chat.transformation",
"MoonshotChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.morph.chat.transformation",
"MorphChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.nscale.chat.transformation",
"NscaleConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.openai.chat.gpt_5_transformation",
"OpenAIGPT5Config",
"_supports_reasoning_effort_level",
"supports_reasoning_effort_level",
"classmethod",
False,
),
(
"litellm.llms.openai.chat.gpt_transformation",
"OpenAIGPTConfig",
"_transform_messages",
"transform_messages",
"instance",
False,
),
(
"litellm.llms.openai.common_utils",
"BaseOpenAILLM",
"_get_async_http_client",
"get_async_http_client",
"staticmethod",
False,
),
(
"litellm.llms.openai.openai",
"OpenAIChatCompletion",
"_get_openai_client",
"get_openai_client",
"instance",
False,
),
(
"litellm.llms.openai.openai",
"OpenAIConfig",
"_transform_messages",
"transform_messages",
"instance",
False,
),
(
"litellm.llms.openai.realtime.handler",
"OpenAIRealtime",
"_construct_url",
"construct_url",
"instance",
False,
),
(
"litellm.llms.openai_like.chat.transformation",
"OpenAILikeChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.openai_like.dynamic_config",
"JSONProviderConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.perplexity.chat.transformation",
"PerplexityChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.ragflow.chat.transformation",
"RAGFlowConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.snowflake.utils",
"SnowflakeBaseConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.soniox.audio_transcription.transformation",
"SonioxAudioTranscriptionConfig",
"_build_response_from_payload",
"build_response_from_payload",
"instance",
False,
),
(
"litellm.llms.together_ai.rerank.transformation",
"TogetherAIRerankConfig",
"_transform_response",
"transform_response",
"instance",
False,
),
(
"litellm.llms.v0.chat.transformation",
"V0ChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.vercel_ai_gateway.chat.transformation",
"VercelAIGatewayConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini",
"VertexGeminiConfig",
"_calculate_usage",
"calculate_usage",
"staticmethod",
False,
),
(
"litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini",
"VertexGeminiConfig",
"_calculate_web_search_requests",
"calculate_web_search_requests",
"staticmethod",
False,
),
(
"litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini",
"VertexGeminiConfig",
"_check_finish_reason",
"check_finish_reason",
"staticmethod",
False,
),
(
"litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini",
"VertexGeminiConfig",
"_check_prompt_level_content_filter",
"check_prompt_level_content_filter",
"staticmethod",
False,
),
(
"litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini",
"VertexGeminiConfig",
"_drop_search_tools_mixed_with_functions",
"drop_search_tools_mixed_with_functions",
"classmethod",
False,
),
(
"litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini",
"VertexGeminiConfig",
"_forward_gemini_function_call_id",
"forward_gemini_function_call_id",
"staticmethod",
False,
),
(
"litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini",
"VertexGeminiConfig",
"_is_gemini_3_or_newer",
"is_gemini_3_or_newer",
"staticmethod",
False,
),
(
"litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini",
"VertexGeminiConfig",
"_is_model_gemini_spec_model",
"is_model_gemini_spec_model",
"staticmethod",
False,
),
(
"litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini",
"VertexGeminiConfig",
"_map_audio_params",
"map_audio_params",
"instance",
False,
),
(
"litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini",
"VertexGeminiConfig",
"_map_function",
"map_function",
"instance",
False,
),
(
"litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini",
"VertexGeminiConfig",
"_map_web_search_options",
"map_web_search_options",
"instance",
False,
),
(
"litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini",
"VertexGeminiConfig",
"_process_candidates",
"process_candidates",
"staticmethod",
False,
),
(
"litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini",
"VertexGeminiConfig",
"_search_tool_keys",
"search_tool_keys",
"staticmethod",
False,
),
(
"litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini",
"VertexGeminiConfig",
"_set_grounding_usage_counters",
"set_grounding_usage_counters",
"staticmethod",
False,
),
(
"litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini",
"VertexGeminiConfig",
"_set_stream_metadata_on_response",
"set_stream_metadata_on_response",
"staticmethod",
False,
),
(
"litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini",
"VertexGeminiConfig",
"_transform_google_generate_content_to_openai_model_response",
"transform_google_generate_content_to_openai_model_response",
"instance",
False,
),
(
"litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini",
"VertexGeminiConfig",
"_transform_messages",
"transform_messages",
"instance",
False,
),
(
"litellm.llms.vertex_ai.vertex_llm_base",
"VertexBase",
"_ensure_access_token",
"ensure_access_token",
"instance",
False,
),
(
"litellm.llms.vertex_ai.vertex_llm_base",
"VertexBase",
"_ensure_access_token_async",
"ensure_access_token_async",
"instance",
True,
),
(
"litellm.llms.vertex_ai.vertex_llm_base",
"VertexBase",
"_get_token_and_url",
"get_token_and_url",
"instance",
False,
),
(
"litellm.llms.watsonx.common_utils",
"IBMWatsonXMixin",
"_prepare_payload",
"prepare_payload",
"instance",
False,
),
(
"litellm.llms.xai.chat.transformation",
"XAIChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
(
"litellm.llms.xai.chat.transformation",
"XAIChatConfig",
"_normalize_openai_compatible_usage_totals",
"normalize_openai_compatible_usage_totals",
"staticmethod",
False,
),
(
"litellm.llms.xai.chat.transformation",
"XAIChatConfig",
"_supports_stop_reason",
"supports_stop_reason",
"instance",
False,
),
(
"litellm.llms.zai.chat.transformation",
"ZAIChatConfig",
"_get_openai_compatible_provider_info",
"get_openai_compatible_provider_info",
"instance",
False,
),
)
PROXY_FORWARDER_CASES: Final = (
(
'litellm.proxy.utils',
'ProxyLogging',
'_convert_mcp_to_llm_format',
'convert_mcp_to_llm_format',
'instance',
False,
),
)
def _get_owner(module_path: str, owner_name: str) -> object:
module: Final = import_module(module_path or "litellm")
if module_path == "litellm.llms.openai_like.dynamic_config" and owner_name == "JSONProviderConfig":
provider_registry: Final = getattr(
import_module("litellm.llms.openai_like.json_loader"),
"JSONProviderRegistry",
)
provider: Final = provider_registry.get("publicai")
return getattr(module, "create_config_class")(provider)
return module if not owner_name else getattr(module, owner_name)
def _get_instance(owner: object, public_name: str) -> object:
if not isinstance(owner, type):
raise TypeError(f"expected a class owner, got {type(owner).__name__}")
instance: Final = object.__new__(owner)
setattr(instance, public_name, object())
return instance
@pytest.mark.parametrize(
("module_path", "owner_name", "old_name", "new_name", "use_instance"),
(*ALIAS_CASES, *LLMS_ALIAS_CASES, *PROXY_ALIAS_CASES),
)
def test_public_aliases(
module_path: str,
owner_name: str,
old_name: str,
new_name: str,
use_instance: bool,
) -> None:
resolved_owner: Final = _get_owner(module_path, owner_name)
alias_owner: Final = _get_instance(resolved_owner, new_name) if use_instance else resolved_owner
old_value, new_value = getattr(alias_owner, old_name), getattr(alias_owner, new_name)
if isinstance(old_value, MethodType) and isinstance(new_value, MethodType):
assert old_value.__func__ is new_value.__func__
else:
assert old_value is new_value
@pytest.mark.parametrize(
("package_name", "private_name", "public_name"),
PACKAGE_EXPORT_ALIAS_CASES,
)
def test_private_package_exports_are_available_and_match_public_alias(
package_name: str,
private_name: str,
public_name: str,
) -> None:
package: Final = import_module(package_name)
assert getattr(package, private_name) is getattr(package, public_name)
@pytest.mark.parametrize(
("module_path", "private_name", "public_name"),
MODULE_IMPORT_ALIAS_CASES,
)
def test_module_level_private_imports_remain_compatible(
module_path: str,
private_name: str,
public_name: str,
) -> None:
module: Final = import_module(module_path)
assert getattr(module, private_name) is getattr(module, public_name)
@pytest.mark.parametrize(
("module_path", "private_name", "public_name"),
PROXY_CLASS_NAME_ALIAS_CASES,
)
def test_proxy_class_aliases_keep_the_private_name(
module_path: str,
private_name: str,
public_name: str,
) -> None:
module: Final = import_module(module_path)
private_class: Final = cast(type[object], getattr(module, private_name))
public_class: Final = cast(type[object], getattr(module, public_name))
assert public_class is private_class
assert public_class.__name__ == private_name
def _make_private_override(
descriptor: str,
is_async: bool,
result: object,
) -> object:
def recorded_args(args: tuple[object, ...]) -> tuple[object, ...]:
return args[1:] if descriptor in ("instance", "classmethod") else args
def sync_override(
*args: object, **kwargs: object
) -> tuple[object, tuple[object, ...], dict[str, object]]:
return result, recorded_args(args), kwargs
async def async_override(
*args: object, **kwargs: object
) -> tuple[object, tuple[object, ...], dict[str, object]]:
return result, recorded_args(args), kwargs
implementation: Final = async_override if is_async else sync_override
if descriptor == "classmethod":
return classmethod(implementation)
if descriptor == "staticmethod":
return staticmethod(implementation)
return implementation
def _abstract_method_placeholder(*args: object, **kwargs: object) -> None:
return None
def _forwarder_arguments(
method: Callable[..., object],
) -> tuple[tuple[object, ...], dict[str, object]]:
parameters: Final = tuple(inspect.signature(method).parameters.values())
positional: Final = tuple(
object()
for parameter in parameters
if parameter.kind
in (
inspect.Parameter.POSITIONAL_ONLY,
inspect.Parameter.POSITIONAL_OR_KEYWORD,
inspect.Parameter.VAR_POSITIONAL,
)
)
keyword_only: Final = {
parameter.name: object() for parameter in parameters if parameter.kind is inspect.Parameter.KEYWORD_ONLY
}
variadic_keyword: Final = {
f"forwarder_extra_{index}": object()
for index, parameter in enumerate(parameters)
if parameter.kind is inspect.Parameter.VAR_KEYWORD
}
return positional, {**keyword_only, **variadic_keyword}
@pytest.mark.asyncio
@pytest.mark.parametrize(
(
"module_path",
"owner_name",
"private_name",
"public_name",
"descriptor",
"is_async",
),
(*LLMS_FORWARDER_CASES, *PROXY_FORWARDER_CASES),
)
async def test_public_forwarders_dispatch_to_private_subclass_override(
module_path: str,
owner_name: str,
private_name: str,
public_name: str,
descriptor: str,
is_async: bool,
) -> None:
owner: Final = _get_owner(module_path, owner_name)
if not isinstance(owner, type):
raise TypeError(f"expected a class owner, got {type(owner).__name__}")
expected: Final = object()
abstract_method_overrides: Final = {
name: _abstract_method_placeholder for name in getattr(owner, "__abstractmethods__", ())
}
subclass: Final = type(
f"{owner_name}PrivateOverride",
(owner,),
{**abstract_method_overrides, private_name: _make_private_override(descriptor, is_async, expected)},
)
instance: Final = object.__new__(subclass)
public_method: Final = cast(Callable[..., object], getattr(instance, public_name))
args, kwargs = _forwarder_arguments(public_method)
invocation: Final = public_method(*args, **kwargs)
if is_async:
assert inspect.isawaitable(invocation)
awaited: Final = await cast(Awaitable[object], invocation)
assert awaited == (expected, args, kwargs)
return
assert invocation == (expected, args, kwargs)
@pytest.mark.parametrize(
("module_path", "owner_name", "old_name", "new_name"),
PROPERTY_CASES,
)
def test_protected_data_properties_round_trip(
module_path: str,
owner_name: str,
old_name: str,
new_name: str,
) -> None:
owner: Final = _get_owner(module_path, owner_name)
if not isinstance(owner, type):
raise TypeError(f"expected a class owner, got {type(owner).__name__}")
instance: Final = object.__new__(owner)
first_value: Final = object()
second_value: Final = object()
setattr(instance, new_name, first_value)
assert getattr(instance, old_name) is first_value
setattr(instance, old_name, second_value)
assert getattr(instance, new_name) is second_value
@pytest.mark.parametrize(
("module_path", "owner_name", "old_name", "new_name"),
CLASS_PROPERTY_CASES,
)
def test_class_level_property_alias_round_trip(
module_path: str,
owner_name: str,
old_name: str,
new_name: str,
) -> None:
owner: Final = _get_owner(module_path, owner_name)
first_value: Final = object()
second_value: Final = object()
original_class_value: Final = getattr(owner, new_name)
try:
setattr(owner, old_name, first_value)
assert getattr(owner, new_name) is first_value
setattr(owner, new_name, second_value)
assert getattr(owner, old_name) is second_value
finally:
setattr(owner, new_name, original_class_value)