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
↓ 24 callers
Method
remove
(e)
litellm/proxy/_experimental/out/_next/static/chunks/08yy42xvwaak6.js:1
↓ 24 callers
Method
slice
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/11ibt3khr2hk3.js:1
↓ 24 callers
Function
tN
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 23 callers
Method
_map_function
Map OpenAI-style tools/functions to Vertex AI format. Args: value: List of tool definitions optional_params:
litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py:583
↓ 23 callers
Function
async_data_generator
( response, user_api_key_dict: UserAPIKeyAuth, request_data: dict, request: Request | None = N
litellm/proxy/proxy_server.py:6906
↓ 23 callers
Method
audio_transcriptions
( self, model: str, audio_file: FileTypes, optional_params: dict, lite
litellm/llms/custom_httpx/llm_http_handler.py:1241
↓ 23 callers
Function
call_create
( harness: Harness, *, provider: Optional[str] = None, user: Optional[UserAPIKeyAuth] = None,
tests/test_litellm/proxy/batches_endpoints/test_endpoints.py:231
↓ 23 callers
Method
cancel_batch
( self, batch_id: str, *, key: str, provider: str | None = None )
tests/e2e/batches/batch_client.py:125
↓ 23 callers
Function
cleanup_router_config_variables
()
litellm/proxy/proxy_server.py:715
↓ 23 callers
Method
common_processing_pre_call_logic
( self, request: Request, general_settings: dict, user_api_key_dict: UserAPIKe
litellm/proxy/common_request_processing.py:940
↓ 23 callers
Method
create
(self, data: Dict[str, Any])
tests/test_litellm/repositories/test_repositories.py:74
↓ 23 callers
Method
exists
Check if a record exists.
litellm/repositories/base_repository.py:110
↓ 23 callers
Method
exit
(self, server_id: str)
tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_max_concurrent_requests.py:29
↓ 23 callers
Method
get_error_class
(self, error_message, status_code, headers)
tests/test_litellm/llms/base_llm/batches/test_transformation.py:87
↓ 23 callers
Function
get_secret_bool
Guarantees response from 'get_secret' is either boolean or none. Used for fixing linting errors. Args: secret_name: The name of the
litellm/secret_managers/main.py:136
↓ 23 callers
Method
matches
(self, path: str)
litellm/proxy/_lazy_features.py:50
↓ 23 callers
Method
ok
(self)
tests/e2e/e2e_http.py:122
↓ 23 callers
Method
raise_for_status
(self)
tests/test_litellm/test_check_licenses.py:29
↓ 23 callers
Function
s
()
litellm/proxy/_experimental/out/_next/static/chunks/035i-tbvd3z7s.js:10
↓ 23 callers
Method
setTimeout
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/08yy42xvwaak6.js:1
↓ 23 callers
Function
set_body
(harness: Harness, body: Dict[str, Any])
tests/test_litellm/proxy/batches_endpoints/test_endpoints.py:227
↓ 23 callers
Method
setup_canadian_guardrail
Setup guardrail with all Canadian PII patterns (mimics the policy template)
tests/test_litellm/proxy/guardrails/guardrail_hooks/content_filter/test_ca_policy_e2e.py:21
↓ 23 callers
Function
supports_function_calling
Check if the given model supports function calling and return a boolean value. Parameters: model (str): The model name to be checked.
litellm/utils.py:2290
↓ 23 callers
Function
tA
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/11ibt3khr2hk3.js:1
↓ 23 callers
Function
tS
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 23 callers
Function
tc
(e)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 23 callers
Function
tm
(e)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 23 callers
Function
to
()
litellm/proxy/_experimental/out/_next/static/chunks/1339tsypbt0.4.js:1
↓ 23 callers
Function
to
()
litellm/proxy/_experimental/out/_next/static/chunks/077lpxhql0wyy.js:1
↓ 23 callers
Method
transform_realtime_response
Keep this state less - leave the state management (e.g. tracking current_output_item_id, current_response_id, current_conversation_id, curren
litellm/llms/gemini/realtime/transformation.py:1143
↓ 23 callers
Function
tv
litellm/proxy/_experimental/out/_next/static/chunks/0nnx~7-7e5t~1.js:1
↓ 23 callers
Function
useFn
(s=void 0)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 22 callers
Function
_codes
(tmp_path, source)
tests/test_litellm/test_check_type_discipline.py:22
↓ 22 callers
Method
_get_openai_compatible_provider_info
Get the OpenAI compatible provider info for Baseten
litellm/llms/baseten/chat.py:85
↓ 22 callers
Method
_make
(env=None, config_value=None)
tests/test_litellm/integrations/test_opentelemetry.py:763
↓ 22 callers
Function
_make_model
(model_id: str, model_name: str = "gpt-4")
tests/test_litellm/router_utils/test_health_check_allowed_fails_integration.py:19
↓ 22 callers
Function
_make_response
Build a mock httpx response with the given JSON body.
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_promptguard.py:57
↓ 22 callers
Method
_transform_openai_jsonl_content_to_bedrock_jsonl_content
Transforms OpenAI JSONL content to Bedrock batch format Bedrock batch format: { "recordId": "alphanumeric string", "modelInput": {JS
litellm/llms/bedrock/files/transformation.py:626
↓ 22 callers
Method
_transform_parts
( parts: List[HttpxPartType], cumulative_tool_call_idx: int, is_function_call: Optiona
litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py:1575
↓ 22 callers
Method
_update_kwargs_before_fallbacks
Adds/updates to kwargs: - num_retries - litellm_trace_id - metadata
litellm/router.py:2773
↓ 22 callers
Function
adapt_messages_to_generic_oci_standard
Convert an OpenAI-format message array to OCI GENERIC format.
litellm/llms/oci/chat/generic.py:168
↓ 22 callers
Method
addObserver
(e)
litellm/proxy/_experimental/out/_next/static/chunks/08yy42xvwaak6.js:1
↓ 22 callers
Method
async_success_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:2364
↓ 22 callers
Function
check_feature_access_for_user
Raise HTTP 403 if the user's role is blocked from accessing the given feature by the UI settings stored in general_settings. Args:
litellm/proxy/common_utils/rbac_utils.py:17
↓ 22 callers
Function
create_audit_log_for_update
Create an audit log for an object.
litellm/proxy/management_helpers/audit_logs.py:196
↓ 22 callers
Method
create_rate_limit_keys
Create the rate limit keys for the given key and value.
litellm/proxy/hooks/parallel_request_limiter_v3.py:521
↓ 22 callers
Function
deriveErrorMessage
(errorData: any)
ui/litellm-dashboard/src/app/(dashboard)/hooks/router/useRouterFields.ts:23
↓ 22 callers
Method
disconnect
For closing connection on server shutdown
litellm/proxy/db/base_client.py:43
↓ 22 callers
Function
ep
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 22 callers
Method
getMutationCache
()
litellm/proxy/_experimental/out/_next/static/chunks/08yy42xvwaak6.js:1
↓ 22 callers
Method
getValue
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 22 callers
Method
get_bedrock_route
Get the bedrock route for the given model.
litellm/llms/bedrock/common_utils.py:892
↓ 22 callers
Function
get_current_spend
Read current spend from the cross-pod spend counter. Reads Redis FIRST (authoritative cross-pod value), not DualCache's async_get_cache
litellm/proxy/proxy_server.py:2045
↓ 22 callers
Method
get_data
Check if key valid
litellm/proxy/db/base_client.py:12
↓ 22 callers
Function
get_optional_params_embeddings
( # 2 optional params model: str, user: Optional[str] = None, encoding_format: Optional[str] =
litellm/utils.py:3066
↓ 22 callers
Function
get_request_route
Resolve the request route from the ASGI scope, with ``root_path`` stripped. Prefer this over ``request.url.path`` for any auth, ACL, routing
litellm/proxy/auth/auth_utils.py:516
↓ 22 callers
Function
handle_streamable_http_mcp
Handle MCP requests through StreamableHTTP.
litellm/proxy/_experimental/mcp_server/server.py:3676
↓ 22 callers
Function
hash_token
(token: str)
litellm/proxy/_types.py:218
↓ 22 callers
Method
info
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 22 callers
Method
map_openai_params
( self, non_default_params: Dict, optional_params: Dict, model: str, d
litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py:1085
↓ 22 callers
Function
prometheus_label_factory
Returns a dictionary of label + values for prometheus. Ensures end_user param is not sent to prometheus if it is not supported. When ``
litellm/integrations/prometheus.py:3853
↓ 22 callers
Method
send_alert
Alerting based on thresholds: - https://github.com/BerriAI/litellm/issues/1298 - Responses taking too long - Requests are ha
litellm/integrations/SlackAlerting/slack_alerting.py:1271
↓ 22 callers
Method
setA
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0e9hs7onyj28m.js:1
↓ 22 callers
Method
subscribe
(e)
litellm/proxy/_experimental/out/_next/static/chunks/08yy42xvwaak6.js:1
↓ 22 callers
Function
supports_httpx_timeout
Helper function to know if a provider implementation supports httpx timeout
litellm/utils.py:2132
↓ 22 callers
Function
test
()
tests/proxy_unit_tests/test_key_generate_prisma.py:250
↓ 22 callers
Method
translate_anthropic_messages_to_openai
( self, messages: List[ Union[ AnthropicMessagesUserMessageParam,
litellm/llms/anthropic/experimental_pass_through/adapters/transformation.py:353
↓ 22 callers
Method
update_environment_variables
( self, litellm_params: Dict, optional_params: Dict, model: Optional[str] = No
litellm/litellm_core_utils/litellm_logging.py:530
↓ 22 callers
Method
use
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 21 callers
Method
_build_claims
Build JWT claims for the outbound MCP access token. Args: user_api_key_dict: LiteLLM auth context for the current reques
litellm/proxy/guardrails/guardrail_hooks/mcp_jwt_signer/mcp_jwt_signer.py:653
↓ 21 callers
Function
_build_model_response
(content: str)
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_xecguard.py:64
↓ 21 callers
Method
_callback_capabilities
Inspect ``litellm.callbacks`` once and answer the per-hook capability questions used to short-circuit no-op work on the chat-completi
litellm/proxy/utils.py:1603
↓ 21 callers
Function
_enable_aes
(monkeypatch)
tests/test_litellm/proxy/management_endpoints/test_credential_migration.py:36
↓ 21 callers
Function
_gate
Call review_gate with safe defaults for the injectable hooks.
tests/test_litellm/test_github_review_gate.py:101
↓ 21 callers
Method
_get_client
Returns the appropriate client based on the given deployment, kwargs, and client_type. Parameters: deployment (dict): Th
litellm/router.py:9687
↓ 21 callers
Function
_http_response
(status_code: int = 200, json_body: dict | None = None)
tests/test_litellm/llms/vertex_ai/batches/test_handler.py:71
↓ 21 callers
Function
_make_env_var_server
Lightweight server stand-in for the per-user env-var endpoints. The handlers only read ``server_id``/``server_name``/``alias``/``env_vars``/
tests/test_litellm/proxy/management_endpoints/test_mcp_management_endpoints.py:4179
↓ 21 callers
Function
_make_pr
(**overrides)
tests/test_litellm/test_github_review_gate.py:75
↓ 21 callers
Function
_make_request_mock
( method: str, params: dict, request_id: object = "req-1" )
tests/test_litellm/proxy/agent_endpoints/test_a2a_endpoints.py:366
↓ 21 callers
Function
_make_response
(payload: Dict[str, Any], status_code: int = 200)
tests/test_litellm/llms/soniox/audio_transcription/test_soniox_audio_transcription_handler.py:22
↓ 21 callers
Function
_make_row
Build a Prisma-like row object.
tests/test_litellm/proxy/memory/test_memory_endpoints.py:25
↓ 21 callers
Function
_simple_chunk
(model: str = "gpt-4", content: str = "hi")
tests/test_litellm/proxy/proxy_server/test_streaming_helpers.py:48
↓ 21 callers
Method
_transform_request
( self, model: str, messages: List[AllMessageValues], optional_params: dict,
litellm/llms/bedrock/chat/converse_transformation.py:1634
↓ 21 callers
Function
_transform_request_body
Common transformation logic across sync + async Gemini /generateContent calls.
litellm/llms/vertex_ai/gemini/transformation.py:1085
↓ 21 callers
Function
_update_metadata_fields
Helper function to update all metadata fields (both premium and standard). Args: updated_kv: The key-value dict being used for the u
litellm/proxy/management_endpoints/common_utils.py:575
↓ 21 callers
Method
aread
(self)
tests/test_litellm/a2a_protocol/providers/watsonx_orchestrate/test_watsonx_orchestrate_transformation.py:86
↓ 21 callers
Method
arerank
(self, model: str, **kwargs)
litellm/router.py:3865
↓ 21 callers
Method
aretrieve_batch
Iterate through all models in a model group to check for batch Future Improvement - cache the result.
litellm/router.py:5048
↓ 21 callers
Method
async_service_failure_hook
Arize is used mainly for LLM I/O tracing, sending router+caching metrics adds bloat to arize logs
litellm/integrations/arize/arize.py:127
↓ 21 callers
Method
basename
()
litellm/proxy/_experimental/out/_next/static/chunks/11ibt3khr2hk3.js:1
↓ 21 callers
Method
budget_alerts
( self, type: Literal[ "token_budget", "user_budget", "sof
litellm/proxy/utils.py:1824
↓ 21 callers
Method
close
(self)
tests/test_litellm/test_streaming_connection_cleanup.py:129
↓ 21 callers
Method
completion_function
(self)
tests/llm_translation/base_llm_unit_tests.py:74
↓ 21 callers
Method
copyMetaAndAttributes
(s,o)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 21 callers
Method
create
(self, messages, model=None, **kwargs)
litellm/main.py:374
↓ 21 callers
Method
defaultQueryOptions
(e)
litellm/proxy/_experimental/out/_next/static/chunks/08yy42xvwaak6.js:1
↓ 21 callers
Method
emit
(self, record: logging.LogRecord)
tests/test_litellm/proxy/proxy_server/test_proxy_config.py:816
↓ 21 callers
Function
emit_cassette_cache_session_banner
Call from ``pytest_terminal_summary``. No-op on xdist workers.
tests/_vcr_conftest_common.py:1997
↓ 21 callers
Function
et
({accessToken:e,token:C,userRole:w,userID:N,premiumUser:k})
litellm/proxy/_experimental/out/_next/static/chunks/00fcsizkvc4hx.js:1
↓ 21 callers
Function
eu
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
← previous
next →
601–700 of 71,069, ranked by callers