MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions68,180 in github.com/BerriAI/litellm

↓ 10 callersFunctionconvert_to_anthropic_image_obj
Input: "image_url": "data:image/jpeg;base64,{base64_image}", Return: "source": { "type": "base64", "media_type": "image/
litellm/litellm_core_utils/prompt_templates/factory.py:828
↓ 10 callersFunctionconvert_to_gemini_tool_call_invoke
OpenAI tool invokes: { "role": "assistant", "content": null, "tool_calls": [ { "id": "call_abc123",
litellm/litellm_core_utils/prompt_templates/factory.py:1266
↓ 10 callersMethodconvert_to_image_response
( response_object: dict, model_response_object: Optional[ImageResponse] = None, hidden
litellm/litellm_core_utils/llm_response_utils/convert_dict_to_response.py:415
↓ 10 callersMethodcount_input_file_usage
Count number of requests and tokens in a batch input file. Args: file_id: The file ID to read custom_llm_pro
litellm/proxy/hooks/batch_rate_limiter.py:490
↓ 10 callersFunctioncreate_anthropic_image_param
Create an AnthropicMessagesImageParam from an image URL input. Supports both URL references (for HTTP/HTTPS URLs) and base64 encoding.
litellm/litellm_core_utils/prompt_templates/factory.py:864
↓ 10 callersMethodcreate_llm_obs_payload
(self, kwargs: Dict, start_time: datetime, end_time: datetime)
litellm/integrations/datadog/datadog_llm_obs.py:219
↓ 10 callersFunctiond
(e,t,l)
litellm/proxy/_experimental/out/_next/static/chunks/05btv.l5gro_..js:10
↓ 10 callersFunctiondecrypt_callback_vars
Return a deep copy of metadata with callback_vars values decrypted. Legacy plaintext rows pass through unchanged (decrypt failure → original).
litellm/proxy/common_utils/callback_utils.py:591
↓ 10 callersMethoddeliver
Persist the serialized export for the provided time window.
litellm/integrations/focus/destinations/base.py:22
↓ 10 callersMethodduring_call_hook
Runs the CustomGuardrail's async_moderation_hook() in parallel
litellm/proxy/utils.py:1727
↓ 10 callersFunctiondynamic_mcp_route
Handle /{name}/mcp for MCP server aliases, toolsets, MCP access group tags, and comma-separated lists. Resolution order: 1. Registered MCP se
litellm/proxy/proxy_server.py:15672
↓ 10 callersFunctione
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0q6~n4y84cejn.js:1
↓ 10 callersFunctioneE
(t,r)
litellm/proxy/_experimental/out/_next/static/chunks/0~0su3wi_7f6-.js:1
↓ 10 callersFunctioneJ
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 10 callersFunctioneQ
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0.4.bbjx7y007.js:143
↓ 10 callersFunctionek
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0~0su3wi_7f6-.js:1
↓ 10 callersFunctionemitTagAndPreviousTextNode
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 10 callersFunctionen
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/15hm8gokjq2uu.js:13
↓ 10 callersFunctionenrich_cohere_param_description
Embed schema constraints into a Cohere parameter description. ``CohereParameterDefinition`` only has ``type``, ``description``, and ``isRequi
litellm/llms/oci/common_utils.py:516
↓ 10 callersMethodequals
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 10 callersMethodfetch
(self, user_id: str, server_id: str)
litellm/proxy/_experimental/mcp_server/outbound_credentials/oauth_token_store.py:264
↓ 10 callersFunctionfetch_well_known_card
Fetch an agent card from ``base_url`` using the strategy chosen by ``discovery_mode``. Returns the parsed JSON from the first path that r
litellm/proxy/a2a/discovery.py:82
↓ 10 callersMethodflush
()
litellm/proxy/_experimental/out/_next/static/chunks/16.oisvgwzo8s.js:4
↓ 10 callersMethodflush_all_updates_from_in_memory_queue
Get all updates from the queue.
litellm/proxy/db/db_transaction_queue/base_update_queue.py:41
↓ 10 callersMethodflush_queue
(self)
litellm/integrations/datadog/datadog.py:439
↓ 10 callersFunctionfu
(e,t,n)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 10 callersFunctiong
(e)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 10 callersFunctiong
(e,n,o,a,s)
litellm/proxy/_experimental/out/_next/static/chunks/0.4.bbjx7y007.js:1
↓ 10 callersFunctiong
(t)
litellm/proxy/_experimental/out/_next/static/chunks/101az3fsw7lje.js:1
↓ 10 callersFunctiongeneric_response_convertor
( response, jwt_handler: JWTHandler, sso_jwt_handler: Optional[JWTHandler] = None, role_mappin
litellm/proxy/management_endpoints/ui_sso.py:957
↓ 10 callersFunctiongetGuardrailsList
(accessToken: string)
ui/litellm-dashboard/src/components/networking.tsx:3745
↓ 10 callersFunctiongetSecureItem
(key: string)
ui/litellm-dashboard/src/utils/secureStorage.ts:19
↓ 10 callersMethodget_affinity_cache_key
(cls, model_group: str, user_key: str)
litellm/router_utils/pre_call_checks/deployment_affinity_check.py:216
↓ 10 callersMethodget_all_policies
Get all loaded policies. Returns: Dictionary mapping policy names to Policy objects
litellm/proxy/policy_engine/policy_registry.py:168
↓ 10 callersMethodget_api_base
(api_base: Optional[str] = None)
litellm/llms/gemini/common_utils.py:362
↓ 10 callersMethodget_cli_jwt_auth_token
Generate a JWT token for CLI authentication with configurable expiration. The expiration time can be controlled via the LITELLM_CLI_
litellm/proxy/auth/auth_checks.py:2271
↓ 10 callersMethodget_complete_url
( self, api_base: Optional[str], api_key: Optional[str], model: str, e
litellm/llms/bedrock/passthrough/transformation.py:54
↓ 10 callersMethodget_complete_url
( self, api_base: Optional[str], api_key: Optional[str], model: str, o
litellm/llms/deepgram/audio_transcription/transformation.py:166
↓ 10 callersFunctionget_completion_messages
Ensures messages alternate between user and assistant roles by adding placeholders only when there are consecutive messages of the same role.
litellm/litellm_core_utils/prompt_templates/common_utils.py:394
↓ 10 callersFunctionget_datadog_service
()
litellm/integrations/datadog/datadog_handler.py:15
↓ 10 callersFunctionget_datadog_tags
Build Datadog tags as a list of individual tag strings. Returns a list of "key:value" strings suitable for Datadog LLM Observability (which e
litellm/integrations/datadog/datadog_handler.py:39
↓ 10 callersMethodget_image_content_type
Detect the content type of image data using existing LiteLLM utils. Args: image_data: Can be BytesIO, bytes, BufferedRea
litellm/images/utils.py:80
↓ 10 callersFunctionget_key_object
- Check if team id in proxy Team Table - if valid, return LiteLLM_TeamTable object with defined limits - if not, then raise an error
litellm/proxy/auth/auth_checks.py:2418
↓ 10 callersFunctionget_last_user_message
Get the last consecutive block of messages from the user. Example: messages = [ {"role": "user", "content": "Hello, how are you?
litellm/litellm_core_utils/prompt_templates/common_utils.py:1327
↓ 10 callersFunctionget_litellm_user_role
Convert a string (or list of strings) to a LitellmUserRoles enum if valid (case-insensitive). Handles list inputs since some SSO providers (
litellm/proxy/management_endpoints/types.py:31
↓ 10 callersFunctionget_next_standardized_reset_time
Get the next standardized reset time based on the duration. All durations will reset at predictable intervals, aligned from the current time
litellm/litellm_core_utils/duration_parser.py:97
↓ 10 callersFunctionget_object_permission
- Check if object permission id in proxy ObjectPermissionTable - if valid, return LiteLLM_ObjectPermissionTable object - if not, then rai
litellm/proxy/auth/auth_checks.py:2506
↓ 10 callersMethodget_provider_anthropic_messages_config
( model: str, provider: LlmProviders, )
litellm/utils.py:7902
↓ 10 callersMethodget_sanitized_user_information_from_key
( user_api_key_dict: UserAPIKeyAuth, )
litellm/proxy/litellm_pre_call_utils.py:922
↓ 10 callersMethodget_secret
(self, secret_name)
tests/litellm_utils_tests/test_get_secret.py:18
↓ 10 callersMethodget_supported_openai_params
(self, model: str)
litellm/llms/maritalk.py:44
↓ 10 callersMethodget_unhealthy_deployment_ids
Sync version: return set of deployment IDs currently marked unhealthy and not stale.
litellm/router_utils/health_state_cache.py:84
↓ 10 callersFunctionget_user_oauth_credential
Return the decoded OAuth2 payload dict for a user+server pair, or None.
litellm/proxy/_experimental/mcp_server/db.py:969
↓ 10 callersFunctiongrey
(t: str)
litellm/setup_wizard.py:158
↓ 10 callersMethodhandle
( self, *, model: str, messages: List[Dict], tools: Optional[List[Dict
litellm/llms/anthropic/experimental_pass_through/messages/interceptors/advisor.py:52
↓ 10 callersFunctionhandle_cohere_stream_chunk
Parse a single Cohere SSE chunk into a LiteLLM ModelResponseStream. ``prior_tool_calls_emitted`` lets the caller signal whether tool calls we
litellm/llms/oci/chat/cohere.py:260
↓ 10 callersMethodhandle_streaming
Handle streaming A2A request. Args: request_id: A2A JSON-RPC request ID params: A2A MessageSendParams contai
litellm/a2a_protocol/providers/base.py:40
↓ 10 callersFunctionht
(t)
litellm/proxy/_experimental/out/_next/static/chunks/0ys10755n8os_.js:1
↓ 10 callersFunctioni
()
litellm/proxy/_experimental/out/_next/static/chunks/05btv.l5gro_..js:10
↓ 10 callersFunctioni
(n)
litellm/proxy/_experimental/out/_next/static/chunks/101az3fsw7lje.js:1
↓ 10 callersFunctionis_anthropic_native_web_search_tool
Check if a tool is an Anthropic-native ``web_search_*`` tool. Native clients (Anthropic SDK, Claude Desktop, Anthropic Console) send too
litellm/integrations/websearch_interception/tools.py:129
↓ 10 callersFunctionis_budget_block
True if the call was rejected for being over budget (vs a provider error).
tests/e2e/budgets/budget_client.py:147
↓ 10 callersMethodis_jwt
(token: Optional[str])
litellm/proxy/auth/handle_jwt.py:138
↓ 10 callersFunctionis_valid_api_key
Validates API key format: - sk- keys: must match ^sk-[A-Za-z0-9_-]+$ - hashed keys: must match ^[a-fA-F0-9]{64}$ - Length between 20
litellm/proxy/utils.py:5861
↓ 10 callersMethodjoin_base_and_endpoint_path
Combine the path component of ``base_url`` with ``endpoint_path``. Preserves any path prefix configured on the base URL and resolves
litellm/proxy/pass_through_endpoints/pass_through_endpoints.py:613
↓ 10 callersMethodload_config
Load config values into proxy global state
litellm/proxy/proxy_server.py:3916
↓ 10 callersMethodlog_success_event
(self, kwargs, response_obj, start_time, end_time)
litellm/router_strategy/lowest_latency.py:38
↓ 10 callersFunctionmakeSequence
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 10 callersMethodmap_openai_params
( self, non_default_params: dict, optional_params: dict, model: str, d
litellm/llms/baseten/chat.py:70
↓ 10 callersMethodmap_openai_params
( self, non_default_params: dict, optional_params: dict, model: str, d
litellm/llms/oci/chat/transformation.py:335
↓ 10 callersFunctionmock_stream
()
tests/test_litellm/proxy/guardrails/guardrail_hooks/openai/test_moderations.py:321
↓ 10 callersFunctionnormalize_server_name
Normalize server name by replacing spaces with underscores
litellm/proxy/_experimental/mcp_server/utils.py:134
↓ 10 callersMethodperiodic_flush
Override periodic_flush to work with asyncio.Queue.
litellm/integrations/gcs_bucket/gcs_bucket.py:367
↓ 10 callersMethodpre_call_hook
( self, user_id: Optional[str], messages: List[AllMessageValues], function_cal
litellm/integrations/gitlab/gitlab_prompt_manager.py:338
↓ 10 callersMethodprepare_token_exchange_parameters
Prepare token exchange parameters for Generic SSO. Args: request: Request object generic_include_client_id:
litellm/proxy/management_endpoints/ui_sso.py:3215
↓ 10 callersMethodprocess_input_messages
Process input text by applying guardrails. Args: data: Request data dictionary containing 'input' parameter
litellm/llms/openai/speech/guardrail_translation/handler.py:30
↓ 10 callersFunctionpromoted_baggage
Identity values to write into Baggage, filtered to ``promoted_keys``. ``promoted_keys`` selects from ``_PROMOTABLE``; ``metadata_keys`` selects
litellm/integrations/otel/model/baggage.py:68
↓ 10 callersFunctionr
()
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 10 callersFunctionr
litellm/proxy/_experimental/out/_next/static/chunks/15.9ylrtxojbj.js:1
↓ 10 callersFunctionr
litellm/proxy/_experimental/out/_next/static/chunks/01y._o853f7le.js:1
↓ 10 callersFunctionr
litellm/proxy/_experimental/out/_next/static/chunks/0k3aqiu733i3f.js:1
↓ 10 callersFunctionr
litellm/proxy/_experimental/out/_next/static/chunks/05btv.l5gro_..js:10
↓ 10 callersFunctionr
litellm/proxy/_experimental/out/_next/static/chunks/0em0654rb513m.js:1
↓ 10 callersFunctionr
litellm/proxy/_experimental/out/_next/static/chunks/0mh1wnrvmv_y7.js:1
↓ 10 callersFunctionr
litellm/proxy/_experimental/out/_next/static/chunks/0m._ijxus~ryi.js:1
↓ 10 callersFunctionr
litellm/proxy/_experimental/out/_next/static/chunks/05z02g9s~8km0.js:1
↓ 10 callersFunctionr
litellm/proxy/_experimental/out/_next/static/chunks/0v1rxqc1hqmrl.js:1
↓ 10 callersFunctionr
litellm/proxy/_experimental/out/_next/static/chunks/022.sz94ycw4x.js:1
↓ 10 callersFunctionr
litellm/proxy/_experimental/out/_next/static/chunks/129bujhdmi9ce.js:1
↓ 10 callersFunctionrC
(e,t,r,s)
litellm/proxy/_experimental/out/_next/static/chunks/0nnx~7-7e5t~1.js:1
↓ 10 callersMethodrecv
(self)
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_cato_networks.py:2327
↓ 10 callersMethodredact_sensitive_data
Redact sensitive information (tokens, secrets) from data before logging. Handles strings, dicts, and lists recursively. Keys contain
litellm/llms/databricks/common_utils.py:50
↓ 10 callersMethodrefresh
(self, user_id: str, server_id: str, token: OAuthToken)
tests/test_litellm/proxy/_experimental/mcp_server/outbound_credentials/test_oauth_token_store.py:207
↓ 10 callersMethodreload_servers_from_database
Re-synchronize the in-memory MCP server registry with the database.
litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:3640
↓ 10 callersFunctionreplace_model_in_jsonl
(file_content: FileTypes, new_model_name: str)
litellm/router_utils/batch_utils.py:75
↓ 10 callersFunctionresetToDataState
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 10 callersFunctionresolve_oci_credentials
Merge OCI credentials from optional_params (explicit, always wins) and environment variables (fallback). Returns a dict with resolved va
litellm/llms/oci/common_utils.py:156
↓ 10 callersMethodresume
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0nnx~7-7e5t~1.js:1
↓ 10 callersMethodsafe_get_vertex_ai_location
Safely get Vertex AI location without mutating the litellm_params dict. Unlike get_vertex_ai_location(), this does NOT pop values fr
litellm/llms/vertex_ai/vertex_llm_base.py:1191
↓ 10 callersMethodsend
(self, event: BaseModel)
tests/e2e/realtime/realtime_client.py:253
← previousnext →1,701–1,800 of 68,180, ranked by callers