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
↓ 22 callers
Method
_update_kwargs_before_fallbacks
Adds/updates to kwargs: - num_retries - litellm_trace_id - metadata
litellm/router.py:2762
↓ 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/0.4.bbjx7y007.js:143
↓ 22 callers
Method
aread
(self)
tests/test_litellm/a2a_protocol/providers/watsonx_orchestrate/test_watsonx_orchestrate_transformation.py:86
↓ 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:2324
↓ 22 callers
Method
calculate_usage
( self, usage_object: dict, reasoning_content: Optional[str], completion_respo
litellm/llms/anthropic/chat/transformation.py:2059
↓ 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
Method
common_processing_pre_call_logic
( self, request: Request, general_settings: dict, user_api_key_dict: UserAPIKe
litellm/proxy/common_request_processing.py:940
↓ 22 callers
Method
create
(self, messages, model=None, **kwargs)
litellm/main.py:372
↓ 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
getMutationCache
()
litellm/proxy/_experimental/out/_next/static/chunks/0n.a~e5dwfnkn.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:2002
↓ 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:3041
↓ 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:500
↓ 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
Method
matches
(self, path: str)
litellm/proxy/_lazy_features.py:50
↓ 22 callers
Function
new_user
Use this to create a new INTERNAL user with a budget. Internal Users can access LiteLLM Admin UI to make keys, request access to models.
litellm/proxy/management_endpoints/internal_user_endpoints.py:341
↓ 22 callers
Method
ok
(self)
tests/e2e/e2e_http.py:112
↓ 22 callers
Function
s
()
litellm/proxy/_experimental/out/_next/static/chunks/05btv.l5gro_..js:10
↓ 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
subscribe
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0.4.bbjx7y007.js:143
↓ 22 callers
Function
supports_httpx_timeout
Helper function to know if a provider implementation supports httpx timeout
litellm/utils.py:2129
↓ 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:1601
↓ 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:9658
↓ 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:4050
↓ 21 callers
Function
_make_pr
(**overrides)
tests/test_litellm/test_github_review_gate.py:75
↓ 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:1633
↓ 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
arerank
(self, model: str, **kwargs)
litellm/router.py:3854
↓ 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/101az3fsw7lje.js:1
↓ 21 callers
Method
budget_alerts
( self, type: Literal[ "token_budget", "user_budget", "sof
litellm/proxy/utils.py:1822
↓ 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
defaultQueryOptions
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0n.a~e5dwfnkn.js:1
↓ 21 callers
Function
eY
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 21 callers
Function
ee
(t)
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 21 callers
Function
ej
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 21 callers
Method
emit
(self, record)
tests/test_litellm/test_cost_calculation_log_level.py:30
↓ 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
Method
exists
Check if a record exists.
litellm/repositories/base_repository.py:110
↓ 21 callers
Method
get
(self, key, default=None)
litellm/types/router.py:304
↓ 21 callers
Function
handle_streamable_http_mcp
Handle MCP requests through StreamableHTTP.
litellm/proxy/_experimental/mcp_server/server.py:3412
↓ 21 callers
Method
image_generation
( self, model: str, prompt: str, api_key: Optional[str], api_base: Opt
tests/local_testing/test_custom_llm.py:231
↓ 21 callers
Function
isReferenceLikeElement
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 21 callers
Method
is_callback_disabled_dynamically
Check if a callback is disabled via the x-litellm-disable-callbacks header or via `litellm_disabled_callbacks` in standard_callback_dynam
enterprise/litellm_enterprise/enterprise_callbacks/callback_controls.py:16
↓ 21 callers
Method
list
(self, thread_id)
tests/local_testing/test_assistants.py:189
↓ 21 callers
Function
modelAvailableCall
( accessToken: string, userID: string, userRole: string, return_wildcard_routes: boolean = false, te
ui/litellm-dashboard/src/components/networking.tsx:1869
↓ 21 callers
Method
remove
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0n.a~e5dwfnkn.js:1
↓ 21 callers
Method
result
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 21 callers
Method
safe_get_vertex_ai_project
Safely get Vertex AI project without mutating the litellm_params dict. Unlike get_vertex_ai_project(), this does NOT pop values from
litellm/llms/vertex_ai/vertex_llm_base.py:1150
↓ 21 callers
Method
serialize
Encode a value for DualCache / Redis (``json.dumps``-safe). If ``model_type`` is set, the payload is validated with that model, then
litellm/proxy/common_utils/cache_pydantic_utils.py:40
↓ 21 callers
Method
should_run_guardrail
Returns True if the guardrail should be run on the event_type
litellm/integrations/custom_guardrail.py:555
↓ 21 callers
Function
t
()
litellm/proxy/_experimental/out/_next/static/chunks/101az3fsw7lje.js:1
↓ 21 callers
Method
toHexString
()
litellm/proxy/_experimental/out/_next/static/chunks/0.4.bbjx7y007.js:1
↓ 21 callers
Method
trace
(self, name, **kwargs)
litellm/litellm_core_utils/dd_tracing.py:40
↓ 21 callers
Method
transform_anthropic_messages_request
No transformation is needed for Anthropic messages This takes in a request in the Anthropic /v1/messages API spec -> transforms it
litellm/llms/anthropic/experimental_pass_through/messages/transformation.py:256
↓ 21 callers
Method
transform_request
( self, model: str, messages: List[Dict[str, str]], # type: ignore optional_p
litellm/llms/sap/chat/transformation.py:319
↓ 21 callers
Method
translate_request
Translate a full Anthropic /v1/messages request dict to litellm.responses() / litellm.aresponses() kwargs.
litellm/llms/anthropic/experimental_pass_through/responses_adapters/transformation.py:278
↓ 21 callers
Function
tu
(e)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 21 callers
Function
ut
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 20 callers
Method
_bedrock_converse_messages_pt_async
( messages: List, model: str, llm_provider: str, user_continue_message: Option
litellm/litellm_core_utils/prompt_templates/factory.py:4293
↓ 20 callers
Function
_check_and_merge_model_level_guardrails
Check if the model has guardrails defined and merge them with existing guardrails in the request data. Args: data: The request data
litellm/proxy/utils.py:5572
↓ 20 callers
Function
_clear_url_env
(monkeypatch)
tests/test_litellm/proxy/utils/helpers/test_url_helpers.py:19
↓ 20 callers
Method
_get_token_and_url
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/vertex_llm_base.py:670
↓ 20 callers
Function
_get_tools_from_mcp_servers
Helper method to fetch tools from MCP servers based on server filtering criteria. Args: user_api_key_auth: User authenti
litellm/proxy/_experimental/mcp_server/server.py:1465
↓ 20 callers
Method
_handle_error
(self, e: Exception, provider_config: Any)
litellm/interactions/http_handler.py:53
↓ 20 callers
Method
_is_adaptive_thinking_model
Whether ``model`` uses adaptive thinking (``output_config.effort``). Sourced solely from the model cost map's ``supports_adaptive_thinking``
litellm/llms/anthropic/common_utils.py:375
↓ 20 callers
Function
_make_request
(**overrides)
tests/test_litellm/llms/anthropic/experimental_pass_through/responses_adapters/test_responses_adapters_transformation.py:25
↓ 20 callers
Function
_make_response
Build a stub httpx-like response.
tests/test_litellm/interactions/test_agents_http_handler.py:41
↓ 20 callers
Function
_redact_prompt_leaks_in_error_string
Strip echoed request input from provider error strings. Provider validation errors (e.g. OpenAI ``RateLimitError`` carrying 178 pydantic
litellm/proxy/spend_tracking/spend_tracking_utils.py:740
↓ 20 callers
Method
aspeech
Example Usage: ``` from litellm import Router client = Router(model_list = [ { "model_na
litellm/router.py:3740
↓ 20 callers
Method
async_get_available_deployment
Async implementation of 'get_available_deployments'. Allows all cache calls to be made async => 10x perf impact (8rps -> 100 rps).
litellm/router.py:10237
↓ 20 callers
Method
async_post_call_success_hook
(self, data, user_api_key_dict, response)
tests/test_litellm/proxy/test_model_level_guardrails.py:338
↓ 20 callers
Function
can_modify_verification_token
Check if user has permission to modify (delete/regenerate) a verification token. Rules: - Proxy admin can modify any key - Internal
litellm/proxy/management_endpoints/key_management_endpoints.py:3679
↓ 20 callers
Function
create_pass_through_route
( endpoint, target: str, custom_headers: Optional[Mapping[str, Any]] = None, _forward_headers:
litellm/proxy/pass_through_endpoints/pass_through_endpoints.py:1484
↓ 20 callers
Function
create_tool_function
Create a tool function for an OpenAPI operation. This function creates an async tool function that can be called with keyword arguments. Para
litellm/proxy/_experimental/mcp_server/openapi_to_mcp_generator.py:329
↓ 20 callers
Function
eZ
(e,t,r)
litellm/proxy/_experimental/out/_next/static/chunks/0.4.bbjx7y007.js:106
↓ 20 callers
Method
embedding
( self, model: str, input: Union[str, List], is_async: Optional[bool] = False,
litellm/router.py:4517
↓ 20 callers
Function
er
(t,e)
litellm/proxy/_experimental/out/_next/static/chunks/03~yq9q893hmn.js:1
↓ 20 callers
Function
get_bedrock_base_model
Get the base model from the given model name. Handle model names like: - "us.meta.llama3-2-11b-instruct-v1:0" -> "meta.llama3-2-11b-inst
litellm/llms/bedrock/common_utils.py:651
↓ 20 callers
Method
get_custom_loggers_for_type
Get all custom loggers that are instances of the given class type
litellm/litellm_core_utils/logging_callback_manager.py:380
← previous
next →
601–700 of 68,180, ranked by callers