Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/BerriAI/litellm
/ functions
Functions
202,479 in github.com/BerriAI/litellm
⨍
Functions
202,479
◇
Types & classes
26,341
↳
Endpoints
5,595
↓ 165 callers
Function
pin
(tenant: &str, session_id: &str)
litellm-rust/crates/redis-store/src/sensitive_route_pins/keys.rs:1
↓ 163 callers
Method
string
`scanstring` with `strict=True`: control characters must be escaped.
litellm-rust/crates/python-compat/src/json.rs:187
↓ 163 callers
Method
sub
(self, repl: str, string: str, count: int = 0)
tests/unit/test_logging.py:1073
↓ 163 callers
Method
toUpperCase
()
litellm/proxy/_experimental/out/_next/static/chunks/2j7hjtph8n74b.js:1
↓ 163 callers
Method
update_environment_variables
( self, litellm_params: dict, optional_params: dict, model: str | None = None,
litellm/litellm_core_utils/litellm_logging.py:1233
↓ 162 callers
Method
model_dump
(self, *, exclude_none: bool = ...)
tests/integration/providers/_mantle_gpt_prompt_cache_support.py:778
↓ 161 callers
Method
escape
(&mut self)
litellm-rust/crates/python-compat/src/json.rs:213
↓ 161 callers
Method
respond_with
(self, response: object)
tests/unit/proxy/video_endpoints/test_endpoints.py:135
↓ 160 callers
Method
param
(self)
tests/integration/observability/test_otel_excluded_services_matrix.py:43
↓ 160 callers
Method
sort
(self, *args: object, **kwargs: object)
litellm/router_rust/surface/indexes.py:120
↓ 159 callers
Method
dirname
()
litellm/proxy/_experimental/out/_next/static/chunks/14v3irtjifjt2.js:1
↓ 159 callers
Function
eY
(...e)
litellm/proxy/_experimental/out/_next/static/chunks/085r5ieqhajig.js:1
↓ 159 callers
Method
timestamp
(self)
tests/unit/integrations/newrelic/test_newrelic.py:519
↓ 158 callers
Function
get_httpx_client
Retrieves the HTTP client from the cache If not present, creates a new client Caches the new client and returns it.
litellm/llms/custom_httpx/http_handler.py:1989
↓ 158 callers
Method
resolve
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/085r5ieqhajig.js:1
↓ 156 callers
Method
get_supported_openai_params
(self, model)
tests/unit/llms/custom_httpx/test_llm_http_handler.py:4682
↓ 156 callers
Method
sleep
(self, seconds: float)
litellm/router_python_host.py:116
↓ 153 callers
Method
apply
(self, changes: ChangeSet)
tests/unit/proxy/management_endpoints/test_model_management_endpoints.py:3911
↓ 153 callers
Function
completion_cost
Return the USD cost of a LiteLLM call. Pass `completion_response` to price a response LiteLLM returned. Without one, pass `model` plus `
litellm/cost_calculator.py:1783
↓ 152 callers
Method
warn
(self, session: ClientSession)
litellm/llms/custom_httpx/aiohttp_pool_diagnostics.py:59
↓ 151 callers
Method
select
( model: str, request_kwargs: Mapping[str, object], *, kind: L
tests/unit/router_strategy/test_complexity_router.py:6848
↓ 150 callers
Function
id
({draft:e})
litellm/proxy/_experimental/out/_next/static/chunks/1f2vcab0yti03.js:53
↓ 150 callers
Method
json
(self)
litellm/llms/sap/credentials.py:392
↓ 150 callers
Method
reload
(self)
litellm/proxy/db/pgbouncer.py:629
↓ 150 callers
Method
update
(self, where: Dict[str, Any], data: Dict[str, Any])
tests/unit/repositories/test_repositories.py:98
↓ 149 callers
Method
focus
()
litellm/proxy/_experimental/out/_next/static/chunks/085r5ieqhajig.js:1
↓ 149 callers
Method
toString
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 148 callers
Method
setdefault
(self, key: object, default: object = None)
litellm/router_rust/surface/indexes.py:182
↓ 147 callers
Function
act
(page: Page)
tests/e2e/perf/setup/ui_journeys.py:342
↓ 146 callers
Function
get_logging_payload
( kwargs: dict | None, response_obj: object, start_time: datetime, end_time: datetime, llm
litellm/proxy/spend_tracking/spend_tracking_utils.py:612
↓ 145 callers
Method
time
(self)
tests/unit/llms/custom_httpx/test_http_handler.py:2458
↓ 144 callers
Function
completion
()
tests/unit/litellm_core_utils/prompt_templates/test_litellm_core_utils_prompt_templates_factory.py:6276
↓ 144 callers
Method
group
(self, name: str)
tests/integration/spend/test_router_cooldown_failure_row.py:62
↓ 144 callers
Method
settings
(self)
tests/unit/router_utils/test_fallback_event_handlers.py:63
↓ 143 callers
Method
start
(self, ctx: SessionContext)
tests/unit/harness/core_fakes.py:179
↓ 142 callers
Function
attempt
The response, or the error the core raised. A request the Rust core does not serve yet propagates, so the test is skipped rather than failed.
tests/unit/test_router/core/retries_health_helpers.py:81
↓ 142 callers
Method
reset
Empty the host's success and failure callback lists (every entry, not only this core's), drop the retry policy and flush the caches.
litellm/router_rust/core.py:2341
↓ 142 callers
Method
respond
(self, request: httpx.Request)
tests/unit/proxy/guardrails/guardrail_hooks/test_wingback.py:197
↓ 140 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:6810
↓ 140 callers
Method
bind
(self, call_id: str)
litellm/proxy/telemetry/request_context.py:29
↓ 140 callers
Method
endsWith
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/2j7hjtph8n74b.js:1
↓ 140 callers
Method
model_dump
(self)
litellm/proxy/mcp_server/utils.py:707
↓ 140 callers
Method
type
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 139 callers
Method
_handle_error
( self, e: Exception, provider_config: Union[ BaseConfig, Base
litellm/llms/custom_httpx/llm_http_handler.py:6693
↓ 139 callers
Function
generate_mock_user_api_key_auth
Generate a mock UserAPIKeyAuth object
tests/unit/proxy/management_endpoints/test_mcp_management_endpoints.py:107
↓ 138 callers
Method
flush
(self)
tests/unit/telemetry/test_consent.py:50
↓ 137 callers
Function
Field
({ className, orientation = "vertical", ...props }: React.ComponentProps<"div"> & VariantProps<typeof fi
ui/litellm-dashboard/src/components/ui/field.tsx:66
↓ 137 callers
Function
is_request_body_safe
Check if the request body is safe. A malicious user can set the api_base to their own domain and invoke POST /chat/completions to intercept
litellm/proxy/auth/auth_utils.py:775
↓ 137 callers
Function
replace
(gateway: Gateway, name: str, body: Mapping[str, JsonValue], *, key: str | None = None)
tests/integration/management/test_claude_code_plugin_installation_preference.py:68
↓ 136 callers
Method
dict
(self, *, exclude_none: bool)
tests/unit/proxy/mcp_server/test_semantic_tool_filter.py:2265
↓ 136 callers
Function
exception_type
Maps an LLM Provider Exception to OpenAI Exception Format
litellm/litellm_core_utils/exception_mapping_utils.py:2539
↓ 136 callers
Method
group
( self, name: str, *, field: Literal["info", "cached_info"] = "info",
litellm/router_api.py:922
↓ 136 callers
Function
unquote
(raw: string)
ui/litellm-dashboard/src/components/shared/search/language.ts:59
↓ 135 callers
Method
add
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0tx19jeq-wskb.js:2
↓ 135 callers
Method
reset
()
litellm/proxy/_experimental/out/_next/static/chunks/0tx19jeq-wskb.js:2
↓ 132 callers
Method
isNaN
()
litellm/proxy/_experimental/out/_next/static/chunks/2aatum0yo4cv8.js:1
↓ 131 callers
Method
post_call
( self, *, original_response: object, input: Sequence[AllMessageValues],
litellm/llms/microsoft_365_copilot/chat/handler.py:67
↓ 131 callers
Function
register_scenario
(scenario_id: str, response: StoredResponse, *, control_url: str = CONTROL_URL)
tests/integration/_support/upstream.py:874
↓ 129 callers
Method
async_post_call_success_hook
(self, data: dict, user_api_key_dict: UserAPIKeyAuth, response: Any)
tests/unit/proxy/guardrails/test_deferred_guardrail_logging.py:113
↓ 129 callers
Function
get_optional_params
( # use the openai defaults # https://platform.openai.com/docs/api-reference/chat/create model: st
litellm/utils.py:5553
↓ 129 callers
Method
is_empty
(&self)
litellm-rust/crates/config/src/value.rs:21
↓ 129 callers
Method
replacing_worker
(self, pid: int)
tests/integration/_support/process.py:330
↓ 128 callers
Method
filter
(self, record: logging.LogRecord)
tests/rust-python-harness/shared/reporting/ui.py:20
↓ 127 callers
Method
at
(self, now: datetime)
litellm/types/proxy/skill_scanning.py:75
↓ 127 callers
Method
model
(self)
tests/integration/authorization/test_team_admin_gate.py:96
↓ 127 callers
Method
token_counter
(self, key: str, body: TokenCounterBody)
tests/e2e/proxy_client.py:1095
↓ 126 callers
Method
async_pre_routing_hook
Pre-routing hook called before the routing decision. When `session_affinity` is enabled and a session_id is resolvable on the reques
litellm/router_strategy/complexity_router/complexity_router.py:4497
↓ 126 callers
Method
done
()
tests/unit/test_router/core/scripted_host.py:329
↓ 126 callers
Method
encode
( self, text: str, *, allowed_special: AllowedSpecial = frozenset(), d
litellm/litellm_core_utils/tokenizer.py:85
↓ 125 callers
Method
async_set_cache
Inside a request the Redis SET rides the request's pipeline (memory is written at once); anywhere else, or with options the pipeline does not
litellm/proxy/common_utils/user_api_key_cache.py:312
↓ 125 callers
Method
concat
(...e)
litellm/proxy/_experimental/out/_next/static/chunks/2aatum0yo4cv8.js:1
↓ 125 callers
Method
now
(cls, tz=None)
tests/unit/integrations/azure_storage/test_azure_storage.py:583
↓ 124 callers
Method
sleep
(self, seconds: float)
tests/unit/proxy/management_endpoints/test_access_group_management.py:698
↓ 124 callers
Method
stream
()
tests/integration/_support/upstream.py:599
↓ 123 callers
Function
build
(make_core: MakeCore, **arguments: object)
tests/unit/test_router/core/fallbacks_helpers.py:23
↓ 122 callers
Method
create
(self, template: Database | None = None, schema: str = "public")
tests/e2e/migrations/database.py:140
↓ 122 callers
Method
exit
(self)
tests/unit/test_router/test_router.py:12598
↓ 121 callers
Method
aclassify
Classify a prompt by complexity, using the LLM classifier when configured. Falls back to the local heuristic scorer if classifier_ty
litellm/router_strategy/complexity_router/complexity_router.py:2068
↓ 121 callers
Function
field
(description: str, **extra: JsonValue)
tests/integration/_support/claude_code.py:55
↓ 121 callers
Method
min
Python's `min` over numbers: the first of the smallest, keeping its type.
litellm-rust/crates/redis-store/src/number.rs:59
↓ 120 callers
Method
add_span_processor
(self, span_processor)
tests/unit/integrations/otel/test_otel_v2_destinations.py:2168
↓ 120 callers
Function
normalize
Replace volatile field values with "<VOLATILE>" so dict equality works. Recursive over dicts and lists. Pass an explicit ``volatile`` set to
tests/unit/proxy/proxy_server/conftest.py:54
↓ 120 callers
Method
read
(self)
tests/integration/compatibility/test_status_code_followups.py:85
↓ 120 callers
Method
reset
Called first thing in every test's setup phase, so each test starts empty.
tests/e2e/e2e_metadata.py:250
↓ 119 callers
Function
convert_to_model_response_object
( response_object: dict | None = None, model_response_object: ModelResponse | EmbeddingResponse
litellm/litellm_core_utils/llm_response_utils/convert_dict_to_response.py:733
↓ 119 callers
Method
process_mcp_request
Process and validate MCP request headers from the ASGI scope. This includes: 1. Extracting and validating authentication head
litellm/proxy/mcp_server/auth/user_api_key_auth_mcp.py:689
↓ 119 callers
Method
timestamp
(self)
litellm/integrations/newrelic/newrelic.py:71
↓ 118 callers
Function
MakeRequest
MakeRequest is a helper function to make HTTP requests
terraform/provider/litellm/utils.go:93
↓ 118 callers
Function
encrypt_value_helper
(value: str, new_encryption_key: str | None = None)
litellm/proxy/common_utils/encrypt_decrypt_utils.py:204
↓ 118 callers
Method
load_servers_from_config
Load the MCP Servers from the config Args: mcp_servers_config: Dictionary of MCP server configurations mcp_a
litellm/proxy/mcp_server/mcp_server_manager.py:2560
↓ 118 callers
Method
stream
(self, model: str, marker: str)
tests/integration/providers/test_vertex_passthrough_stream_wire.py:52
↓ 118 callers
Method
walk
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 116 callers
Method
date
(e)
litellm/proxy/_experimental/out/_next/static/chunks/2j7hjtph8n74b.js:1
↓ 116 callers
Method
len
(&self)
litellm-rust/crates/config/src/value.rs:25
↓ 116 callers
Method
wait
(self)
tests/unit/llms/pi/harness/test_transformation.py:121
↓ 115 callers
Function
generic_cost_per_token
Calculates the cost per token for a given model, prompt tokens, and completion tokens. Handles context caching as well. Input:
litellm/litellm_core_utils/llm_cost_calc/utils.py:1566
↓ 115 callers
Function
get_secret
( secret_name: str, default_value: str | bool | None = None, )
litellm/secret_managers/main.py:359
↓ 114 callers
Method
__new__
(cls, reference: str, origins: frozenset[str])
litellm/types/utils.py:4509
↓ 114 callers
Method
exec
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 114 callers
Function
n
(n)
litellm/proxy/_experimental/out/_next/static/chunks/0r8bcbns1_gw5.js:1
← previous
next →
301–400 of 202,479, ranked by callers