Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/BerriAI/litellm
/ functions
Functions
71,069 in github.com/BerriAI/litellm
⨍
Functions
71,069
◇
Types & classes
10,227
↳
Endpoints
1,754
↓ 16 callers
Method
model_dump
Default to exclude_unset to avoid Pydantic serializer warnings for OpenAIObject-derived types.
litellm/types/utils.py:1756
↓ 16 callers
Function
o
(t,e)
litellm/proxy/_experimental/out/_next/static/chunks/0ys10755n8os_.js:1
↓ 16 callers
Function
prompt_factory
( model: str, messages: list, custom_llm_provider: Optional[str] = None, api_key: Optional[str
litellm/litellm_core_utils/prompt_templates/factory.py:5218
↓ 16 callers
Method
redact_standard_logging_payload_from_model_call_details
Redacts or excludes fields from StandardLoggingPayload before callbacks receive it. This method handles two features: 1. tur
litellm/integrations/custom_logger.py:835
↓ 16 callers
Method
reset
()
litellm/proxy/_experimental/out/_next/static/chunks/011mgw.-67gs_.js:1
↓ 16 callers
Method
resume
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0nnx~7-7e5t~1.js:1
↓ 16 callers
Function
sanitizeUrl
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 16 callers
Method
save_config
(self, new_config: dict)
litellm/proxy/proxy_server.py:3633
↓ 16 callers
Method
setup_uoft_guardrail
Setup guardrail with all UofT patterns (mimics the policy template sub-guardrail)
tests/test_litellm/proxy/guardrails/guardrail_hooks/content_filter/test_uoft_policy_e2e.py:19
↓ 16 callers
Method
subtract
(s,o)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 16 callers
Method
transform_embedding_response
( self, model: str, raw_response: httpx.Response, model_response: EmbeddingRes
litellm/llms/oci/embed/transformation.py:248
↓ 16 callers
Method
transform_responses_api_tools_to_chat_completion_tools
Transform a Responses API tools into a Chat Completion tools
litellm/responses/litellm_completion_transformation/transformation.py:1279
↓ 16 callers
Method
translate_generate_content_to_completion
Transform generate_content request to litellm completion format Args: model: The model name contents: Genera
litellm/google_genai/adapters/transformation.py:177
↓ 16 callers
Method
translate_thinking_to_reasoning
Convert Anthropic thinking param to Responses API reasoning param. ``thinking.budget_tokens`` is bucketed via the shared ``r
litellm/llms/anthropic/experimental_pass_through/responses_adapters/transformation.py:242
↓ 16 callers
Function
update_key_fn
Update an existing API key's parameters. Parameters: - key: str - The key to update - key_alias: Optional[str] - User-friendly key a
litellm/proxy/management_endpoints/key_management_endpoints.py:2464
↓ 16 callers
Function
verify_password
Verify a password against a stored hash. Supports scrypt and SHA256.
litellm/proxy/utils.py:5061
↓ 15 callers
Function
M
(t)
litellm/proxy/_experimental/out/_next/static/chunks/03~yq9q893hmn.js:1
↓ 15 callers
Method
_build_encrypted_item_id
Encode model_id into an output item ID for encrypted-content items. Format: ``encitem_{base64("litellm:model_id:{model_id};item_id:{original_
litellm/responses/utils.py:234
↓ 15 callers
Method
_build_response_from_payload
Shared response-building logic (also used by the handler).
litellm/llms/soniox/audio_transcription/transformation.py:188
↓ 15 callers
Function
_build_sampling_request
Build a synthetic FastAPI Request for sampling sub-calls. Converts the original MCP connection's HTTP headers into ASGI scope format so that
litellm/proxy/_experimental/mcp_server/sampling_handler.py:935
↓ 15 callers
Method
_call_regular_mcp_tool
Call a regular MCP tool using the MCP client. Args: mcp_server: The MCP server configuration original_tool_n
litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:3491
↓ 15 callers
Method
_create_aiohttp_transport
Creates an AiohttpTransport with RequestNotRead error handling Note: aiohttp TCPConnector ssl parameter accepts: - SSLContex
litellm/llms/custom_httpx/http_handler.py:980
↓ 15 callers
Function
_default_date_range
Return (start_date, end_date) for the common 7-day range used in UI spend tests.
tests/test_litellm/proxy/spend_tracking/test_spend_management_endpoints.py:23
↓ 15 callers
Method
_enhance_usage_with_perplexity_fields
Extract citation tokens and search queries from Perplexity API response and add them to the usage object using standard LiteLLM field
litellm/llms/perplexity/chat/transformation.py:106
↓ 15 callers
Function
_enrich_http_exception_with_guardrail_context
If `exc` is an HTTPException with a dict `detail`, mutate it in place to add `guardrail_name` and `guardrail_mode` taken from the callback in
litellm/proxy/utils.py:343
↓ 15 callers
Function
_extract_converse_texts
Walk a Bedrock Converse request body and collect text content. Returns (texts, holders) where each holder is the (container, key) pair t
litellm/llms/bedrock/passthrough/guardrail_translation/handler.py:76
↓ 15 callers
Function
_full_upstream_card
()
tests/test_litellm/proxy/a2a/test_agent_card.py:14
↓ 15 callers
Function
_get_prisma_client_or_raise_exception
Check if database is connected and raise HTTPException if not.
litellm/proxy/management_endpoints/scim/scim_v2.py:146
↓ 15 callers
Method
_get_tools_from_server
Helper method to get tools from a single MCP server with prefixed names. Args: server (MCPServer): The server to query t
litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:2191
↓ 15 callers
Function
_is_model_cost_zero
Check if a model has zero cost (no configured pricing). Uses the router's get_model_group_info method to get pricing information. Args:
litellm/proxy/auth/auth_checks.py:151
↓ 15 callers
Function
_make_checker
()
tests/test_litellm/test_check_licenses.py:36
↓ 15 callers
Function
_make_instruction_server
( server_id="s1", name="s1", *, alias=None, server_name=None, instructions=None, s
tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_server.py:4638
↓ 15 callers
Function
_make_prisma_with_existing
Build a MagicMock prisma_client whose user-credentials table returns ``row`` for find_unique and behaves async-correctly for upsert/find_many.
tests/test_litellm/proxy/_experimental/mcp_server/test_db_credentials.py:43
↓ 15 callers
Function
_make_sync_client
()
tests/test_litellm/interactions/test_agents_http_handler.py:54
↓ 15 callers
Function
_make_wrapper
( chunks: list, provider: str = "anthropic", async_stream: bool = False, )
tests/test_litellm/litellm_core_utils/test_streaming_overhead.py:88
↓ 15 callers
Method
_mask_response_create
Enforce the authorized model and apply Presidio PII masking to a ``response.create`` message before it is forwarded to the upstream
litellm/responses/streaming_iterator.py:1329
↓ 15 callers
Function
_mock_inspect_response
( json_body: dict, *, status: int = 200, url: str = CHAT_URL )
tests/test_litellm/proxy/guardrails/guardrail_hooks/_cisco_ai_defense_test_utils.py:71
↓ 15 callers
Method
_parse_gcs_uri
Validate a managed GCS file_id and return (bucket, url-encoded-object-path).
litellm/llms/vertex_ai/files/transformation.py:505
↓ 15 callers
Function
_redact_response
( *, sanitized_text=None, sanitized_messages=None, sanitized_mcp_arguments=None, sanitized
tests/test_litellm/proxy/guardrails/guardrail_hooks/_cisco_ai_defense_test_utils.py:177
↓ 15 callers
Function
_sent
Subset of the call kwargs limited to `keys`, for exact comparison.
tests/test_litellm/batches/test_main.py:484
↓ 15 callers
Method
_to_model_list
Convert a list of database records to domain models.
litellm/repositories/base_repository.py:53
↓ 15 callers
Function
a
()
litellm/proxy/_experimental/out/_next/static/chunks/0e9hs7onyj28m.js:1
↓ 15 callers
Method
abort
()
litellm/proxy/_experimental/out/_next/static/chunks/0nnx~7-7e5t~1.js:1
↓ 15 callers
Method
acreate_file
(self, *args, **kwargs)
tests/batches_tests/test_batch_rate_limits.py:704
↓ 15 callers
Method
add
(self, report: LocationReport)
litellm/proxy/management_endpoints/credential_migration.py:85
↓ 15 callers
Method
aimage_generation
( self, model: str, prompt: str, api_key: Optional[str], api_base: Opt
tests/local_testing/test_custom_llm.py:249
↓ 15 callers
Function
apply_policies
Apply guardrails to inputs from policy names and/or a direct list of guardrail names. Runs all guardrails in order; if one fails, the error
litellm/proxy/management_endpoints/policy_endpoints/endpoints.py:114
↓ 15 callers
Method
async_log_failure_event
(self, kwargs, response_obj, start_time, end_time)
tests/test_litellm/proxy/test_litellm_pre_call_utils.py:2294
↓ 15 callers
Method
async_logging_hook
For masking logged request/response. Return a modified version of the request/result.
litellm/integrations/custom_logger.py:426
↓ 15 callers
Function
authorize
( request: Request, redirect_uri: str, client_id: Optional[str] = None, state: str = "", m
litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py:857
↓ 15 callers
Function
callback
Actual callback function that Boto3 will call.
litellm/llms/bedrock/common_utils.py:331
↓ 15 callers
Method
check_responses_cost
Check if background responses are complete and track their cost. - Get all status="queued" or "in_progress" and file_purpose="respons
enterprise/litellm_enterprise/proxy/common_utils/check_responses_cost.py:85
↓ 15 callers
Method
chunk_parser
Parse a Responses API streaming chunk and convert to OpenAI format. Args: chunk: Dict containing the Responses API event
litellm/completion_extras/litellm_responses_transformation/transformation.py:1373
↓ 15 callers
Method
de_anonymize_event_stream
( body_bytes: bytes, proxy_logging_obj: "ProxyLogging", user_api_key_dict: "UserAPIKey
litellm/llms/pass_through/guardrail_translation/handler.py:291
↓ 15 callers
Function
e
(t)
litellm/proxy/_experimental/out/_next/static/chunks/03~yq9q893hmn.js:1
↓ 15 callers
Function
e9
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 15 callers
Function
eE
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0lb0p7rh5znu_.js:8
↓ 15 callers
Function
ei
(t,e,r)
litellm/proxy/_experimental/out/_next/static/chunks/03~yq9q893hmn.js:1
↓ 15 callers
Function
f
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0e9hs7onyj28m.js:1
↓ 15 callers
Function
fetchAvailableModels
(accessToken: string)
ui/litellm-dashboard/src/components/llm_calls/fetch_models.tsx:13
↓ 15 callers
Function
fn
(t,e,r,n)
litellm/proxy/_experimental/out/_next/static/chunks/03~yq9q893hmn.js:1
↓ 15 callers
Method
get_cache
( self, key, parent_otel_span: Optional[Span] = None, local_only: bool = False
litellm/caching/dual_cache.py:141
↓ 15 callers
Function
get_model_cost_map
Public entry point — returns the model cost map dict. 1. If ``LITELLM_LOCAL_MODEL_COST_MAP`` is set, uses the local backup only. 2. Othe
litellm/litellm_core_utils/get_model_cost_map.py:263
↓ 15 callers
Method
health_check_server
Perform a health check on a specific MCP server. Args: server_id: The ID of the server to health check mcp_a
litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:4340
↓ 15 callers
Function
i
()
litellm/proxy/_experimental/out/_next/static/chunks/0ys10755n8os_.js:1
↓ 15 callers
Method
info
(model, **kwargs)
tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_sampling_priority_selection.py:180
↓ 15 callers
Function
isIterable
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 15 callers
Method
is_recording
(self)
tests/test_litellm/integrations/otel/test_otel_v2_mount.py:53
↓ 15 callers
Function
list_passthrough_ids_from_db
Query the DB for managed IDs the caller owns and return an OpenAI-style paginated list response. Returns ``None`` when ``prisma_client`` is u
litellm/proxy/pass_through_endpoints/managed_id_rewriter.py:984
↓ 15 callers
Function
list_team_v2
Get a paginated list of teams with filtering and sorting options. Parameters: user_id: Optional[str] Only return teams w
litellm/proxy/management_endpoints/team_endpoints.py:4102
↓ 15 callers
Function
perform_redaction
Performs the actual redaction on the logging object and result.
litellm/litellm_core_utils/redact_messages.py:153
↓ 15 callers
Method
process_rotations
Main entry point - find and rotate keys that are due for rotation. Uses PodLockManager to ensure only one pod runs rotation in multi-
litellm/proxy/common_utils/key_rotation_manager.py:44
↓ 15 callers
Function
process_sso_jwt_access_token
Process SSO JWT access token and extract team IDs and user role if available. This function decodes the JWT access token and extracts team I
litellm/proxy/management_endpoints/ui_sso.py:725
↓ 15 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:183
↓ 15 callers
Method
resolve_policy_guardrails
Resolve the final guardrails for a single policy, including inheritance. This method: 1. Resolves the inheritance chain
litellm/proxy/policy_engine/policy_resolver.py:70
↓ 15 callers
Function
restore_generalizations
Save the active rules, let the test install its own, then restore.
tests/test_litellm/litellm_core_utils/test_fallback_generalizations.py:29
↓ 15 callers
Function
rewrite_body_ids
Recursively walk a request body dict/list and resolve any passthrough managed IDs. Skips litellm internal keys (``litellm_*``). Returns
litellm/proxy/pass_through_endpoints/managed_id_rewriter.py:1126
↓ 15 callers
Method
safe_set_attribute
Safely sets an attribute on the span, ensuring the value is a primitive type.
litellm/integrations/opentelemetry.py:2463
↓ 15 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:2223
↓ 15 callers
Method
send_text
Receive message from backend and store it
tests/llm_translation/realtime/base_realtime_tests.py:46
↓ 15 callers
Method
set_attribute
(self, key, value)
tests/test_litellm/integrations/otel/test_otel_v2_mount.py:59
↓ 15 callers
Function
t
(t,n,r,l,a)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 15 callers
Function
text_completion
( prompt: Union[ str, List[Union[str, List[Union[str, List[int]]]]] ], # Required: The prompt
litellm/main.py:6976
↓ 15 callers
Method
then
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 15 callers
Method
to_dict
Converts the ProxyException instance to a dictionary.
litellm/proxy/_types.py:3246
↓ 15 callers
Function
token_counter
Args: request: TokenCountRequest call_endpoint: bool - When set to "True" it will call the token counting endpoint - e.g Anthropi
litellm/proxy/proxy_server.py:10325
↓ 15 callers
Function
tp
(t)
litellm/proxy/_experimental/out/_next/static/chunks/03~yq9q893hmn.js:1
↓ 15 callers
Method
transform_chat_completion_response_to_responses_api_response
Transform a Chat Completion response into a Responses API response
litellm/responses/litellm_completion_transformation/transformation.py:1570
↓ 15 callers
Method
transform_image_edit_request
( self, model: str, prompt: Optional[str], image: Optional[FileTypes],
litellm/llms/bedrock/image_edit/amazon_nova_canvas_image_edit_transformation.py:298
↓ 15 callers
Method
transform_list_input_items_request
( self, response_id: str, api_base: str, litellm_params: GenericLiteLLMParams,
litellm/llms/openai/responses/transformation.py:500
↓ 15 callers
Function
transform_openai_input_gemini_content
Transform OpenAI embedding input to Gemini batchEmbedContents format. Each input element becomes a separate EmbedContentRequest, supporting
litellm/llms/vertex_ai/gemini_embeddings/batch_embed_content_transformation.py:209
↓ 15 callers
Function
transform_openai_input_gemini_embed_content
Transform OpenAI embedding input to Gemini embedContent format (multimodal). Args: input: GeminiEmbeddingInput with text, data URIs,
litellm/llms/vertex_ai/gemini_embeddings/batch_embed_content_transformation.py:257
↓ 15 callers
Method
transform_parsed_response
( self, completion_response: dict, raw_response: httpx.Response, model_respons
litellm/llms/anthropic/chat/transformation.py:2261
↓ 15 callers
Method
transform_streaming_response
(self, **kwargs)
tests/llm_responses_api_testing/test_responses_hooks.py:239
↓ 15 callers
Method
transform_text_to_speech_request
Transform request to provider-specific format. Returns: TextToSpeechRequestData: A structured dict containing:
litellm/llms/base_llm/text_to_speech/transformation.py:109
↓ 15 callers
Method
transform_video_create_response
Transform the Veo video creation response. Veo returns: { "name": "operations/generate_1234567890",
litellm/llms/gemini/videos/transformation.py:291
↓ 15 callers
Method
update_state
Update the polling state in Redis Uses OpenAI Response object format with native status types: https://platform.openai.com/d
litellm/proxy/response_polling/polling_handler.py:84
↓ 14 callers
Function
Table
({ className, ...props }: React.ComponentProps<"table">)
ui/litellm-dashboard/src/components/ui/table.tsx:7
↓ 14 callers
Method
__init__
(self)
tests/test_litellm/proxy/guardrails/test_deferred_guardrail_logging.py:78
↓ 14 callers
Method
_add_proxy_hooks
Add proxy hooks to litellm.callbacks
litellm/proxy/utils.py:540
← previous
next →
1,001–1,100 of 71,069, ranked by callers