Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/BerriAI/litellm
/ functions
Functions
68,180 in github.com/BerriAI/litellm
⨍
Functions
68,180
◇
Types & classes
10,037
↳
Endpoints
1,734
↓ 13 callers
Function
eO
()
litellm/proxy/_experimental/out/_next/static/chunks/0lb0p7rh5znu_.js:8
↓ 13 callers
Function
eR
(e,t,r,a)
litellm/proxy/_experimental/out/_next/static/chunks/0~0su3wi_7f6-.js:1
↓ 13 callers
Function
eS
()
litellm/proxy/_experimental/out/_next/static/chunks/0~0su3wi_7f6-.js:1
↓ 13 callers
Function
encrypt_callback_vars
Return a deep copy of metadata with callback_vars values encrypted at rest. Idempotent: a value that already decrypts cleanly is left unchanged s
litellm/proxy/common_utils/callback_utils.py:582
↓ 13 callers
Function
endpoint_func
( # type: ignore request: Request, fastapi_response: Response, user_api_k
litellm/proxy/pass_through_endpoints/pass_through_endpoints.py:1513
↓ 13 callers
Method
expand_tool_permissions
Rewrite an ``mcp_tool_permissions`` dict keyed by id/name/alias so every key is a concrete server_id where possible. Tool lists from
litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:3861
↓ 13 callers
Method
extract_response_content
( self, completion_response: dict )
litellm/llms/anthropic/chat/transformation.py:1962
↓ 13 callers
Method
factory_function
Creates appropriate wrapper functions for different API call types. Returns: - A synchronous function for synchronous ca
litellm/router.py:5333
↓ 13 callers
Method
failure_handler
Log failed db read/writes Currently only logs exceptions to sentry
litellm/proxy/utils.py:1930
↓ 13 callers
Function
filter_team_based_models
If a model has a team_id Only use if request is from that team
litellm/router_utils/common_utils.py:47
↓ 13 callers
Function
generate_key_helper_fn
( request_type: Literal["user", "key"], # identifies if this request is from /user/new or /key/generate
litellm/proxy/management_endpoints/key_management_endpoints.py:3354
↓ 13 callers
Function
getModelDisplayName
(model: string)
ui/litellm-dashboard/src/components/key_team_helpers/fetch_available_models_team_key.tsx:38
↓ 13 callers
Method
get_api_base
(api_base: Optional[str] = None)
litellm/llms/anthropic/common_utils.py:678
↓ 13 callers
Method
get_arize_phoenix_config
Retrieves the Arize Phoenix configuration based on environment variables. Returns:
litellm/integrations/arize/arize_phoenix.py:391
↓ 13 callers
Method
get_cache
( self, key: Any, parent_otel_span: Any = None, local_only: bool = False,
litellm/proxy/common_utils/user_api_key_cache.py:41
↓ 13 callers
Method
get_config_model
Returns the config model for the guardrail This is used to render the config model in the UI.
litellm/integrations/custom_guardrail.py:298
↓ 13 callers
Method
get_credentials
( self, custom_llm_provider: str, region_name: Optional[str], )
litellm/proxy/pass_through_endpoints/passthrough_endpoint_router.py:45
↓ 13 callers
Method
get_guardrail_dynamic_request_body_params
Returns `extra_body` to be added to the request body for the Guardrail API call Use this to pass dynamic params to the guardrail API
litellm/integrations/custom_guardrail.py:650
↓ 13 callers
Function
get_mime_type
Determine MIME type from file path extension. Falls back to mimetypes.guess_type, then to 'application/octet-stream'.
litellm/ocr/main.py:453
↓ 13 callers
Method
get_provider_vector_stores_config
v2 vector store config, use this for new vector store integrations
litellm/utils.py:8328
↓ 13 callers
Method
get_request_headers
( self, credentials: Credentials, aws_region_name: str, extra_headers: Optiona
litellm/llms/bedrock/base_aws_llm.py:1360
↓ 13 callers
Method
get_standard_logging_metadata
Clean and filter the metadata dictionary to include only the specified keys in StandardLoggingMetadata. Args: metadata (
litellm/litellm_core_utils/litellm_logging.py:4512
↓ 13 callers
Method
get_user_id
(self, token: dict, default_value: Optional[str])
litellm/proxy/auth/handle_jwt.py:428
↓ 13 callers
Function
isKeyed
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 13 callers
Function
isProxyAdminRole
(role: string)
ui/litellm-dashboard/src/utils/roles.ts:22
↓ 13 callers
Method
is_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 callers
Method
lighten
(e=10)
litellm/proxy/_experimental/out/_next/static/chunks/0.4.bbjx7y007.js:1
↓ 13 callers
Method
log_pre_api_call
(self, model, messages, kwargs)
tests/local_testing/test_custom_logger.py:42
↓ 13 callers
Function
make_tool_call_dict
Create a tool call dict matching the ChatCompletionMessageToolCall schema.
tests/test_litellm/integrations/rubrik_test_helpers.py:8
↓ 13 callers
Function
mock_generator
()
tests/test_litellm/proxy/test_litellm_pre_call_utils.py:2201
↓ 13 callers
Method
model_response_creator
(self, chunk: Optional[dict] = None, hidden_params: Optional[dict] = None)
litellm/litellm_core_utils/streaming_handler.py:668
↓ 13 callers
Function
n
()
litellm/proxy/_experimental/out/_next/static/chunks/0ys10755n8os_.js:1
↓ 13 callers
Function
nj
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 13 callers
Function
normalize_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 callers
Function
p
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0.4.bbjx7y007.js:3
↓ 13 callers
Function
p
()
litellm/proxy/_experimental/out/_next/static/chunks/05btv.l5gro_..js:1
↓ 13 callers
Function
prepare_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 callers
Function
process_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 callers
Function
ra
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 13 callers
Function
return_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:9122
↓ 13 callers
Function
s
litellm/proxy/_experimental/out/_next/static/chunks/05.uhnqp00zd5.js:1
↓ 13 callers
Method
safe_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 callers
Function
sanitize_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 callers
Method
set
(self, *args, **kwargs)
tests/llm_translation/test_vcr_redis_persister.py:149
↓ 13 callers
Method
set_cache
(self, key, value, **kwargs)
litellm/caching/in_memory_cache.py:154
↓ 13 callers
Method
start
()
litellm/proxy/_experimental/out/_next/static/chunks/16.oisvgwzo8s.js:4
↓ 13 callers
Function
stripHash
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 13 callers
Function
strip_bedrock_routing_prefix
Strip LiteLLM routing prefixes from model name.
litellm/llms/bedrock/common_utils.py:605
↓ 13 callers
Function
supports_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:2235
↓ 13 callers
Function
to_server_spec
Map a v1 server onto a ServerSpec for a migrated mode, or None to defer to v1. BYOK is the per-user source of the ``api_key`` mode; its scheme ri
litellm/proxy/_experimental/mcp_server/outbound_credentials/adapter.py:53
↓ 13 callers
Method
transform_image_edit_response
(self, *args, **kwargs)
tests/test_litellm/images/test_image_edit_utils.py:41
↓ 13 callers
Method
transform_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:13
↓ 13 callers
Method
try_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:87
↓ 13 callers
Method
update_settings
Update the router settings.
litellm/router.py:9574
↓ 13 callers
Function
usePath
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 13 callers
Function
visitor_visit
(s,o,{keyMap:i=Ku,...a}={})
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 13 callers
Function
x
(e,t,r)
litellm/proxy/_experimental/out/_next/static/chunks/0.4.bbjx7y007.js:1
↓ 12 callers
Function
Et
(t)
litellm/proxy/_experimental/out/_next/static/chunks/03~yq9q893hmn.js:1
↓ 12 callers
Function
G
(s,o,i)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 12 callers
Function
Wr
(t)
litellm/proxy/_experimental/out/_next/static/chunks/03~yq9q893hmn.js:1
↓ 12 callers
Function
Z
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 12 callers
Function
_attr
(span, key)
tests/test_litellm/integrations/test_otel_guardrail_violation_spans.py:180
↓ 12 callers
Method
_base_kwargs
Return minimal kwargs for set_attributes with Responses API defaults.
tests/test_litellm/integrations/test_opentelemetry.py:3753
↓ 12 callers
Function
_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 callers
Method
_build_config
( providers: List[Dict], env_vars: Dict[str, str], master_key: str, )
litellm/setup_wizard.py:489
↓ 12 callers
Method
_build_kwargs
(self, *, exception: bool = False)
tests/test_litellm/integrations/test_opentelemetry.py:4619
↓ 12 callers
Method
_call
(self, request_body)
tests/test_litellm/proxy/auth/test_auth_checks.py:2793
↓ 12 callers
Function
_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 callers
Function
_collect_async
(chunks: List[str])
tests/test_litellm/llms/oci/chat/test_oci_sse_splitter.py:24
↓ 12 callers
Function
_collect_calls
Helper: return dict[attr_name] = value of all set_attribute calls.
tests/test_litellm/integrations/arize/test_arize_utils.py:475
↓ 12 callers
Function
_collect_sync
(stream: Iterator[str])
tests/test_litellm/llms/oci/chat/test_oci_sse_splitter.py:20
↓ 12 callers
Function
_compile
(code: str)
tests/test_litellm/proxy/guardrails/test_custom_code_security.py:30
↓ 12 callers
Method
_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 callers
Function
_content_filter
Instantiate ContentFilterGuardrail with a given category.
litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/guardrail_benchmarks/test_eval.py:243
↓ 12 callers
Method
_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 callers
Method
_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 callers
Method
_execute_agentic_loop
Legacy path: execute search + build patch + run follow-up call.
litellm/integrations/websearch_interception/handler.py:837
↓ 12 callers
Method
_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:7642
↓ 12 callers
Method
_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 callers
Method
_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:882
↓ 12 callers
Function
_get_rsa_key_and_jwk
(kid: str)
tests/test_litellm/proxy/auth/test_handle_jwt.py:3640
↓ 12 callers
Method
_get_span_name
(self, kwargs)
litellm/integrations/opentelemetry.py:2664
↓ 12 callers
Method
_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 callers
Method
_get_tools_from_server
Helper method to get tools from a single MCP server with prefixed names. Args: server (MCPServer): The server to query t
litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:1946
↓ 12 callers
Method
_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 callers
Function
_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 callers
Function
_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:50
↓ 12 callers
Method
_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 callers
Method
_init_litellm_callbacks
(self, llm_router: Optional[Router] = None)
litellm/proxy/utils.py:563
↓ 12 callers
Method
_init_pyroscope
Optional continuous profiling via Grafana Pyroscope. Off by default. Enable with LITELLM_ENABLE_PYROSCOPE=true. Requires: pi
litellm/proxy/proxy_server.py:7932
↓ 12 callers
Function
_invoke
Run invoke_agent_a2a with standard patches applied.
tests/test_litellm/proxy/agent_endpoints/test_agent_headers.py:101
↓ 12 callers
Method
_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 callers
Function
_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 callers
Method
_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 callers
Method
_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 callers
Function
_litellm_fine_tuning_job_from_response
(response: Any, is_azure: bool = False)
litellm/llms/openai/fine_tuning/handler.py:49
↓ 12 callers
Function
_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:2656
↓ 12 callers
Method
_make
(env=None, config_value=None, message_logging=True)
tests/test_litellm/integrations/test_opentelemetry.py:661
↓ 12 callers
Function
_make_invite
( *, is_accepted: bool, expired: bool = False, claimed: bool = False )
tests/test_litellm/proxy/auth/test_onboarding.py:37
↓ 12 callers
Function
_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
← previous
next →
1,201–1,300 of 68,180, ranked by callers