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
↓ 18 callers
Function
tn
(e,t,r)
litellm/proxy/_experimental/out/_next/static/chunks/0.4.bbjx7y007.js:143
↓ 18 callers
Function
unwrap
(result: Result[R])
tests/e2e/e2e_http.py:125
↓ 18 callers
Method
update_many
( self, where: Dict[str, Any], data: Dict[str, Any] )
tests/test_litellm/proxy/common_utils/test_reset_budget_job.py:75
↓ 18 callers
Function
vcr_config_dict
()
tests/_vcr_conftest_common.py:1113
↓ 17 callers
Function
_apply_credential_overrides_from_model_config
Walk the model_config precedence chain in team/project metadata. If a matching credential is found, set api_base/api_key/api_version on data
litellm/proxy/litellm_pre_call_utils.py:1819
↓ 17 callers
Function
_bedrock_tools_pt
OpenAI tools looks like: tools = [ { "type": "function", "function": { "name": "get_current_w
litellm/litellm_core_utils/prompt_templates/factory.py:4963
↓ 17 callers
Method
_build_container_id
Build a managed container ID with provider and model info encoded. Format: cntr_{base64("litellm:custom_llm_provider:{provider};model_id:{mod
litellm/responses/utils.py:502
↓ 17 callers
Function
_build_key_filter_conditions
Build filter conditions for key listing. Visibility rules: - Users always see their own keys (user_id match) - Team admins see ALL keys f
litellm/proxy/management_endpoints/key_management_endpoints.py:5227
↓ 17 callers
Function
_build_request
( headers: Optional[Dict[str, str]] = None, *, path: str = "/mcp-rest/test/tools/list", method
tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py:23
↓ 17 callers
Method
_build_user_agent
Build the User-Agent string for Databricks API calls. If a custom user agent is provided, the partner name (part before /) i
litellm/llms/databricks/common_utils.py:136
↓ 17 callers
Method
_create_guardrail_span
Creates a span for Guardrail, if any guardrail information is present in standard_logging_object
litellm/integrations/opentelemetry.py:1736
↓ 17 callers
Function
_create_mock_client
Utility to create a mocked async httpx client for the given method.
tests/test_litellm/proxy/_experimental/mcp_server/test_openapi_to_mcp_generator.py:32
↓ 17 callers
Method
_get_model_endpoint
Get the API endpoint for a given model.
litellm/llms/stability/image_edit/transformations.py:110
↓ 17 callers
Function
_hash_cli_sso_secret
(secret: str)
litellm/proxy/management_endpoints/ui_sso.py:163
↓ 17 callers
Function
_make_mock_response
Build a minimal mock ResponsesAPIResponse.
tests/test_litellm/llms/anthropic/experimental_pass_through/responses_adapters/test_responses_adapters_transformation.py:854
↓ 17 callers
Function
_make_model_list
Build a router model_list from a compact spec. spec entry shape: { "model_name": str, "quality_tier": Optional[int],
tests/test_litellm/router_strategy/test_quality_router.py:27
↓ 17 callers
Function
_make_server
( *, server_id: str = "abcdef-1234", server_name: str = "github_onprem", alias: str = "github_
tests/test_litellm/proxy/_experimental/mcp_server/test_short_mcp_tool_prefix.py:29
↓ 17 callers
Function
_make_team_obj
Create a mock team object with the given MCP permissions.
tests/test_litellm/proxy/management_helpers/test_object_permission_utils.py:156
↓ 17 callers
Method
_resolve_project_name
Resolve the target Phoenix/Arize project for this request. Proxy priority: ``user_api_key_auth_metadata.phoenix_project_name_overrid
litellm/integrations/arize/arize_phoenix.py:267
↓ 17 callers
Function
_seed_token
( prisma, scratch_prefix: str, *, suffix: str = "tok", user_id: str, spend: float = 0.
tests/proxy_behavior/management/test_f7_key_coverage_push.py:34
↓ 17 callers
Method
_transform_response_api_usage_to_chat_usage
Transforms ResponseAPIUsage or ImageUsage to a Usage object. Both have the same spec with input_tokens, output_tokens, and i
litellm/responses/utils.py:940
↓ 17 callers
Function
_translate_messages
(messages: List[Any])
tests/test_litellm/llms/anthropic/experimental_pass_through/responses_adapters/test_responses_adapters_transformation.py:180
↓ 17 callers
Method
_try_transform_vertex_batch_output_to_openai
Try to transform Vertex AI batch output to OpenAI format. If conversion fails at any point, return the original content as-is.
litellm/llms/vertex_ai/files/transformation.py:661
↓ 17 callers
Function
_verdict_response
Build a mocked Repello analyze response with the given verdict.
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_repelloai.py:32
↓ 17 callers
Method
acreate_sandbox
(self, **kwargs)
tests/test_litellm/integrations/code_interpreter_interception/test_handler.py:41
↓ 17 callers
Function
assert_server_span_attrs
The four required attributes on the SERVER span must all be set.
tests/test_litellm/integrations/open_telemetry/_helpers.py:33
↓ 17 callers
Method
async_function_with_fallbacks
Try calling the function_with_retries If it fails after num_retries, fall back to another model group
litellm/router.py:6193
↓ 17 callers
Method
check_passthrough_route_access
Check if route is a passthrough route. Supports both exact match and prefix match.
litellm/proxy/auth/route_checks.py:657
↓ 17 callers
Method
connect
( self, *, key: str, model: str, timeout: float = 15.0 )
tests/e2e/realtime/realtime_client.py:291
↓ 17 callers
Function
convert_file_document_to_url_document
Convert a file-type document dict to a document_url-type document dict with an inline base64 data URI. Accepts document dicts like:
litellm/ocr/main.py:467
↓ 17 callers
Function
convert_url_to_base64
(url: str)
litellm/litellm_core_utils/prompt_templates/image_handling.py:97
↓ 17 callers
Method
databricks_validate_environment
Validate and configure the Databricks environment. Authentication priority: 1. OAuth M2M (DATABRICKS_CLIENT_ID + DATABRICKS_
litellm/llms/databricks/common_utils.py:304
↓ 17 callers
Function
decode_video_id_with_provider
Decode provider and model_id from encoded video_id.
litellm/types/videos/utils.py:59
↓ 17 callers
Method
delete_many
(self, where)
tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_env_vars.py:930
↓ 17 callers
Function
el
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 17 callers
Method
emit
(self, record)
tests/test_litellm/test_cost_calculation_log_level.py:30
↓ 17 callers
Function
emit_vcr_diagnostic_log
(terminalreporter)
tests/_vcr_conftest_common.py:107
↓ 17 callers
Function
encode_file_id_with_model
Encode a file/batch ID with model routing information. Format: <prefix><base64(litellm:<original_id>;model,<model_name>)> The result pre
litellm/proxy/openai_files_endpoints/common_utils.py:94
↓ 17 callers
Method
enqueue
Add a coroutine to the logging queue. Hot path: never blocks, aggressively clears queue if full.
litellm/litellm_core_utils/logging_worker.py:135
↓ 17 callers
Function
es
(t)
litellm/proxy/_experimental/out/_next/static/chunks/03~yq9q893hmn.js:1
↓ 17 callers
Function
ex
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0lb0p7rh5znu_.js:8
↓ 17 callers
Method
execute_steps
Execute pipeline steps sequentially with conditional actions. Args: steps: Ordered list of pipeline steps mo
litellm/proxy/policy_engine/pipeline_executor.py:37
↓ 17 callers
Method
expand_permission_list
Expand a permission list of server_ids/names/aliases into concrete server_ids against the current region's config + DB registry union
litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:3821
↓ 17 callers
Method
from_env
Read config from the environment, falling back to defaults. An invalid value warns and uses the default rather than failing startup.
litellm-rust/crates/ai-gateway/src/io/realtime_pool.rs:122
↓ 17 callers
Method
getStore
()
litellm/proxy/_experimental/out/_next/static/chunks/0ivj_wax-joap.js:1
↓ 17 callers
Method
get_auth_header
Resolve Anthropic credentials and return the appropriate auth header dict. Checks ANTHROPIC_API_KEY first (-> x-api-key or Bearer depending o
litellm/llms/anthropic/common_utils.py:706
↓ 17 callers
Function
get_budget_reset_time
Get the budget reset time based on the configured timezone. Falls back to UTC if not specified.
litellm/proxy/common_utils/timezone_utils.py:18
↓ 17 callers
Method
get_complete_url
( self, api_base: Optional[str], litellm_params: dict, )
litellm/llms/bedrock_mantle/responses/transformation.py:60
↓ 17 callers
Method
get_deployment_credentials_with_provider
Get API credentials and provider info from a model name in model_list. Useful for passthrough endpoints (files, batches, etc.) that n
litellm/router.py:8289
↓ 17 callers
Function
get_key_model_rpm_limit
Get the model rpm limit for a given api key. Priority order (returns first found): 1. Key metadata (model_rpm_limit) 2. Key model_ma
litellm/proxy/auth/auth_utils.py:816
↓ 17 callers
Method
get_runtime_endpoint
( self, api_base: Optional[str], aws_bedrock_runtime_endpoint: Optional[str],
litellm/llms/bedrock/base_aws_llm.py:1260
↓ 17 callers
Function
get_supported_openai_params
Returns the supported openai params for a given model + provider Example: ``` get_supported_openai_params(model="anthropic.claude-3"
litellm/litellm_core_utils/get_supported_openai_params.py:8
↓ 17 callers
Function
isAdminRole
(role: string)
ui/litellm-dashboard/src/utils/roles.ts:18
↓ 17 callers
Method
isServer
()
litellm/proxy/_experimental/out/_next/static/chunks/15.9ylrtxojbj.js:1
↓ 17 callers
Function
make_client
(**overrides)
tests/test_litellm/integrations/gitlab/test_gitlab_client.py:76
↓ 17 callers
Method
map_cohere_rerank_params
( self, non_default_params: dict, model: str, drop_params: bool, query
litellm/llms/voyage/rerank/transformation.py:29
↓ 17 callers
Method
map_ocr_params
Map OCR parameters to provider-specific parameters.
litellm/llms/base_llm/ocr/transformation.py:110
↓ 17 callers
Method
mask_dict
( self, data: Dict[str, Any], depth: int = 0, max_depth: int = DEFAULT_MAX_REC
litellm/litellm_core_utils/sensitive_data_masker.py:104
↓ 17 callers
Function
model_dump_with_preserved_fields
Serialize a Pydantic model to a dictionary while preserving specific fields even if they are None. Fields listed in _PRESERVED_NONE_FIEL
litellm/proxy/utils.py:6119
↓ 17 callers
Method
pre_call_tool_check
Run pre-call checks and guardrail hooks for an MCP tool call. Returns a dict that may contain: - "arguments": hook-modified
litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:3011
↓ 17 callers
Method
remove
(self, *label_values)
tests/test_litellm/integrations/test_prometheus_end_user_cardinality.py:85
↓ 17 callers
Function
require_successful_call
A call that should have succeeded but didn't is a hard failure, never a skip: if the proxy can't make a call it's expected to, the test must fail.
tests/e2e/e2e_http.py:141
↓ 17 callers
Function
resolve_and_validate_end_user_id
Optionally drop end-user ids that don't resolve to a known DB row. Default: pass-through. LiteLLM's documented pattern is that the `user` fie
litellm/proxy/auth/auth_checks.py:1160
↓ 17 callers
Function
resolve_llm_provider_for_rate_limit
Resolve ``(model, llm_provider)`` for a request being rejected by an internal proxy-side rate-limit hook. These hooks fire from ``async_
litellm/proxy/hooks/rate_limiter_utils.py:15
↓ 17 callers
Method
retrieve
(e,t={},s)
litellm/proxy/_experimental/out/_next/static/chunks/16.oisvgwzo8s.js:7
↓ 17 callers
Method
run_with_session
Open a session, run the provided coroutine, and clean up.
litellm/experimental_mcp_client/client.py:385
↓ 17 callers
Function
send_llm_exception_alert
Only runs if router.slack_alerting_logger is set Sends a Slack / MS Teams alert for the LLM API call failure. Only if router.slack_alerting_l
litellm/router_utils/handle_error.py:23
↓ 17 callers
Function
setup_proxy_logging_object
(monkeypatch, llm_router: Router)
tests/test_litellm/proxy/openai_files_endpoint/test_files_endpoint.py:75
↓ 17 callers
Function
should_redact_message_logging
Determine if message logging should be redacted. Priority order: 1. Dynamic parameter (turn_off_message_logging in request) 2. Heade
litellm/litellm_core_utils/redact_messages.py:217
↓ 17 callers
Function
should_use_polling_for_request
Determine if polling via cache should be used for a request. Args: background_mode: Whether background=true was set in the request
litellm/proxy/response_polling/polling_handler.py:251
↓ 17 callers
Function
spend_log_error
Log a spend-tracking error, with the traceback gated on the env var. By default this behaves like ``verbose_proxy_logger.exception`` — the ac
litellm/proxy/spend_tracking/spend_log_error_logger.py:59
↓ 17 callers
Function
th
(e,t,n,r,l,a,o,i)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 17 callers
Method
transform_request
( self, model: str, messages: List[AllMessageValues], optional_params: dict,
litellm/llms/bedrock/chat/invoke_transformations/anthropic_claude3_transformation.py:127
↓ 17 callers
Method
transform_responses_api_request
Transform the request for Manus API. Manus requires: - `task_mode: "agent"` in the request body - `agent_profile` ex
litellm/llms/manus/responses/transformation.py:123
↓ 16 callers
Function
C
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 16 callers
Function
_async_return
(value)
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_repelloai.py:1135
↓ 16 callers
Function
_coerce_user_id_to_str
Return a usable end-user identifier string, or None if the value isn't one. Always drops non-string structured values (dict/list/tuple/set) becau
litellm/proxy/auth/auth_utils.py:1093
↓ 16 callers
Function
_config
()
tests/test_litellm/llms/fastcrw/search/test_transformation.py:10
↓ 16 callers
Method
_create_anthropic_response_logging_payload
Create the standard logging object for Anthropic passthrough handles streaming and non-streaming responses
litellm/proxy/pass_through_endpoints/llm_provider_handlers/anthropic_passthrough_logging_handler.py:224
↓ 16 callers
Method
_decode_responses_api_response_id
Decode the responses_api_response_id Returns: DecodedResponseId: Structured tuple with custom_llm_provider, model_id, an
litellm/responses/utils.py:421
↓ 16 callers
Method
_get_optional_params
(self, vendor: OCIVendors, optional_params: dict, model: str = "")
litellm/llms/oci/chat/transformation.py:457
↓ 16 callers
Method
_get_span_processor
(self, dynamic_headers: Optional[dict] = None)
litellm/integrations/opentelemetry.py:2750
↓ 16 callers
Function
_greptile_comment
( body: str, updated_at: str = "2026-05-10T00:00:00Z", login: str = "greptile-apps[bot]", )
tests/test_litellm/test_github_close_low_quality_prs.py:35
↓ 16 callers
Function
_invalidate_model_cost_lowercase_map
Invalidate the case-insensitive lookup map for model_cost. Call this whenever litellm.model_cost is modified to ensure the map is rebuilt. Al
litellm/utils.py:4863
↓ 16 callers
Function
_is_user_org_admin_for_team
Check if user is an org admin for the team's organization. Returns True if: - The team belongs to an organization, AND - The user ha
litellm/proxy/management_endpoints/common_utils.py:114
↓ 16 callers
Function
_make_router
()
tests/test_litellm/router_strategy/adaptive_router/test_adaptive_router.py:21
↓ 16 callers
Method
_process_chunk
Process a single chunk of data from the stream
litellm/responses/streaming_iterator.py:116
↓ 16 callers
Function
_resolve_jwt_to_virtual_key
Returns: - ``UserAPIKeyAuth``: a resolved virtual key (cache hit or DB hit). The caller may use this directly; JWT policy has been
litellm/proxy/auth/user_api_key_auth.py:743
↓ 16 callers
Function
_router_with_two_deployments
(blocked_flags)
tests/test_litellm/test_router.py:4881
↓ 16 callers
Function
_run_dispatch
(wrapper: CustomStreamWrapper, chunk)
tests/test_litellm/litellm_core_utils/test_streaming_handler.py:1914
↓ 16 callers
Method
_run_reconnect_cycle
Run a reconnect cycle with a single overall timeout budget. Uses the _engine_confirmed_dead flag (set by waitpid thread / pidfd / po
litellm/proxy/utils.py:4446
↓ 16 callers
Method
_sign_request
Sign a request for Bedrock or Sagemaker Returns: Tuple[dict, Optional[str]]: A tuple containing the headers and the json
litellm/llms/bedrock/base_aws_llm.py:1442
↓ 16 callers
Method
_to_ns
(self, dt)
litellm/integrations/opentelemetry.py:2657
↓ 16 callers
Method
_transform_chat_completion_usage_to_responses_usage
( chat_completion_response: Union[ModelResponse, Usage], )
litellm/responses/litellm_completion_transformation/transformation.py:1943
↓ 16 callers
Method
_transform_messages
(self, messages: List[AllMessageValues], model: str)
litellm/llms/openai/openai.py:208
↓ 16 callers
Function
_u
(name: str)
tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_env_vars.py:21
↓ 16 callers
Function
_user_api_key_auth_builder
( request: Request, api_key: str, azure_api_key_header: str, anthropic_api_key_header: Optiona
litellm/proxy/auth/user_api_key_auth.py:949
↓ 16 callers
Function
a
()
litellm/proxy/_experimental/out/_next/static/chunks/0.4.bbjx7y007.js:1
↓ 16 callers
Function
add_server_prefix_to_name
Add server name prefix to any MCP resource name.
litellm/proxy/_experimental/mcp_server/utils.py:252
↓ 16 callers
Method
aiter_lines
(self)
tests/test_litellm/sandbox/test_e2b_sandbox.py:31
← previous
next →
801–900 of 68,141, ranked by callers