MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions68,180 in github.com/BerriAI/litellm

↓ 10 callersFunction_convert_single_content
Convert a single MCP content item to OpenAI format. For text/image/audio content, returns a single content-part dict. For tool_use/tool_resul
litellm/proxy/_experimental/mcp_server/sampling_handler.py:284
↓ 10 callersFunction_db_health_readiness_check
()
litellm/proxy/health_endpoints/_health_endpoints.py:1277
↓ 10 callersMethod_decode_container_id
Decode a managed container ID to extract provider, model, and original container ID. Returns: DecodedResponseId with custom_llm_p
litellm/responses/utils.py:519
↓ 10 callersFunction_encode_rsa_jwt
( private_key, issuer: str, audience: str, kid: str, extra_claims: Optional[dict] = None,
tests/proxy_unit_tests/test_jwt.py:1616
↓ 10 callersFunction_encode_rsa_jwt
( private_key, issuer: str, audience: str, kid: str, extra_claims: Optional[dict] = None,
tests/test_litellm/proxy/auth/test_handle_jwt.py:3656
↓ 10 callersMethod_estimate_tokens_for_request
Estimate total tokens this request will consume so we can reserve them upfront (input + output budget): estimated = input_tok
litellm/proxy/hooks/parallel_request_limiter_v3.py:370
↓ 10 callersMethod_execute_tool_calls
Execute tool calls and return results.
litellm/responses/mcp/litellm_proxy_mcp_handler.py:590
↓ 10 callersFunction_extract_error_from_sse_chunk
Extract error dictionary from SSE format chunk. Args: event_line: SSE format event line, e.g. "data: {"error": {...}}\n\n" Retu
litellm/proxy/common_request_processing.py:253
↓ 10 callersMethod_extract_output_messages
Convert the output items in a ``response.completed`` event into Responses API message dicts suitable for the next turn's ``input``.
litellm/responses/streaming_iterator.py:1761
↓ 10 callersMethod_fetch_oauth_metadata_from_resource
( self, resource_metadata_url: str, server_url: str )
litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:2416
↓ 10 callersFunction_function_call_item
(call_id="c1", name=LITELLM_CODE_EXECUTION_TOOL_NAME)
tests/test_litellm/integrations/code_interpreter_interception/test_handler.py:67
↓ 10 callersMethod_get_exception_class_name
(exception: Exception)
litellm/integrations/prometheus.py:2588
↓ 10 callersMethod_get_mcp_servers_from_access_groups
Resolve MCP access groups to server IDs by querying BOTH the MCP server table (DB) AND config-loaded servers
litellm/proxy/_experimental/mcp_server/auth/user_api_key_auth_mcp.py:1390
↓ 10 callersMethod_get_metric
Helper function to get a metric from the registry by name.
litellm/integrations/prometheus_services.py:112
↓ 10 callersMethod_get_openai_compatible_batch_metadata
OpenAI Batch metadata only accepts string values.
litellm/llms/bedrock/batches/transformation.py:261
↓ 10 callersMethod_get_request_body
Get the request body for the Bedrock Image Generation API Checks the model/provider and transforms the request body accordingly
litellm/llms/bedrock/image_generation/image_handler.py:282
↓ 10 callersMethod_get_routed_model
Get the model this session should be routed to, if any.
litellm/proxy/hooks/sensitive_data_routing.py:80
↓ 10 callersMethod_get_routing_context
Resolves the routing strategy and selector to use for the given model. Every model belongs to exactly one group: an explicit entry f
litellm/router.py:962
↓ 10 callersFunction_get_rsa_key_and_jwk
(kid: str)
tests/proxy_unit_tests/test_jwt.py:1602
↓ 10 callersMethod_get_span_context
(self, kwargs, default_span: Optional[Span] = None)
litellm/integrations/opentelemetry.py:2695
↓ 10 callersMethod_get_tools_by_names
Get tools from available_tools by their names, preserving the semantic router's ordering. Matching is tolerant of client-sid
litellm/proxy/_experimental/mcp_server/semantic_tool_filter.py:247
↓ 10 callersMethod_get_trace_context
Get the New Relic trace ID for AI monitoring events. This integration runs in LiteLLM's async logging worker, outside the Ne
litellm/integrations/newrelic/newrelic.py:247
↓ 10 callersMethod_handle_failure
(self, kwargs, response_obj, start_time, end_time)
litellm/integrations/opentelemetry.py:1849
↓ 10 callersMethod_handle_logging_anthropic_collected_chunks
Takes raw chunks from Anthropic passthrough endpoint and logs them in litellm callbacks - Builds complete response from chunks
litellm/proxy/pass_through_endpoints/llm_provider_handlers/anthropic_passthrough_logging_handler.py:300
↓ 10 callersFunction_import_validate
Lazy import to avoid pulling orjson at collection time.
tests/mcp_tests/test_per_user_oauth_cache.py:31
↓ 10 callersFunction_install_prisma
(monkeypatch, prisma)
tests/test_litellm/proxy/proxy_server/test_routes_anthropic_beta.py:53
↓ 10 callersMethod_is_nova_2_model
Check if the model is a Nova 2 model that supports reasoningConfig. Nova 2 models use a different reasoning configuration structure
litellm/llms/bedrock/chat/converse_transformation.py:283
↓ 10 callersFunction_kwargs
( *, messages=None, chosen="fast", extra_metadata=None, extra_litellm_params=None, )
tests/test_litellm/router_strategy/adaptive_router/test_hooks.py:52
↓ 10 callersMethod_log_langfuse_v2
( self, user_id: Optional[str], metadata: dict, litellm_params: dict,
litellm/integrations/langfuse/langfuse.py:484
↓ 10 callersFunction_make_async_client
()
tests/test_litellm/interactions/test_agents_http_handler.py:59
↓ 10 callersFunction_make_endpoint_request
(query_string: str = "")
tests/proxy_unit_tests/test_gemini_agents_endpoints.py:152
↓ 10 callersMethod_make_iterator
( self, use_legacy: bool = False )
tests/test_litellm/interactions/test_gemini_interactions_transformation.py:235
↓ 10 callersFunction_make_logging_obj
( model: str = "bedrock/us.anthropic.claude-opus-4-6-v1", )
tests/test_litellm/integrations/websearch_interception/test_websearch_thinking_constraint.py:38
↓ 10 callersFunction_make_managed_files_instance_with_batches
Create a _PROXY_LiteLLMManagedFiles instance with mocked DB and batches. Args: file_id: The unified file ID batches: Lis
tests/test_litellm/enterprise/proxy/test_file_deletion_blocking.py:57
↓ 10 callersFunction_make_mock_request
Create a mock Request for fetch_mcp_server tests (IP used for access control).
tests/test_litellm/proxy/management_endpoints/test_mcp_management_endpoints.py:80
↓ 10 callersFunction_make_request
(parent_otel_span=None)
tests/test_litellm/proxy/proxy_server/test_exception_handlers.py:31
↓ 10 callersMethod_make_request
(self, path: str)
tests/test_litellm/proxy/test_litellm_pre_call_utils.py:62
↓ 10 callersFunction_make_team
(team_id="team-1", organization_id="org-1")
tests/test_litellm/proxy/management_endpoints/test_org_admin_team_access.py:36
↓ 10 callersMethod_make_text_delta
( self, text: str, item_id: str = "item_1" )
tests/test_litellm/interactions/test_gemini_interactions_transformation.py:250
↓ 10 callersFunction_make_tool_calls
()
tests/test_litellm/integrations/websearch_interception/test_websearch_thinking_constraint.py:27
↓ 10 callersFunction_make_unified_file_id
Create a base64-encoded unified file ID.
tests/test_litellm/enterprise/proxy/test_file_deletion_blocking.py:21
↓ 10 callersFunction_make_user_api_key_cache
(get_value=None, get_side_effect=None)
tests/test_litellm/proxy/proxy_server/test_spend_counters.py:69
↓ 10 callersFunction_make_wrappers
()
tests/test_litellm/proxy/db/test_routing_prisma_wrapper.py:21
↓ 10 callersMethod_mask_response_completed
Apply Presidio output masking (apply_to_output=True) to the ``response.completed`` event before it is forwarded to the client.
litellm/responses/streaming_iterator.py:1507
↓ 10 callersMethod_mask_value
(self, value: str)
litellm/litellm_core_utils/sensitive_data_masker.py:44
↓ 10 callersFunction_mcp_response
(content=None, response_cost=0.0)
tests/test_litellm/proxy/guardrails/guardrail_hooks/_cisco_ai_defense_test_utils.py:125
↓ 10 callersMethod_merge
(self, servers)
tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_server.py:4652
↓ 10 callersFunction_mock_pyroscope_module
Return a mock module so 'import pyroscope' succeeds in _init_pyroscope.
tests/test_litellm/proxy/test_pyroscope.py:14
↓ 10 callersFunction_mock_request
()
tests/test_litellm/proxy/vector_store_endpoints/test_vector_store_tenant_guard.py:10
↓ 10 callersFunction_patch_responses_dispatch
Patch everything after the prompt management block so tests stay unit-level.
tests/test_litellm/responses/test_responses_prompt_management.py:49
↓ 10 callersFunction_payload
(**overrides)
tests/test_litellm/integrations/otel/test_otel_v2_logger.py:60
↓ 10 callersFunction_persister_with_fake_redis
()
tests/llm_translation/test_vcr_redis_persister.py:46
↓ 10 callersFunction_process_gemini_media
Given a media URL (image, audio, or video), return the appropriate PartType for Gemini By the way, actually video_metadata can only be used w
litellm/llms/vertex_ai/gemini/transformation.py:476
↓ 10 callersFunction_redact_mcp_credentials
Return a copy of the MCP server object with credentials removed.
litellm/proxy/management_endpoints/mcp_management_endpoints.py:443
↓ 10 callersFunction_refresher
( server=None, body=None, *, post_sink=None, persist_sink=None, clock=lambda: 1000.0 )
tests/test_litellm/proxy/_experimental/mcp_server/outbound_credentials/test_authz_code_refresher.py:51
↓ 10 callersMethod_remove_key
Remove a key from both cache_dict and ttl_dict
litellm/caching/in_memory_cache.py:93
↓ 10 callersFunction_resolve_one
Resolve a single value that may be a passthrough managed ID. Returns the raw provider ID on success. Returns *managed_id* unchanged when
litellm/proxy/pass_through_endpoints/managed_id_rewriter.py:262
↓ 10 callersFunction_restamp_streaming_chunk_model
( *, chunk: Any, requested_model_from_client: str, request_data: dict, model_mismatch_logg
litellm/proxy/proxy_server.py:6637
↓ 10 callersMethod_route_matches_wildcard_pattern
Check if route matches the wildcard pattern eg. pattern: "/scim/v2/*" route: "/scim/v2/Users" - returns: Tr
litellm/proxy/auth/route_checks.py:508
↓ 10 callersFunction_row_to_policy_db_response
Build PolicyDBResponse from a Prisma LiteLLM_PolicyTable row.
litellm/proxy/policy_engine/policy_registry.py:36
↓ 10 callersFunction_run_post_custom_auth_checks
( valid_token: UserAPIKeyAuth, request: Request, request_data: dict, route: str, parent_ot
litellm/proxy/auth/user_api_key_auth.py:2757
↓ 10 callersFunction_sampling_msg
(role: str, content: Any)
tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_sampling_tool_conversion.py:42
↓ 10 callersMethod_send_to_backend
Send a message to the backend WebSocket. If a provider_config is set the message is first passed through transform_realtime_request s
litellm/litellm_core_utils/realtime_streaming.py:323
↓ 10 callersFunction_should_cooldown_deployment
Helper that decides if a deployment should be put in cooldown Returns True if the deployment should be put in cooldown Returns False if
litellm/router_utils/cooldown_handlers.py:151
↓ 10 callersMethod_should_preserve_cache_control_for_endpoint
The generic `openai` provider also reaches OpenAI-compatible endpoints (a LiteLLM proxy, vLLM, an Anthropic-compatible gateway) via a
litellm/llms/openai/chat/gpt_transformation.py:403
↓ 10 callersMethod_transform_responses_api_output_to_otel
Transform Responses API output items into OTEL GenAI 1.38 format. The Responses API returns output as a list of items, each with a
litellm/integrations/opentelemetry.py:2552
↓ 10 callersMethod_unmask_response_event
Apply Presidio PII unmasking to backend events before forwarding to the client. Handles two shapes: - ``response.com
litellm/responses/streaming_iterator.py:1446
↓ 10 callersFunction_upsert_budget_and_membership
Apply a merge-patch of per-member budget fields to a team membership. ``budget_patch`` holds only the budget columns the caller explicitly s
litellm/proxy/management_endpoints/common_utils.py:426
↓ 10 callersFunction_validate_key_alias_format
Validate the format of the key_alias. Gated behind ``litellm.enable_key_alias_format_validation`` (default **False**). When disabled, no
litellm/proxy/management_endpoints/key_management_endpoints.py:6013
↓ 10 callersMethod_verify_langfuse_call
Helper method to verify Langfuse API calls
tests/logging_callback_tests/test_langfuse_e2e_test.py:167
↓ 10 callersFunctiona
()
litellm/proxy/_experimental/out/_next/static/chunks/0_9wsaj_z5w6i.js:8
↓ 10 callersMethodaccept
Accept the WebSocket connection
tests/llm_translation/realtime/base_realtime_tests.py:42
↓ 10 callersMethodadd_deployment
Parameters: - deployment: Deployment - the deployment to be added to the Router Returns: - The added deployment
litellm/router.py:7938
↓ 10 callersFunctionae
(e)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 10 callersFunctionapply_clear_tool_uses_20250919
Apply clear_tool_uses; return (messages, AppliedEdit or None).
litellm/llms/anthropic/experimental_pass_through/context_management/editors/clear_tool_uses.py:138
↓ 10 callersMethodapply_guardrail
Apply Prompt Security guardrail to the given inputs. This method is called by LiteLLM's guardrail framework for ALL endpoints:
litellm/proxy/guardrails/guardrail_hooks/prompt_security/prompt_security.py:68
↓ 10 callersMethodapply_guardrail
Apply the Generic Guardrail API to the given inputs. This is the main method that gets called by the framework. Args:
litellm/proxy/guardrails/guardrail_hooks/generic_guardrail_api/generic_guardrail_api.py:346
↓ 10 callersFunctionar
(t,e)
litellm/proxy/_experimental/out/_next/static/chunks/03~yq9q893hmn.js:1
↓ 10 callersMethodasync_batch_get_cache
(self, keys: list, **kwargs)
litellm/caching/disk_cache.py:70
↓ 10 callersMethodasync_failure_handler
Implementing async callbacks, to handle asyncio event loop issues when custom integrations need to use async functions.
litellm/litellm_core_utils/litellm_logging.py:2882
↓ 10 callersMethodasync_filter_deployments
If the request ``input`` contains litellm-encoded item IDs, decode the embedded ``model_id`` and pin the request to that deployment.
litellm/router_utils/pre_call_checks/encrypted_content_affinity_check.py:208
↓ 10 callersMethodasync_post_call_streaming_iterator_hook
Allow user to modify outgoing streaming data -> Given a whole response iterator. This hook is best used when you need to modify multi
litellm/proxy/utils.py:2494
↓ 10 callersMethodasync_pre_call_deployment_hook
Allow modifying the request just before it's sent to the deployment. Use this instead of 'async_pre_call_hook' when you need to modi
litellm/integrations/custom_logger.py:262
↓ 10 callersMethodasync_pre_call_hook
( self, user_api_key_dict: UserAPIKeyAuth, cache: litellm.DualCache, data: Dic
litellm/proxy/guardrails/guardrail_hooks/lakera_ai_v2.py:194
↓ 10 callersMethodasync_pre_call_hook
Pre-call hook to scan the request for security threats before sending to LLM. Args: user_api_key_dict: User API key auth
litellm/proxy/guardrails/guardrail_hooks/pillar/pillar.py:292
↓ 10 callersMethodasync_pre_mcp_tool_call_hook
Mock pre MCP tool call hook
tests/mcp_tests/test_mcp_guardrails.py:192
↓ 10 callersMethodasync_send_batch
Sends the in memory logs queue to datadog api Logs sent to /api/v2/logs DD Ref: https://docs.datadoghq.com/api/latest/logs/
litellm/integrations/datadog/datadog.py:346
↓ 10 callersMethodasync_service_success_hook
- For counting if the redis, postgres call is successful
litellm/_service_logger.py:150
↓ 10 callersMethodasync_streaming_data_generator
Shared streaming data generator: runs proxy iterator hook, per-chunk hook, cost injection, then yields chunks via serialize_chunk; on
litellm/proxy/common_request_processing.py:2433
↓ 10 callersFunctionasyncify
Take a blocking function and create an async one that receives the same positional and keyword arguments, and that when called, calls the ori
litellm/litellm_core_utils/asyncify.py:21
↓ 10 callersFunctionbold
(t: str)
litellm/setup_wizard.py:146
↓ 10 callersFunctionbuild_effective_auth_contexts
Return auth contexts that reflect the actual teams for UI session tokens.
litellm/proxy/_experimental/mcp_server/ui_session_utils.py:71
↓ 10 callersFunctionbulk_update_team_member_permissions
Append permissions to existing teams. Either pass team_ids to target specific teams, or set apply_to_all_teams=True to update every team
litellm/proxy/management_endpoints/team_endpoints.py:4856
↓ 10 callersFunctionc
(e,t,l)
litellm/proxy/_experimental/out/_next/static/chunks/05btv.l5gro_..js:10
↓ 10 callersFunctioncan_team_access_model
Returns True if the team can access a specific model. 1. First checks native team-level model permissions (current implementation) 2. If
litellm/proxy/auth/auth_checks.py:3116
↓ 10 callersFunctionce
(t)
litellm/proxy/_experimental/out/_next/static/chunks/03~yq9q893hmn.js:1
↓ 10 callersMethodcheck_available_usage
For a given model, get its available tpm Params: - model: str, the name of the model in the router model_list - prio
litellm/proxy/hooks/dynamic_rate_limiter.py:84
↓ 10 callersMethodcheck_eu_ai_act
Check EU AI Act compliance. Returns: List of compliance check results for: - Art. 9: Guardrails applied
litellm/proxy/compliance_checks.py:179
↓ 10 callersMethodcheck_gdpr
Check GDPR compliance. Returns: List of compliance check results for: - Art. 32: Data protection applied (pr
litellm/proxy/compliance_checks.py:195
↓ 10 callersMethodcheck_managed_file_id_access
( self, data: Dict, user_api_key_dict: UserAPIKeyAuth )
enterprise/litellm_enterprise/proxy/hooks/managed_files.py:371
← previousnext →1,601–1,700 of 68,180, ranked by callers