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
↓ 17 callers
Method
gateways
(self, count: int)
tests/integration/management/test_batch_file_usage_caps.py:97
↓ 17 callers
Function
get_access_token
Get valid access token, using cache if available. Args: credentials: Base64-encoded credentials (client_id:client_secret) sc
litellm/llms/gigachat/authenticator.py:77
↓ 17 callers
Function
get_cooldown_deployments
Get the list of models being cooled down for this minute
litellm/router_utils/cooldown_handlers.py:704
↓ 17 callers
Function
get_dummy_thought_signature
Generate a dummy thought signature for models that require it. This is used when transferring conversation history from older models (like ge
litellm/litellm_core_utils/prompt_templates/factory.py:1332
↓ 17 callers
Function
get_guardrail_translation_mapping
Get the guardrail translation handler for a given call type. Args: call_type: The type of call (e.g., completion, acompletion, anthr
litellm/llms/__init__.py:219
↓ 17 callers
Function
get_model_latest_aliases
``{provider: {alias: target}}`` for every alias row in the cost map, with provider prefixes stripped
litellm/litellm_core_utils/model_latest_aliases.py:35
↓ 17 callers
Method
get_openai_client
( self, api_key: str | None, api_base: str | None, timeout: float | httpx.Time
litellm/llms/openai/openai.py:1792
↓ 17 callers
Method
get_provider_specific_headers
Get the provider specific headers for the given custom llm provider. Accepts either a single ProviderSpecificHeader or a sequence of
litellm/litellm_core_utils/get_provider_specific_headers.py:30
↓ 17 callers
Function
get_request_model_access_groups
Model access groups that authorized this request, as stamped onto request metadata at auth time.
litellm/proxy/spend_tracking/spend_tracking_utils.py:474
↓ 17 callers
Method
get_runtime_endpoint
( self, api_base: str | None, aws_bedrock_runtime_endpoint: str | None, aws_re
litellm/llms/bedrock/base_aws_llm.py:1456
↓ 17 callers
Method
get_stats
(self)
litellm/proxy/middleware/admission_control_middleware.py:82
↓ 17 callers
Function
ident
A provider-shaped id (`chatcmpl-...`, `msg_...`, `toolu_...`) that is a pure function of the seed.
tests/e2e/perf/setup/mocks/reply_common.py:53
↓ 17 callers
Function
install_aliases
(gateway: Gateway, aliases: Mapping[str, JsonValue])
tests/integration/authorization/_hidden_alias_budget.py:287
↓ 17 callers
Function
invalidate_team_member_spend_state
Clear every cached read path for one team member's budget so a spend reset or a raised cap takes effect on the next request instead of wa
litellm/proxy/auth/auth_checks.py:3284
↓ 17 callers
Function
isAdminRole
(role: string)
ui/litellm-dashboard/src/utils/roles.ts:27
↓ 17 callers
Function
isClientForwardedTokenMode
(authType?: string | null)
ui/litellm-dashboard/src/components/mcp_tools/types.tsx:71
↓ 17 callers
Function
is_batch_retrieve_call_type
A batch retrieve reports the whole job's token usage, which the provider spent asynchronously over the life of the batch, and reports it agai
litellm/litellm_core_utils/batch_utils.py:293
↓ 17 callers
Method
is_empty
(self)
litellm/integrations/ternary/export_engine.py:45
↓ 17 callers
Function
is_unbilled_non_inference_call
A read/management route priced at zero, because the usage it reports belongs to the call that created the object it just read. A background r
litellm/litellm_core_utils/internal_call_metadata.py:123
↓ 17 callers
Method
json
(self)
tests/unit/llms/xai/test_xai_key_fallback.py:279
↓ 17 callers
Function
l
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/3yrgf44a9g52e.js:1
↓ 17 callers
Method
len
The number of stored entries, expired ones included until they are evicted.
litellm-rust/crates/cache-memory/src/cache.rs:164
↓ 17 callers
Function
log_llm_api_exception
(e: Exception, litellm_call_id: str | None)
litellm/proxy/common_request_processing.py:2150
↓ 17 callers
Method
log_success_event
(self, kwargs, response_obj, start_time, end_time)
litellm/router_strategy/lowest_latency.py:79
↓ 17 callers
Function
make_client
(**overrides)
tests/unit/integrations/gitlab/test_gitlab_client.py:71
↓ 17 callers
Method
map_openai_params
( self, non_default_params: dict, optional_params: dict, model: str, d
litellm/llms/azure_ai/image_generation/mai_transformation.py:208
↓ 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:125
↓ 17 callers
Function
matched_ids
Every payload must be accountable to an answered request by response id or litellm_call_id.
tests/integration/observability/_s3_v2_support.py:352
↓ 17 callers
Function
message_id
(events: tuple[SseEvent, ...])
tests/integration/_support/anthropic_sse.py:160
↓ 17 callers
Method
messages_to_responses_input
Convert standard chat messages format to OpenAI Responses API input format. Returns: (input_items, instructions) tuple w
litellm/llms/openai/responses/count_tokens/transformation.py:258
↓ 17 callers
Method
model_dump
(self)
litellm/proxy/agent_endpoints/agent_registry.py:94
↓ 17 callers
Method
model_dump
(self)
litellm/proxy/management_endpoints/model_management_endpoints.py:329
↓ 17 callers
Function
new_marker
()
tests/integration/routing/_reasoning_effort_levels_support.py:43
↓ 17 callers
Function
offload_token_count
( function: Callable[T_ParamSpec, T_Retval], )
litellm/litellm_core_utils/token_counter.py:787
↓ 17 callers
Function
one_new_pin
(redis: Redis, before: frozenset[str])
tests/integration/routing/_prompt_cache_pin_support.py:101
↓ 17 callers
Method
owned_by_config
(self, key: str)
litellm/proxy/config_resolvers/settings_store.py:66
↓ 17 callers
Method
payload
(self)
tests/unit/proxy/hooks/test_autorouter_baseline_cache.py:205
↓ 17 callers
Function
peer_of
(kind: PeerKind, *, rich: bool = False)
tests/integration/_support/mcp.py:476
↓ 17 callers
Method
periodic_flush
Report in straight away, then flush on the interval as usual. The inherited loop sleeps first, so a proxy that has just loaded the c
litellm/integrations/pointfive/logger.py:153
↓ 17 callers
Function
prepare_bundle
Start a fresh bundle at ``root`` for record mode: wipe whatever bundle is there and write a new manifest. Refuses to wipe a directory that is neit
tests/e2e/fixture_bundle.py:182
↓ 17 callers
Method
process_input_messages
( self, data: dict[str, object], guardrail_to_apply: "CustomGuardrail", litell
litellm/proxy/mcp_server/guardrail_translation/handler.py:140
↓ 17 callers
Method
profile
(self, reply: Reply)
tests/integration/authorization/test_sso_blank_identity.py:75
↓ 17 callers
Function
project
(row: Mapping[str, object])
litellm/accounting/projection.py:196
↓ 17 callers
Function
realtime_guardrail_verdict
( texts: tuple[str, ...], role: str, event_hooks: Sequence["GuardrailEventHooks"], request_dat
litellm/litellm_core_utils/realtime_guardrails.py:271
↓ 17 callers
Function
refetch_model_cost_map
Re-fetch the model cost map for a runtime reload, retrying transient HTTP errors (429/5xx/transport) with Retry-After-aware backoff. Unl
litellm/litellm_core_utils/get_model_cost_map.py:444
↓ 17 callers
Function
registered
(scenario: Scenario, name: str, **fields: JsonValue)
tests/integration/management/test_claude_code_plugin_installation_preference.py:63
↓ 17 callers
Method
render
Render a prompt template with the given variables. Args: prompt_id: The ID of the prompt template to render
litellm/integrations/dotprompt/prompt_manager.py:209
↓ 17 callers
Function
render_jsonl
(model: str)
tests/e2e/batches/test_batches_e2e.py:164
↓ 17 callers
Method
reset
(self)
tests/integration/providers/test_strands_decider_agentcore_wire.py:223
↓ 17 callers
Function
resolve
(yaml: &str, environment: &[(&str, &str)])
litellm-rust/crates/gateway/src/redis/surface_tests.rs:55
↓ 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:33
↓ 17 callers
Method
resolve_prompt_spec
Resolve a prompt spec by base prompt id, optional version, and optional environment. With no environment, resolves within the defaul
litellm/proxy/prompts/prompt_registry.py:267
↓ 17 callers
Function
responses_route
( secrets: Arc<dyn SecretSource>, )
litellm-rust/crates/inference-responses/tests/support/mod.rs:19
↓ 17 callers
Function
restore
()
tests/e2e/ui/tests/proxy-admin/teams.spec.ts:182
↓ 17 callers
Function
restore_generalizations
Save the active rules, let the test install its own, then restore.
tests/unit/litellm_core_utils/test_fallback_generalizations.py:33
↓ 17 callers
Method
run
(self)
tests/unit/litellm_proxy_extras/test_litellm_proxy_extras_utils.py:1100
↓ 17 callers
Method
rust
(self)
tests/unit/rust_bridge/test_runtime.py:50
↓ 17 callers
Method
safe_set_attribute
Safely sets an attribute on the span, ensuring the value is a primitive type.
litellm/integrations/opentelemetry.py:2838
↓ 17 callers
Function
sanitize_messages_for_tool_calling
Sanitize messages for tool calling to handle common issues when modify_params=True: Case A: Missing tool_result for tool_use (orphaned tool
litellm/litellm_core_utils/prompt_templates/factory.py:2723
↓ 17 callers
Function
scope
(descriptor: &str, value: &str)
litellm-rust/crates/redis-store/tests/rate_limits.rs:106
↓ 17 callers
Function
scratch_database
A deployment stopped before `release`, with DATABASE_URL pointed at it so ProxyExtrasDBManager upgrades it like a booting proxy.
tests/integration/database/migrations/test_request_log_indexes.py:143
↓ 17 callers
Method
send
(self, message: str | bytes)
tests/unit/llms/vertex_ai/audio_transcription/test_vertex_ai_realtime_transformation.py:374
↓ 17 callers
Method
send
(&self)
litellm-rust/crates/python-bridge/src/redis/store/request.rs:53
↓ 17 callers
Method
set_cost_breakdown
Helper method to store cost breakdown in the logging object. Args: input_cost: Cost of input/prompt tokens o
litellm/litellm_core_utils/litellm_logging.py:2059
↓ 17 callers
Method
set_response_headers
( self, response: object, model_group: str | None, request_kwargs: Mapping[str, object] )
litellm/router_rust/core.py:1400
↓ 17 callers
Function
spend_row
(call_id: str)
tests/integration/_support/responses_stream.py:195
↓ 17 callers
Function
split_sse_lines
(text: str)
litellm/llms/custom_httpx/sse_lines.py:60
↓ 17 callers
Method
start
( self, settings: ROISettings, repository: _ReportRepository, spend_reader: Sp
litellm/proxy/roi_calculator/sync.py:443
↓ 17 callers
Function
status_reply
(status: int)
tests/integration/_support/anthropic_sse.py:127
↓ 17 callers
Function
supports_openai_prompt_cache_breakpoint
( model: str, custom_llm_provider: str | None = None, model_info: Mapping[str, object] | None = None )
litellm/integrations/anthropic_cache_control_hook.py:360
↓ 17 callers
Method
targets
(self)
tests/integration/_support/forward_proxy.py:30
↓ 17 callers
Method
team_info
(self, team_id: str)
tests/e2e/management/management_client.py:372
↓ 17 callers
Function
team_member_delete
[BETA] delete members (either via user_email or user_id) from a team If user doesn't exist, an exception will be raised ``` cur
litellm/proxy/management_endpoints/team_endpoints.py:3952
↓ 17 callers
Function
timed_with_loop_lags
(run: Callable[[], Awaitable[T]])
tests/unit/litellm_core_utils/event_loop_lag.py:25
↓ 17 callers
Function
to_call_tool_result
(outcome: ToolOutcome, compat: WireCompat)
litellm/proxy/mcp_server/result_conversion.py:69
↓ 17 callers
Method
transform
(e)
litellm/proxy/_experimental/out/_next/static/chunks/2j7hjtph8n74b.js:1
↓ 17 callers
Method
transform_retrieve_file_request
( self, file_id: str, optional_params: Mapping[str, object], litellm_params: M
litellm/llms/xai/files/transformation.py:170
↓ 17 callers
Function
truncate_tool_name
Truncate tool names that exceed OpenAI's 64-character limit. Uses format: {55-char-prefix}_{8-char-hash} to avoid collisions when multip
litellm/llms/anthropic/messages/adapters/transformation.py:99
↓ 17 callers
Function
typed
A ``Deployment`` built from the same entry ``scripted_host.deployment`` returns.
tests/unit/test_router/core/registry_helpers.py:27
↓ 17 callers
Method
update
( self, where: Mapping[str, object], data: Mapping[str, object], include: Mapping[str, object] | None
tests/unit/proxy/management_endpoints/test_team_endpoints.py:18176
↓ 17 callers
Function
update_config_general_settings
Update a specific field in litellm general settings
litellm/proxy/proxy_server.py:20775
↓ 17 callers
Method
upload_data_to_s3
(self, batch_logging_element: s3BatchLoggingElement)
litellm/integrations/s3_v2.py:947
↓ 17 callers
Function
upstream_compact_body
(text: str, extra: Mapping[str, JsonValue])
tests/integration/authorization/_responses_compact.py:104
↓ 17 callers
Method
visit
(directory: &Path, files: &mut Vec<PathBuf>)
litellm-rust/crates/cache-disk/tests/cache.rs:47
↓ 17 callers
Method
which
(self, binary: str)
tests/unit/harness/core_fakes.py:96
↓ 17 callers
Method
write
(self, data: bytes)
tests/unit/llms/pi/harness/test_transformation.py:99
↓ 16 callers
Function
C
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 16 callers
Function
C
()
litellm/proxy/_experimental/out/_next/static/chunks/085r5ieqhajig.js:1
↓ 16 callers
Method
__init__
(self)
tests/unit/proxy/guardrails/test_deferred_guardrail_logging.py:74
↓ 16 callers
Method
_add_deployment
Iterate through db models for any not in router - add them. Return - number of deployments added
litellm/proxy/proxy_server.py:7981
↓ 16 callers
Function
_answers
(transcript: str)
tests/unit/llms/nvidia_riva/audio_transcription/test_handler.py:204
↓ 16 callers
Function
_append
()
tests/unit/llms/soniox/realtime/test_soniox_realtime_transformation.py:45
↓ 16 callers
Function
_as_mapping
(value: object)
litellm/litellm_core_utils/redact_messages.py:245
↓ 16 callers
Function
_assert_jittered_backoff
Each retry waits a jittered exponential backoff: attempt n sleeps somewhere in [2**n / 2, 2**n * 1.5).
tests/unit/integrations/test_s3_v2.py:39
↓ 16 callers
Function
_assert_stream_request
(wire: Wire, target: str = _STREAM_TARGET)
tests/integration/providers/test_bedrock_converse_stream_event_frames_wire.py:286
↓ 16 callers
Function
_async_return
(value)
tests/unit/proxy/guardrails/guardrail_hooks/test_repelloai.py:1190
↓ 16 callers
Function
_backend
(client: _FakeSpeechClient, **kwargs: object)
tests/unit/llms/vertex_ai/audio_transcription/test_vertex_ai_realtime_backend.py:109
↓ 16 callers
Function
_base_config
(**overrides: Any)
tests/unit/proxy/client/cli/autoroute/test_config.py:32
↓ 16 callers
Function
_base_url
()
tests/integration/database/migrations/test_invalid_index_repair.py:32
↓ 16 callers
Function
_body
(request: Request)
tests/integration/providers/test_gemini_anyof_null_branches_wire.py:189
← previous
next →
3,501–3,600 of 202,479, ranked by callers