MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions71,069 in github.com/BerriAI/litellm

↓ 13 callersFunctionisProxyAdminRole
(role: string)
ui/litellm-dashboard/src/utils/roles.ts:22
↓ 13 callersMethodis_async_callable
Fast, cached check for whether a callback is an async function. Falls back gracefully if the object cannot be weak-referenced or cached.
litellm/litellm_core_utils/coroutine_checker.py:21
↓ 13 callersMethodlog_pre_api_call
(self, model, messages, kwargs)
tests/local_testing/test_custom_logger.py:42
↓ 13 callersFunctionmake_tool_call_dict
Create a tool call dict matching the ChatCompletionMessageToolCall schema.
tests/test_litellm/integrations/rubrik_test_helpers.py:8
↓ 13 callersFunctionmatch_capability_generalizations
Return the union of the ``model_info`` of every capability rule matching ``model``. Later rules override earlier ones on key conflicts. Returns `
litellm/litellm_core_utils/fallback_generalizations.py:206
↓ 13 callersFunctionmock_generator
()
tests/test_litellm/proxy/test_litellm_pre_call_utils.py:2369
↓ 13 callersMethodmodel_response_creator
(self, chunk: Optional[dict] = None, hidden_params: Optional[dict] = None)
litellm/litellm_core_utils/streaming_handler.py:668
↓ 13 callersFunctionn
()
litellm/proxy/_experimental/out/_next/static/chunks/0ys10755n8os_.js:1
↓ 13 callersFunctionnj
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 13 callersFunctionnormalize_reasoning_effort_value
Normalize a reasoning effort value based on model capabilities. Degradation chains: - "max" → max / xhigh / high - "xhigh" → x
litellm/llms/anthropic/experimental_pass_through/utils.py:13
↓ 13 callersFunctionprepare_data_with_credentials
Update data dictionary with model credentials (in-place). Args: data: Data dictionary to update credentials: Credentials fro
litellm/proxy/openai_files_endpoints/common_utils.py:376
↓ 13 callersFunctionprocess_embed_content_response
Process Gemini embedContent response (single embedding for multimodal input). Args: input: Original input model_response: Em
litellm/llms/vertex_ai/gemini_embeddings/batch_embed_content_transformation.py:403
↓ 13 callersFunctionra
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 13 callersFunctionregister_client
(request: Request, mcp_server_name: Optional[str] = None)
litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py:1556
↓ 13 callersFunctionreturn_raw_request
Return the json str of the request This is currently in BETA, and tested for `/chat/completions` -> `litellm.completion` calls.
litellm/utils.py:9245
↓ 13 callersFunctionrule
(name, limit)
tests/test_litellm/test_ruff_strict_gate.py:14
↓ 13 callersFunctions
litellm/proxy/_experimental/out/_next/static/chunks/0.1o3m2oaq6je.js:1
↓ 13 callersMethodsafe_get_vertex_ai_credentials
Safely get Vertex AI credentials without mutating the litellm_params dict. Unlike get_vertex_ai_credentials(), this does NOT pop val
litellm/llms/vertex_ai/vertex_llm_base.py:1171
↓ 13 callersFunctionsanitize_oci_schema
Recursively remove OCI-incompatible fields from a JSON schema. Strips ``title`` keys, removes ``None``-valued ``default`` entries, normalises
litellm/llms/oci/common_utils.py:474
↓ 13 callersMethodsend
(self, event: BaseModel)
tests/e2e/realtime/realtime_client.py:253
↓ 13 callersMethodset
(self, *args, **kwargs)
tests/llm_translation/test_vcr_redis_persister.py:149
↓ 13 callersMethodset_cache
(self, key, value, **kwargs)
litellm/caching/in_memory_cache.py:154
↓ 13 callersMethodstart
()
litellm/proxy/_experimental/out/_next/static/chunks/0piozaeodiue..js:4
↓ 13 callersFunctionstripHash
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 13 callersFunctionsupports_response_schema
Check if the given model + provider supports 'response_schema' as a param. Parameters: model (str): The model name to be checked. cu
litellm/utils.py:2238
↓ 13 callersMethodtransform_image_edit_response
(self, *args, **kwargs)
tests/test_litellm/images/test_image_edit_utils.py:41
↓ 13 callersMethodtransform_user_api_key_dict_to_metadata
Transform user_api_key_dict to a metadata dict with prefixed keys. Converts keys like 'user_id' to 'user_api_key_user_id' to clearly
litellm/llms/base_llm/guardrail_translation/base_translation.py:16
↓ 13 callersMethodtry_short_circuit_search
Short-circuit web-search-only requests by executing the search directly. Claude Code sends web search as a separate, standalone /v1/
litellm/integrations/websearch_interception/handler.py:88
↓ 13 callersMethodupdate_settings
Update the router settings.
litellm/router.py:9603
↓ 13 callersFunctionusePath
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 13 callersMethodvalidate_anthropic_messages_environment
( self, headers: dict, model: str, messages: list[Any], optional_param
litellm/llms/tencent/messages/transformation.py:46
↓ 13 callersFunctionvisitor_visit
(s,o,{keyMap:i=Ku,...a}={})
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 13 callersFunctionx
(e,t,r)
litellm/proxy/_experimental/out/_next/static/chunks/0e9hs7onyj28m.js:1
↓ 12 callersFunctionEt
(t)
litellm/proxy/_experimental/out/_next/static/chunks/03~yq9q893hmn.js:1
↓ 12 callersFunctionG
(s,o,i)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 12 callersFunctionWr
(t)
litellm/proxy/_experimental/out/_next/static/chunks/03~yq9q893hmn.js:1
↓ 12 callersFunctionZ
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 12 callersFunction_attr
(span, key)
tests/test_litellm/integrations/test_otel_guardrail_violation_spans.py:180
↓ 12 callersMethod_base_kwargs
Return minimal kwargs for set_attributes with Responses API defaults.
tests/test_litellm/integrations/test_opentelemetry.py:3753
↓ 12 callersFunction_before_record_request
Fingerprint API keys, scrub them, and normalize multipart boundaries. Order matters in two ways: 1. vcrpy's ``filter_headers`` config option
tests/_vcr_conftest_common.py:930
↓ 12 callersMethod_build_config
( providers: List[Dict], env_vars: Dict[str, str], master_key: str, )
litellm/setup_wizard.py:490
↓ 12 callersMethod_build_kwargs
(self, *, exception: bool = False)
tests/test_litellm/integrations/test_opentelemetry.py:4619
↓ 12 callersFunction_build_oauth_protected_resource_response
Build OAuth protected resource response with the appropriate URL pattern. For pass-through MCP servers (``MCPServer.is_oauth_passthrough``),
litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py:1207
↓ 12 callersFunction_byte_items_sent
Return every byteItem payload (file scans) submitted to Model Armor.
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_model_armor.py:1885
↓ 12 callersMethod_call
(self, request_body)
tests/test_litellm/proxy/auth/test_auth_checks.py:2793
↓ 12 callersFunction_check_vector_store_access
Check if the user has access to the vector store. Delegates to :func:`can_user_access_vector_store`, which honors: - PROXY_ADMIN bypass
litellm/proxy/vector_store_endpoints/management_endpoints.py:370
↓ 12 callersFunction_collect_async
(chunks: List[str])
tests/test_litellm/llms/oci/chat/test_oci_sse_splitter.py:24
↓ 12 callersFunction_collect_calls
Helper: return dict[attr_name] = value of all set_attribute calls.
tests/test_litellm/integrations/arize/test_arize_utils.py:475
↓ 12 callersFunction_collect_sync
(stream: Iterator[str])
tests/test_litellm/llms/oci/chat/test_oci_sse_splitter.py:20
↓ 12 callersFunction_compile
(code: str)
tests/test_litellm/proxy/guardrails/test_custom_code_security.py:30
↓ 12 callersMethod_construct_url
Construct Azure realtime WebSocket URL. Args: api_base: Azure API base URL (will be converted from https:// to wss://)
litellm/llms/azure/realtime/handler.py:33
↓ 12 callersFunction_content_filter
Instantiate ContentFilterGuardrail with a given category.
litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/guardrail_benchmarks/test_eval.py:243
↓ 12 callersMethod_convert_cached_result_to_model_response
Internal method to process the cached result Checks the call type and converts the cached result to the appropriate model response o
litellm/caching/caching_handler.py:738
↓ 12 callersMethod_decrypt_db_variables
Decrypts a dictionary of variables and returns them.
litellm/proxy/proxy_server.py:5195
↓ 12 callersMethod_enforce_batch_file_model_access
Reject the batch if the caller is not authorized for the upload target. For managed files, ``target_model_names`` (from the unified file id)
litellm/proxy/hooks/batch_rate_limiter.py:611
↓ 12 callersMethod_execute_agentic_loop
Legacy path: execute search + build patch + run follow-up call.
litellm/integrations/websearch_interception/handler.py:859
↓ 12 callersFunction_function_call_item
(call_id="c1", name=LITELLM_CODE_EXECUTION_TOOL_NAME)
tests/test_litellm/integrations/code_interpreter_interception/test_handler.py:68
↓ 12 callersMethod_get_allowed_mcp_servers_for_team
Get allowed MCP servers for a team. Unions two sources: - Legacy team.object_permission (mcp_servers, mcp_access_groups,
litellm/proxy/_experimental/mcp_server/auth/user_api_key_auth_mcp.py:993
↓ 12 callersMethod_get_azure_config
Get Azure config based on model type. When *base_model* is provided (e.g. ``"azure/gpt-5.2"``), it is used for model-type detection i
litellm/utils.py:7742
↓ 12 callersMethod_get_cli_state
Checks the request 'source' if a cli state token was passed in This is used to authenticate through the CLI login flow. The
litellm/proxy/management_endpoints/ui_sso.py:2924
↓ 12 callersMethod_get_key_access_group_mcp_server_extras
Resolve the key's unified `access_group_ids` (LiteLLM_AccessGroupTable) to MCP server IDs as additive grants: a group attached to the
litellm/proxy/_experimental/mcp_server/auth/user_api_key_auth_mcp.py:883
↓ 12 callersFunction_get_rsa_key_and_jwk
(kid: str)
tests/test_litellm/proxy/auth/test_handle_jwt.py:3640
↓ 12 callersMethod_get_span_name
(self, kwargs)
litellm/integrations/opentelemetry.py:2664
↓ 12 callersMethod_get_token_and_url_context_caching
Internal function. Returns the token and url for the call. Handles logic if it's google ai studio vs. vertex ai. Returns
litellm/llms/vertex_ai/context_caching/vertex_ai_context_caching.py:44
↓ 12 callersMethod_get_valid_client_session
Helper to get a valid ClientSession for the current event loop. This handles the case where the session was created in a different
litellm/llms/custom_httpx/aiohttp_transport.py:171
↓ 12 callersFunction_get_vertex_url
( mode: all_gemini_url_modes, model: str, stream: Optional[bool], vertex_project: Optional[str
litellm/llms/vertex_ai/common_utils.py:374
↓ 12 callersFunction_get_web_search_requests
Tolerantly read ``web_search_requests`` from a ``server_tool_use`` value that may be ``None``, a ``dict``, a ``ServerToolUse`` pydantic insta
litellm/litellm_core_utils/llm_cost_calc/utils.py:51
↓ 12 callersMethod_handle_authentication_error
Handles Connection Errors when reading a Virtual Key from LiteLLM DB Use this if you don't want failed DB queries to block LLM API re
litellm/proxy/auth/auth_exception_handler.py:38
↓ 12 callersMethod_init_litellm_callbacks
(self, llm_router: Optional[Router] = None)
litellm/proxy/utils.py:565
↓ 12 callersMethod_init_pyroscope
Optional continuous profiling via Grafana Pyroscope. Off by default. Enable with LITELLM_ENABLE_PYROSCOPE=true. Requires: pi
litellm/proxy/proxy_server.py:8013
↓ 12 callersFunction_invoke
Run invoke_agent_a2a with standard patches applied.
tests/test_litellm/proxy/agent_endpoints/test_agent_headers.py:101
↓ 12 callersMethod_is_already_running_as_role
Check if the current environment is already running as the target IAM role. This handles multiple AWS environments: - IRSA (
litellm/llms/bedrock/base_aws_llm.py:709
↓ 12 callersFunction_is_multimodal_input
Check if the input contains multimodal data (data URIs, file references, GCS URLs, or nested lists for combined embeddings). Args:
litellm/llms/vertex_ai/gemini_embeddings/batch_embed_content_transformation.py:127
↓ 12 callersMethod_is_permission_error
Check if the error message indicates a database permission error. Permission errors should NOT be marked as applied, as the migratio
litellm-proxy-extras/litellm_proxy_extras/utils.py:211
↓ 12 callersMethod_keyword_override
Find a deployment whose declared keywords appear in `user_message`. Returns (model_name, matched_keyword) or None when no keyword ma
litellm/router_strategy/quality_router/quality_router.py:228
↓ 12 callersFunction_litellm_fine_tuning_job_from_response
(response: Any, is_azure: bool = False)
litellm/llms/openai/fine_tuning/handler.py:49
↓ 12 callersFunction_lookup_deprecated_key
Check if a token exists in the deprecated keys table and is still within its grace period. Returns the active_token_id if found and valid, o
litellm/proxy/utils.py:2658
↓ 12 callersMethod_make
(env=None, config_value=None, message_logging=True)
tests/test_litellm/integrations/test_opentelemetry.py:661
↓ 12 callersFunction_make_invite
( *, is_accepted: bool, expired: bool = False, claimed: bool = False )
tests/test_litellm/proxy/auth/test_onboarding.py:37
↓ 12 callersFunction_make_mock_agent
( static_headers=None, extra_headers=None, url="http://backend-agent:10001", )
tests/test_litellm/proxy/agent_endpoints/test_agent_headers.py:22
↓ 12 callersFunction_make_mock_request
Build a mock FastAPI Request with configurable headers.
tests/test_litellm/proxy/agent_endpoints/test_agent_headers.py:36
↓ 12 callersFunction_make_model_call_details
Build a model_call_details dict that mimics real proxy/SDK flows.
tests/test_litellm/litellm_core_utils/test_redact_messages.py:30
↓ 12 callersMethod_make_pr
( self, *, number: int = 1, created_days_ago: int = 10, is_draft: bool
tests/test_litellm/test_github_close_low_quality_prs.py:121
↓ 12 callersFunction_make_server
(**kwargs)
tests/mcp_tests/test_per_user_oauth_cache.py:43
↓ 12 callersMethod_make_server
(auth_type, delegate_auth_to_upstream=False)
tests/test_litellm/proxy/_experimental/mcp_server/auth/test_user_api_key_auth_mcp.py:1707
↓ 12 callersMethod_map_size_to_aspect_ratio
Map OpenAI size format to OpenRouter aspect_ratio format. Uses the same mapping as image generation since OpenRouter handles
litellm/llms/openrouter/image_edit/transformation.py:268
↓ 12 callersFunction_mock_response
()
tests/test_litellm/llms/parallel_ai/test_parallel_ai_search.py:36
↓ 12 callersFunction_ovalix_env
()
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_ovalix.py:59
↓ 12 callersFunction_patch_validation_helpers
Stub out the DB helpers resolve_and_validate_end_user_id delegates to.
tests/test_litellm/proxy/auth/test_auth_checks.py:3428
↓ 12 callersFunction_payload
(**overrides)
tests/test_litellm/integrations/otel/test_otel_v2_logger.py:64
↓ 12 callersMethod_post_call_image_processing
(response: httpx.Response, image_url: str = "")
litellm/litellm_core_utils/prompt_templates/factory.py:3401
↓ 12 callersFunction_reject_url_valued_destinations
Reject URL-valued ``model``/``file_id`` unless admin-allowlisted. Some providers (HuggingFace, Oobabooga, Gemini files) accept a URL in the i
litellm/proxy/litellm_pre_call_utils.py:215
↓ 12 callersFunction_resolve_credential_from_model_config
Walk the precedence chain and return the first matching credential name. Checks (in order): 1. project_model_config[model_name][provider
litellm/proxy/litellm_pre_call_utils.py:1975
↓ 12 callersMethod_run
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0nnx~7-7e5t~1.js:1
↓ 12 callersMethod_run_deferred_stream_guardrails
Run non-streaming post-call guardrail hooks on an assembled streaming response, then fire success logging via ``dispatch_success_hand
litellm/proxy/common_request_processing.py:2163
↓ 12 callersFunction_sample_payload
(**overrides)
tests/test_litellm/integrations/otel/test_otel_v2_sources_of_truth.py:40
↓ 12 callersFunction_search_request
Engine/app-mode search request (vertex_engine_id set).
tests/test_litellm/llms/vertex_ai/test_vertex_ai_search_vector_store_transformation.py:145
↓ 12 callersMethod_should_raise_guardrail_blocked_exception
Only raise exception for "BLOCKED" actions, not for "ANONYMIZED" actions. If `self.mask_request_content` or `self.mask_response_cont
litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py:1060
↓ 12 callersMethod_strip_base64_from_messages
Removes or redacts base64-encoded file data (e.g., PDFs, images, audio) from messages and responses before sending to SQS. B
litellm/integrations/custom_logger.py:946
↓ 12 callersMethod_strip_sse_data_from_chunk
Strips the 'data: ' prefix from Server-Sent Events (SSE) chunks. Some providers like sagemaker send it as `data:`, need to handle bo
litellm/litellm_core_utils/streaming_handler.py:2191
← previousnext →1,301–1,400 of 71,069, ranked by callers