Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/BerriAI/litellm
/ functions
Functions
71,069 in github.com/BerriAI/litellm
⨍
Functions
71,069
◇
Types & classes
10,227
↳
Endpoints
1,754
↓ 11 callers
Function
_build_event_stream_frame
(event_type: str, payload: dict)
tests/test_litellm/llms/bedrock/passthrough/guardrail_translation/test_handler.py:745
↓ 11 callers
Function
_classify_cursor_request
Classify a Cursor API request into a readable operation name.
litellm/proxy/pass_through_endpoints/llm_provider_handlers/cursor_passthrough_logging_handler.py:35
↓ 11 callers
Method
_config
(self)
tests/test_litellm/llms/oci/test_oci_coverage_boost.py:851
↓ 11 callers
Function
_converse_data
(endpoint: str = "model/anthropic.claude-3-sonnet/converse")
tests/test_litellm/llms/bedrock/passthrough/guardrail_translation/test_handler.py:37
↓ 11 callers
Method
_convert_consecutive_user_messages_to_guarded_text
Convert consecutive user messages at the end to guarded_text type if guardrailConfig is present and no guarded_text is already presen
litellm/llms/bedrock/chat/converse_transformation.py:141
↓ 11 callers
Function
_convert_mcp_messages_to_openai
Convert MCP SamplingMessage list to OpenAI messages format. MCP messages use: - role: "user" | "assistant" - content: TextContent | I
litellm/proxy/_experimental/mcp_server/sampling_handler.py:358
↓ 11 callers
Method
_create_bedrock_block
Create appropriate Bedrock content block based on mime type.
litellm/litellm_core_utils/prompt_templates/factory.py:3540
↓ 11 callers
Function
_emit_llm
Drive the real boundary flow: open at ``pre_call`` then close at the async callback. ``ambient``, if given, is the span that is the active OTel co
tests/test_litellm/integrations/otel/test_otel_v2_logger.py:114
↓ 11 callers
Function
_enforce_upperbound_key_params
Enforce upperbound limits on key parameters. For key generation (fill_defaults=True): fills None values with upperbound defaults. For ke
litellm/proxy/management_endpoints/key_management_endpoints.py:679
↓ 11 callers
Function
_engine
(legacy_compat=True)
tests/test_litellm/integrations/otel/test_otel_v2_emitter.py:53
↓ 11 callers
Method
_execute_tool_calls
Execute tool calls and return results.
litellm/responses/mcp/litellm_proxy_mcp_handler.py:611
↓ 11 callers
Method
_extract_all_messages
Extract all messages (request + response) with sequence numbers and timestamps. Processes request messages from StandardLoggingPaylo
litellm/integrations/newrelic/newrelic.py:497
↓ 11 callers
Method
_extract_text_from_messages
Extract text content from the last user message for routing. Handles tool-call conversations (where the last message may be an
litellm/router_strategy/auto_router/auto_router.py:86
↓ 11 callers
Function
_file_message
(file_data_b64: str, mime: str = "application/pdf", filename: str = "doc.pdf")
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_model_armor.py:1907
↓ 11 callers
Method
_fire_deferred_stream_logging
Fire the deferred streaming logging callback after the full streaming pipeline (including guardrail end-of-stream blocks) has complet
litellm/proxy/utils.py:2567
↓ 11 callers
Function
_generic_lazy_import
Generic function that handles lazy importing for most attributes. This is the workhorse function - it does the actual importing and caching.
litellm/_lazy_imports.py:208
↓ 11 callers
Method
_get_all_deployments
Return all deployments of a model name Used for accurate 'get_model_list'. if team_id specified, only return team-specific
litellm/router.py:9204
↓ 11 callers
Method
_get_async_client_session
(self, dynamic_client_session: Optional[ClientSession] = None)
litellm/llms/custom_httpx/aiohttp_handler.py:96
↓ 11 callers
Method
_get_email_params
Get common email parameters used across different email sending methods Args: email_event: Type of email event
enterprise/litellm_enterprise/enterprise_callbacks/send_emails/base_email.py:677
↓ 11 callers
Method
_get_guardrail_overhead_seconds
Seconds of additive guardrail time (pre/post-call only) on the payload. during_call guardrails run concurrently with the LLM call, so their
litellm/integrations/prometheus.py:1064
↓ 11 callers
Method
_get_litellm_resource
Create an OpenTelemetry Resource using config-driven defaults.
litellm/integrations/opentelemetry.py:362
↓ 11 callers
Method
_get_output_file_id_from_vertex_ai_batch_response
Gets the output file id from the Vertex AI Batch response
litellm/llms/vertex_ai/batches/transformation.py:121
↓ 11 callers
Function
_get_projected_spend_over_limit
(current_spend: float, soft_budget_limit: Optional[float])
litellm/proxy/utils.py:5592
↓ 11 callers
Method
_handle_logging_proxy_only_error
Handle logging for proxy only errors by calling `litellm_logging_obj.async_failure_handler` Is triggered when self._is_proxy_only_er
litellm/proxy/utils.py:2134
↓ 11 callers
Method
_handle_model_invocation_job_status
Handle ``GetModelInvocationJob`` status check for AWS Bedrock bulk batch inference jobs (the ARN type returned by ``CreateModelInvoca
litellm/llms/bedrock/batches/handler.py:163
↓ 11 callers
Function
_init_custom_logger_compatible_class
Initialize a custom logger compatible class
litellm/litellm_core_utils/litellm_logging.py:3500
↓ 11 callers
Function
_legacy_ct
Produce a legacy (nacl) ciphertext with the AES gate off.
tests/test_litellm/proxy/management_endpoints/test_credential_migration.py:30
↓ 11 callers
Method
_litellm_params
(self)
tests/test_litellm/llms/bedrock/files/test_bedrock_files_transformation.py:1187
↓ 11 callers
Function
_make_audit_log
( action: str = "created", table_name: LitellmTableNames = LitellmTableNames.TEAM_TABLE_NAME, )
tests/test_litellm/proxy/management_helpers/test_audit_log_callbacks.py:35
↓ 11 callers
Function
_make_chunk
( *, content: str = "", usage: Usage = None, finish_reason: str = None, custom_llm_provide
tests/test_litellm/litellm_core_utils/test_streaming_chunk_builder_cursor.py:38
↓ 11 callers
Function
_make_dep
(dep_id: str, weight: Optional[int] = None)
tests/test_litellm/test_router_weighted_failover.py:25
↓ 11 callers
Function
_make_guardrail
()
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_bedrock_guardrails.py:1953
↓ 11 callers
Function
_make_module_with_source
(tmp_path, src: str, name: str)
tests/llm_translation/test_vcr_classification.py:281
↓ 11 callers
Function
_make_prisma
Return a mock prisma_client with litellm_tooltable.upsert, find_many, find_unique.
tests/test_litellm/proxy/db/test_tool_registry_writer.py:55
↓ 11 callers
Method
_make_proxy_logging
(self, mock_hook)
tests/test_litellm/llms/bedrock/passthrough/guardrail_translation/test_handler.py:777
↓ 11 callers
Function
_make_request
Minimal fake Starlette Request.
tests/test_litellm/proxy/test_dynamic_mcp_route.py:43
↓ 11 callers
Function
_make_router_mock
(enable_tag_filtering=True, match_any=True)
tests/test_litellm/router_strategy/test_router_tag_regex_routing.py:111
↓ 11 callers
Function
_merge_query_params_into_data
For GET/DELETE endpoints that cannot carry a JSON body, read a JSON-encoded ``litellm_params_template`` query parameter and merge its con
litellm/proxy/google_endpoints/agents_endpoints.py:72
↓ 11 callers
Method
_model_has_route_prefix
Whether a route prefix (e.g. ``mantle/``) appears as a leading path segment. A route token is only valid at the start of the model id or imme
litellm/llms/bedrock/common_utils.py:1012
↓ 11 callers
Function
_models
Distinct body.model values, mirroring how the rate limiter collects the models from a streamed batch file before the access check.
tests/test_litellm/proxy/hooks/test_batch_file_validation.py:18
↓ 11 callers
Method
_parse_s3_uri
Parse S3 URI to extract bucket name and object key. Args: s3_uri: S3 URI (e.g., "s3://bucket-name/path/to/file")
litellm/llms/bedrock/files/handler.py:41
↓ 11 callers
Method
_pre_call_checks
Filter out model in model group, if: - model context window < message length. For azure openai models, requires 'base_model' is set.
litellm/router.py:9727
↓ 11 callers
Function
_premium_user_check
Raises an HTTPException if the user is not a premium user
litellm/proxy/utils.py:5803
↓ 11 callers
Function
_prepare_mcp_server_data
Helper function to prepare MCP server data for database operations. Handles JSON field serialization for mcp_info and env fields. Args:
litellm/proxy/_experimental/mcp_server/db.py:185
↓ 11 callers
Function
_redact_sensitive_litellm_params
Replace credential-bearing values in ``litellm_params`` with ``REDACTED_BY_LITELM`` while preserving non-secret keys (``api_base``, ``reg
litellm/proxy/vector_store_endpoints/management_endpoints.py:74
↓ 11 callers
Function
_resolve_advisor_credentials
Resolve the (api_key, api_base) override for the advisor sub-call. A caller-supplied ``api_base`` is only honored alongside a caller-supplied
litellm/llms/anthropic/experimental_pass_through/messages/interceptors/advisor.py:182
↓ 11 callers
Function
_resolve_model_from_preferences
Resolve an LLM model name from MCP ModelPreferences. Strategy: 1. Check hints for substring matches against known model names. 2. Fal
litellm/proxy/_experimental/mcp_server/sampling_handler.py:49
↓ 11 callers
Function
_rpc
(result: dict, request_id: str = "1")
tests/test_litellm/proxy/a2a/test_version_convert.py:21
↓ 11 callers
Function
_run
(coro)
tests/llm_translation/test_openai_record_replay_proxy.py:45
↓ 11 callers
Function
_run
(coro)
tests/test_litellm/llms/vertex_ai/batches/test_handler.py:95
↓ 11 callers
Function
_safe_body_matcher
Compare request bodies as bytes; never invokes ``json.loads``. vcrpy's stock ``body`` matcher unconditionally json-decodes ``application/json
tests/_vcr_conftest_common.py:689
↓ 11 callers
Function
_sample_cassette_dict
()
tests/llm_translation/test_vcr_redis_persister.py:31
↓ 11 callers
Method
_should_skip_batch_input_file_processing
Skip downloading batch input files when the operator disabled batch input-file rate limiting, when the batch runs entirely on a skip-
litellm/proxy/hooks/batch_rate_limiter.py:220
↓ 11 callers
Method
_strip_markdown_json
Strip markdown code block wrapper from JSON content if present. SAP GenAI Hub with Anthropic models sometimes returns JSON wrapped in
litellm/llms/sap/chat/transformation.py:418
↓ 11 callers
Function
_sync_client
A sync Azure client (passes ``isinstance(.., AzureOpenAI)``).
tests/test_litellm/llms/azure/batches/test_handler.py:78
↓ 11 callers
Function
_transform
(model, params, litellm_params=None)
tests/test_litellm/llms/anthropic/experimental_pass_through/messages/test_anthropic_messages_effort.py:24
↓ 11 callers
Method
_transform_messages_helper
Strip fields not permitted by FireworksAI from messages.
litellm/llms/fireworks_ai/chat/transformation.py:260
↓ 11 callers
Method
_transform_response
Transforms the response from the Bedrock embedding provider to the OpenAI format.
litellm/llms/bedrock/embed/embedding.py:149
↓ 11 callers
Function
_update_request_data_with_model_routing_hint
( data: Dict, request: Request, llm_router: Optional["Router"] = None, user_api_key_dict: Opti
litellm/proxy/vector_store_files_endpoints/endpoints.py:217
↓ 11 callers
Function
_validate_team_member_add_permissions
Validate if user has permission to add members to the team. Standard users can self-join an *available team*, but the bypass must not be allo
litellm/proxy/management_endpoints/team_endpoints.py:2067
↓ 11 callers
Function
_validate_token_response
Raise HTTPException 403 if any validation rule doesn't match the token response. Supports dot-notation for nested fields (e.g. ``"team.enterprise
litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py:190
↓ 11 callers
Method
acompletion
( self, model: str, messages: list, api_base: str, custom_prompt_dict:
litellm/llms/custom_llm.py:91
↓ 11 callers
Method
analyze_text
Send text to the Presidio analyzer endpoint and get analysis results
litellm/proxy/guardrails/guardrail_hooks/presidio.py:262
↓ 11 callers
Method
apply_client_tag_policy_pre_auth
Merge ``x-litellm-tags`` header tags into ``request_data`` BEFORE auth budget gates run, so ``_tag_max_budget_check`` (which only
litellm/proxy/litellm_pre_call_utils.py:1194
↓ 11 callers
Function
assert_same_origin
Verify ``candidate_url`` shares scheme, host, and port with ``expected_url``. Use when an upstream API returns a URL meant for follow-up requests
litellm/litellm_core_utils/url_utils.py:315
↓ 11 callers
Method
async_upload_data_to_s3
(self, batch_logging_element: s3BatchLoggingElement)
litellm/integrations/s3_v2.py:279
↓ 11 callers
Method
async_write_secret
Async function to write a secret to AWS Secrets Manager Args: secret_name: Name of the secret secret_value:
litellm/secret_managers/aws_secret_manager_v2.py:243
↓ 11 callers
Function
byok_token
Exchange an authorization code for a short-lived BYOK session JWT. 1. Validates the authorization code and PKCE challenge. 2. Stores the
litellm/proxy/_experimental/mcp_server/byok_oauth_endpoints.py:763
↓ 11 callers
Function
c
(t)
litellm/proxy/_experimental/out/_next/static/chunks/0ys10755n8os_.js:1
↓ 11 callers
Function
clearTokenCookies
()
ui/litellm-dashboard/src/utils/cookieUtils.ts:27
↓ 11 callers
Function
create_mock_router
Helper function to create a mock router with fallback configurations.
tests/test_litellm/proxy/auth/test_model_checks_fallbacks.py:5
↓ 11 callers
Function
d
(e,t,l)
litellm/proxy/_experimental/out/_next/static/chunks/035i-tbvd3z7s.js:10
↓ 11 callers
Function
decrypt_callback_vars
Return a deep copy of metadata with callback_vars values decrypted. Legacy plaintext rows pass through unchanged (decrypt failure → original).
litellm/proxy/common_utils/callback_utils.py:591
↓ 11 callers
Function
decrypt_global_env_var_values
Decrypt ``scope="global"`` env var values in place after reading the DB. Accepts ``MCPEnvVar`` models (``LiteLLM_MCPServerTable``) or plain dicts
litellm/proxy/_experimental/mcp_server/db.py:72
↓ 11 callers
Function
e5
()
litellm/proxy/_experimental/out/_next/static/chunks/1339tsypbt0.4.js:1
↓ 11 callers
Function
e5
()
litellm/proxy/_experimental/out/_next/static/chunks/077lpxhql0wyy.js:1
↓ 11 callers
Function
e6
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 11 callers
Function
eA
(e)
litellm/proxy/_experimental/out/_next/static/chunks/11ibt3khr2hk3.js:1
↓ 11 callers
Function
eo
()
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 11 callers
Function
es
(t)
litellm/proxy/_experimental/out/_next/static/chunks/03~yq9q893hmn.js:1
↓ 11 callers
Method
exchange_token
Exchange *subject_token* for a scoped access token. Returns the exchanged ``access_token`` string (suitable for a ``Bearer`` header).
litellm/proxy/_experimental/mcp_server/auth/token_exchange.py:69
↓ 11 callers
Function
ez
(e)
litellm/proxy/_experimental/out/_next/static/chunks/11ibt3khr2hk3.js:1
↓ 11 callers
Function
factory
()
tests/test_litellm/llms/custom_httpx/test_aiohttp_transport.py:396
↓ 11 callers
Method
filter_analyze_results_by_score
Drop detections that fall below configured per-entity score thresholds or match an entity type in the deny list.
litellm/proxy/guardrails/guardrail_hooks/presidio.py:518
↓ 11 callers
Method
find_and_validate_specific_team_id
Find and validate specific team ID from team_id_jwt_field or team_alias_jwt_field
litellm/proxy/auth/handle_jwt.py:1189
↓ 11 callers
Method
flush
()
litellm/proxy/_experimental/out/_next/static/chunks/0piozaeodiue..js:4
↓ 11 callers
Function
function_setup
( original_function: str, rules_obj, start_time, *args, **kwargs )
litellm/utils.py:730
↓ 11 callers
Method
get_agent_by_id
Get an agent by its ID from the database
litellm/proxy/agent_endpoints/agent_registry.py:391
↓ 11 callers
Method
get_aws_region_name_for_non_llm_api_calls
Get the AWS region name for non-llm api calls. LLM API calls check the model arn and end up using that as the region name.
litellm/llms/bedrock/base_aws_llm.py:642
↓ 11 callers
Function
get_azure_ad_token_provider
Get Azure AD token provider based on Service Principal with Secret workflow. Based on: https://github.com/openai/openai-python/blob/main/exa
litellm/secret_managers/get_azure_ad_token_provider.py:34
↓ 11 callers
Method
get_base_model
(model: str)
litellm/llms/xai/common_utils.py:67
↓ 11 callers
Function
get_base_prompt_id
Extract the base prompt ID by stripping the version suffix if present. Args: prompt_id: Prompt ID that may include version suffix (e
litellm/proxy/prompts/prompt_endpoints.py:39
↓ 11 callers
Method
get_bedrock_invoke_provider
Helper function to get the bedrock provider from the model handles 4 scenarios: 1. model=invoke/anthropic.claude-3-5-sonnet-
litellm/llms/bedrock/chat/invoke_transformations/base_invoke_transformation.py:528
↓ 11 callers
Method
get_complete_url
Get the complete A2A agent endpoint URL. A2A agents use JSON-RPC 2.0 at the base URL, not specific paths. The method (messag
litellm/llms/a2a/chat/transformation.py:156
↓ 11 callers
Function
get_custom_llm_provider_from_request_body
Get the `custom_llm_provider` from the request body Safely reads the request body
litellm/proxy/common_utils/openai_endpoint_utils.py:52
↓ 11 callers
Function
get_custom_provider_from_data
(data: Dict[str, Any])
litellm/proxy/video_endpoints/utils.py:16
↓ 11 callers
Function
get_daily_activity
Common function to get daily activity for any entity type. ``resolve_entity_metadata`` lets a caller resolve entity metadata from the rows ac
litellm/proxy/management_endpoints/common_daily_activity.py:763
↓ 11 callers
Method
get_file_content
Fetch the content of a file from the GitLab repository at the given ref (tag, branch, or commit SHA). If `ref` is None, uses self.ref
litellm/integrations/gitlab/gitlab_client.py:111
↓ 11 callers
Function
get_key_object
- Check if team id in proxy Team Table - if valid, return LiteLLM_TeamTable object with defined limits - if not, then raise an error
litellm/proxy/auth/auth_checks.py:2417
↓ 11 callers
Method
get_model_names
Returns all possible model names for the router, including models defined via model_group_alias. If a team_id is provided, only depl
litellm/router.py:9278
← previous
next →
1,501–1,600 of 71,069, ranked by callers