Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/BerriAI/litellm
/ functions
Functions
68,141 in github.com/BerriAI/litellm
⨍
Functions
68,141
◇
Types & classes
10,035
↳
Endpoints
1,734
↓ 26 callers
Function
_team_row
()
tests/test_litellm/proxy/proxy_server/test_team_model_name_translation.py:29
↓ 26 callers
Method
async_set_cache
(self, key, value, local_only: bool = False, **kwargs)
litellm/caching/dual_cache.py:327
↓ 26 callers
Function
bytes
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 26 callers
Function
create_config_class
Generate config class dynamically from JSON configuration
litellm/llms/openai_like/dynamic_config.py:19
↓ 26 callers
Function
create_response
Create streaming response, checking if the first chunk is an error. If the first chunk is an error, return a standard JSON error response.
litellm/proxy/common_request_processing.py:405
↓ 26 callers
Method
get_cache_key
Get the cache key for the given arguments. Args: **kwargs: kwargs to litellm.completion() or embedding() Return
litellm/caching/caching.py:329
↓ 26 callers
Function
get_model_from_request
( request_data: dict, route: str, request_headers: Optional[Mapping[str, Any]] = None, request
litellm/proxy/auth/auth_utils.py:1455
↓ 26 callers
Method
get_registry
Get the registered MCP Servers from the registry and union with the config MCP Servers
litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:639
↓ 26 callers
Function
get_vertex_base_url
Get the base URL for Vertex AI API calls. - ``global`` uses the global control plane host. - Multi-region geographies (e.g. ``us``, ``eu
litellm/llms/vertex_ai/common_utils.py:314
↓ 26 callers
Function
h
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0.4.bbjx7y007.js:1
↓ 26 callers
Method
labels
(self, *args, **kwargs)
litellm/types/integrations/prometheus.py:907
↓ 26 callers
Method
post_call_response_headers_hook
Calls async_post_call_response_headers_hook on all CustomLogger callbacks. Merges all returned header dicts (later callbacks override
litellm/proxy/utils.py:2327
↓ 26 callers
Function
prepare_key_update_data
( data: Union[UpdateKeyRequest, RegenerateKeyRequest], existing_key_row: LiteLLM_VerificationToken, )
litellm/proxy/management_endpoints/key_management_endpoints.py:1724
↓ 26 callers
Function
process_audio_file
Common utility function to process audio files for audio transcription APIs. Handles various input types: - File paths (str, os.PathLike
litellm/litellm_core_utils/audio_utils/utils.py:30
↓ 26 callers
Method
release_lock
Release the lock if the current pod holds it. Uses an atomic Lua compare-and-delete to prevent TOCTOU races where a stale own
litellm/proxy/db/db_transaction_queue/pod_lock_manager.py:112
↓ 26 callers
Function
route_request
Common helper to route the request
litellm/proxy/route_llm_request.py:249
↓ 26 callers
Function
streaming_format_tests
(idx, chunk)
tests/local_testing/test_streaming.py:162
↓ 26 callers
Method
unshift
(e)
litellm/proxy/_experimental/out/_next/static/chunks/101az3fsw7lje.js:1
↓ 26 callers
Method
update_variables
(self, llm_router: Router)
litellm/proxy/hooks/dynamic_rate_limiter.py:81
↓ 26 callers
Function
x
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 25 callers
Function
$
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0pwkd9r.mc_ee.js:1
↓ 25 callers
Function
E
(t,e)
litellm/proxy/_experimental/out/_next/static/chunks/0ys10755n8os_.js:1
↓ 25 callers
Method
_call_panw_api
Call PANW Prisma AIRS API to scan content or a tool_event.
litellm/proxy/guardrails/guardrail_hooks/panw_prisma_airs/panw_prisma_airs.py:246
↓ 25 callers
Function
_is_user_team_admin
(user_api_key_dict: UserAPIKeyAuth, team_obj: LiteLLM_TeamTable)
litellm/proxy/management_endpoints/common_utils.py:106
↓ 25 callers
Function
_make_logging_obj
()
tests/test_litellm/interactions/test_agents_http_handler.py:67
↓ 25 callers
Function
_redact_string
(value: str)
litellm/_logging.py:23
↓ 25 callers
Function
_update_litellm_params_for_health_check
Update the litellm params for health check. - gets a short `messages` param for health check - adds a bounded `max_tokens` when the depl
litellm/proxy/health_check.py:421
↓ 25 callers
Method
afile_content
( self, file_id, litellm_parent_otel_span, llm_router, **data )
tests/test_litellm/proxy/openai_files_endpoint/test_files_endpoint.py:333
↓ 25 callers
Function
apply_vcr_auto_marker_to_items
Auto-apply ``pytest.mark.vcr`` to collected items. Skip semantics (in priority order): 1. ``vcr_disabled()`` — global env-var off-switch (``
tests/_vcr_conftest_common.py:1428
↓ 25 callers
Method
auth_builder
Main authentication and authorization builder
litellm/proxy/auth/handle_jwt.py:1822
↓ 25 callers
Method
chunk_creator
(self, chunk: Any)
litellm/llms/oci/chat/transformation.py:742
↓ 25 callers
Function
convert_content_list_to_str
- handles scenario where content is list and not string - content list is just text, and no images Motivation: mistral api + azure ai do
litellm/litellm_core_utils/prompt_templates/common_utils.py:163
↓ 25 callers
Method
execute
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0n.a~e5dwfnkn.js:1
↓ 25 callers
Method
get_available_deployment
Returns the deployment based on routing strategy
litellm/router.py:10551
↓ 25 callers
Function
get_custom_llm_provider_from_request_headers
Get the `custom_llm_provider` from the request header `custom-llm-provider`
litellm/proxy/common_utils/openai_endpoint_utils.py:75
↓ 25 callers
Function
get_nested_value
Retrieves a value from a nested dictionary using dot notation. Args: data: The dictionary to search in key_path: The path to
litellm/litellm_core_utils/dot_notation_indexing.py:31
↓ 25 callers
Method
init_async_client
( self, )
litellm/caching/redis_cache.py:334
↓ 25 callers
Method
is_virtual_key_allowed_to_call_route
Raises Exception if Virtual Key is not allowed to call the route
litellm/proxy/auth/route_checks.py:89
↓ 25 callers
Function
o
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0.4.bbjx7y007.js:1
↓ 25 callers
Method
observe
(self, *args, **kwargs)
litellm/types/integrations/prometheus.py:916
↓ 25 callers
Function
print_verbose
(print_statement)
litellm/litellm_core_utils/streaming_handler.py:93
↓ 25 callers
Function
r
()
litellm/proxy/_experimental/out/_next/static/chunks/0ys10755n8os_.js:1
↓ 25 callers
Function
safe_set_attribute
Sets a span attribute safely with OTEL-compliant primitive typing for Arize/Phoenix.
litellm/integrations/opentelemetry_utils/base_otel_llm_obs_attributes.py:32
↓ 25 callers
Function
server_span_factory
Factory mirroring user_api_key_auth: SERVER span + url.path + http.route.
tests/test_litellm/integrations/open_telemetry/conftest.py:50
↓ 25 callers
Function
tf
(e,t,n=[])
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 25 callers
Method
toRefractedElement
(s,o,i={})
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 25 callers
Method
transform_rerank_request
( self, model: str, optional_rerank_params: Dict, headers: Dict, litel
litellm/llms/voyage/rerank/transformation.py:70
↓ 25 callers
Function
validate_key_mcp_servers_against_team
Validate that MCP servers requested on a key are within the allowed scope. Rules: - If key is in a team: key's mcp_servers must be a sub
litellm/proxy/management_helpers/object_permission_utils.py:437
↓ 24 callers
Method
_check_custom_proxy
for cloudflare ai gateway - https://github.com/BerriAI/litellm/issues/4317 Handles custom api_base for: 1. Gemini (Google AI
litellm/llms/vertex_ai/vertex_llm_base.py:598
↓ 24 callers
Function
_common_call_kwargs
(client)
tests/test_litellm/llms/soniox/audio_transcription/test_soniox_audio_transcription_handler.py:90
↓ 24 callers
Method
_config
(self)
tests/test_litellm/llms/oci/embed/test_oci_embed_transformation.py:38
↓ 24 callers
Method
_get_aws_region_name
Get the AWS region name from the environment variables. Parameters: optional_params (dict): Optional parameters for the
litellm/llms/bedrock/base_aws_llm.py:534
↓ 24 callers
Method
_make_pr
(self, **overrides)
tests/test_litellm/test_github_triage_with_llm.py:865
↓ 24 callers
Function
_request_body
()
tests/test_litellm/proxy/test_budget_reservation.py:53
↓ 24 callers
Function
_supports_factory
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:2329
↓ 24 callers
Method
add_litellm_success_callback
Add a success callback to `litellm.success_callback`. Auto-routes async callbacks to litellm._async_success_callback. Special
litellm/litellm_core_utils/logging_callback_manager.py:67
↓ 24 callers
Method
cancel
(self)
tests/test_litellm/proxy/utils/prisma_and_spend/test_prisma_client_reconnect.py:354
↓ 24 callers
Function
e
(e)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 24 callers
Function
eE
(e)
litellm/proxy/_experimental/out/_next/static/chunks/101az3fsw7lje.js:1
↓ 24 callers
Method
getAPIList
(e,t,r)
litellm/proxy/_experimental/out/_next/static/chunks/0nnx~7-7e5t~1.js:1
↓ 24 callers
Function
get_custom_llm_provider_from_request_query
Get the `custom_llm_provider` from the request query parameters Safely reads the request query parameters
litellm/proxy/common_utils/openai_endpoint_utils.py:64
↓ 24 callers
Method
get_mcp_server_by_id
Get the MCP Server from the server id
litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:3781
↓ 24 callers
Function
get_prisma_client_or_throw
(message: str)
litellm/proxy/management_endpoints/mcp_management_endpoints.py:671
↓ 24 callers
Function
get_request_base_url
Get the base URL for the request, considering X-Forwarded-* headers. Resolution order: ``PROXY_BASE_URL`` env var, then X-Forwarded-* when
litellm/proxy/_experimental/mcp_server/oauth_utils.py:93
↓ 24 callers
Method
get_supported_openai_params
(self, model: str)
tests/local_testing/test_custom_llm.py:571
↓ 24 callers
Function
invoke_agent_a2a
Invoke an agent using the A2A protocol (JSON-RPC 2.0). Supported methods: - message/send: Send a message and get a response - messag
litellm/proxy/agent_endpoints/a2a_endpoints.py:494
↓ 24 callers
Method
items
(self)
tests/pass_through_unit_tests/test_pass_through_unit_tests.py:52
↓ 24 callers
Method
model_dump
(self)
litellm/router_strategy/budget_limiter.py:90
↓ 24 callers
Method
model_dump
(self)
tests/test_litellm/llms/azure/test_azure_fine_tuning_api.py:27
↓ 24 callers
Function
pass_through_request
Pass through endpoint handler, makes the httpx request for pass-through endpoints and ensures logging hooks are called Args: request
litellm/proxy/pass_through_endpoints/pass_through_endpoints.py:686
↓ 24 callers
Method
pre_call
(self, input, api_key, model=None, additional_args={})
litellm/types/utils.py:3434
↓ 24 callers
Method
unregister
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 23 callers
Function
K
({searchTool:e,onBack:r,isEditing:s,accessToken:o,availableProviders:l})
litellm/proxy/_experimental/out/_next/static/chunks/01_xjyxcb1uco.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:6829
↓ 23 callers
Method
audio_transcriptions
( self, model: str, audio_file: FileTypes, optional_params: dict, lite
litellm/llms/custom_httpx/llm_http_handler.py:1238
↓ 23 callers
Function
cleanup_router_config_variables
()
litellm/proxy/proxy_server.py:672
↓ 23 callers
Method
create
(self, data: Dict[str, Any])
tests/test_litellm/repositories/test_repositories.py:74
↓ 23 callers
Function
e2
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 23 callers
Function
encode_video_id_with_provider
Encode provider and model_id into video_id using base64.
litellm/types/videos/utils.py:38
↓ 23 callers
Function
get_model_info
(token, model)
litellm/litellm_core_utils/prompt_templates/factory.py:649
↓ 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
model_dump
(self, exclude_none=True)
tests/test_litellm/integrations/test_mlflow.py:176
↓ 23 callers
Method
raise_for_status
(self)
tests/test_litellm/test_check_licenses.py:29
↓ 23 callers
Method
setA
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0.4.bbjx7y007.js:1
↓ 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:2287
↓ 23 callers
Function
to
()
litellm/proxy/_experimental/out/_next/static/chunks/00p.gft-l.6p..js:1
↓ 23 callers
Function
to
()
litellm/proxy/_experimental/out/_next/static/chunks/01xm1xt.gmrff.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:1192
↓ 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
Function
_install_litellm_config
Ensure mock_prisma.db.litellm_config exists with async methods (the conftest only stubs ``litellm_configtable`` — this is a different table).
tests/test_litellm/proxy/proxy_server/test_routes_config.py:21
↓ 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
← previous
next →
501–600 of 68,141, ranked by callers