MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions71,069 in github.com/BerriAI/litellm

↓ 12 callersMethod_validate_return_to
Validate that return_to matches the configured control_plane_url origin. Returns True if return_to is valid and should be used.
litellm/proxy/management_endpoints/ui_sso.py:2391
↓ 12 callersMethodaclose
(self)
litellm/llms/custom_httpx/aiohttp_transport.py:145
↓ 12 callersMethodacompletion
(self, *args, **kwargs)
litellm/proxy/example_config_yaml/custom_handler.py:18
↓ 12 callersMethodacreate_batch
( self, model: str, **kwargs, )
litellm/router.py:4942
↓ 12 callersMethodapply_guardrail
( self, inputs: GenericGuardrailAPIInputs, request_data: dict, input_type: Lit
litellm/proxy/guardrails/guardrail_hooks/onyx/onyx.py:88
↓ 12 callersMethodapply_to_anthropic_messages_request
Apply cache control injection for the Anthropic-native v1/messages endpoint. Returns (messages, system, remaining_non_message_points).
litellm/integrations/anthropic_cache_control_hook.py:232
↓ 12 callersFunctionasend_message
Async: Send a message to an A2A agent. Uses the @client decorator for LiteLLM logging and tracking. If litellm_params contains custom_ll
litellm/a2a_protocol/main.py:369
↓ 12 callersMethodasync_check_and_create_cache
Receives - messages: List of dict - messages in the openai format Returns - messages - List[dict] - filtered list of
litellm/llms/vertex_ai/context_caching/vertex_ai_context_caching.py:427
↓ 12 callersMethodasync_post_call_failure_hook
(self, *args, **kwargs)
tests/test_litellm/proxy/hooks/test_post_call_failure_hook_integration.py:89
↓ 12 callersMethodasync_pre_call_hook
Runs before the LLM API call to validate and potentially modify input. Uses 'PROMPT' messageType as this is input to the model.
litellm/proxy/guardrails/guardrail_hooks/lasso/lasso.py:177
↓ 12 callersFunctionca
(e,t,n)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 12 callersMethodchat
( self, key: str, model: str, content: str, *, max_tokens: int
tests/e2e/budgets/budget_client.py:201
↓ 12 callersMethodclose
Close the WebSocket
tests/llm_translation/realtime/base_realtime_tests.py:125
↓ 12 callersFunctioncollect
Apply an extractor table to ``source``, dropping ``None`` results.
litellm/integrations/otel/mappers/utils.py:20
↓ 12 callersFunctioncompute_short_server_prefix
Derive the deterministic three-character prefix for a server. Uses SHA-256 of ``f"{server_id}#{attempt}"`` and folds the first eight bytes in
litellm/proxy/_experimental/mcp_server/utils.py:90
↓ 12 callersMethodconsume_stream
(self, streaming_response: StreamingResponse)
tests/test_litellm/proxy/test_common_request_processing.py:1097
↓ 12 callersFunctioncopyToClipboard
( text: string | null | undefined, messageText: string = "Copied to clipboard", )
ui/litellm-dashboard/src/utils/dataUtils.ts:66
↓ 12 callersFunctioncost_calculator
fal.ai image generation cost calculator
litellm/llms/fal_ai/cost_calculator.py:7
↓ 12 callersFunctioncost_per_web_search_request
Calculate the cost of web search requests for X.AI models. X.AI Live Search costs $25 per 1,000 sources used. Each source costs $0.025.
litellm/llms/xai/cost_calculator.py:55
↓ 12 callersFunctioncreate_config_audit_log
Record a system-wide settings change in LiteLLM_AuditLog. Secret leaves are redacted before the row is written. environment_variables hold ar
litellm/proxy/proxy_server.py:14297
↓ 12 callersFunctioncreate_standard_logging_payload
()
tests/enterprise/litellm_enterprise/enterprise_callbacks/test_prometheus_logging_callbacks.py:46
↓ 12 callersMethoddefaultMutationOptions
(e)
litellm/proxy/_experimental/out/_next/static/chunks/08yy42xvwaak6.js:1
↓ 12 callersFunctione
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 12 callersFunctione
()
litellm/proxy/_experimental/out/_next/static/chunks/0piozaeodiue..js:31
↓ 12 callersFunctionenc_project
(p)
tests/test_litellm/integrations/gitlab/test_gitlab_client.py:90
↓ 12 callersFunctionencode_character_id_with_provider
Encode provider and model_id into character_id using base64.
litellm/types/videos/utils.py:122
↓ 12 callersMethodenforce_member_can_assign_access_groups
Field-level opt-in gate: a non-admin team member may only set `access_group_ids` on a (team) key if their team has opted in by adding
litellm/proxy/management_helpers/team_member_permission_checks.py:141
↓ 12 callersFunctionextract_request_tool_names
Extract tool names from the request body for the given route. Uses guardrail translation handlers when available, else standalone extractors
litellm/proxy/guardrails/tool_name_extraction.py:63
↓ 12 callersFunctionextract_ttl_from_cached_messages
Extract TTL from cached messages. Returns the first valid TTL found. Args: messages: List of messages to extract TTL from Retur
litellm/llms/vertex_ai/context_caching/transformation.py:51
↓ 12 callersMethodfetch
(self, user_id: str, server_id: str)
litellm/proxy/_experimental/mcp_server/outbound_credentials/oauth_token_store.py:166
↓ 12 callersFunctionfetch_all_mcp_servers
Get all of the configured mcp servers for the user in the db with their associated teams ``` curl --location 'http://localhos
litellm/proxy/management_endpoints/mcp_management_endpoints.py:859
↓ 12 callersFunctionfilter_and_transform_beta_headers
Filter and transform beta headers based on provider's mapping configuration. This function: 1. Only allows headers that are present in t
litellm/anthropic_beta_headers_manager.py:215
↓ 12 callersMethodfindAll
(e={})
litellm/proxy/_experimental/out/_next/static/chunks/08yy42xvwaak6.js:1
↓ 12 callersMethodflush_and_get_aggregated_db_spend_update_transactions
Flush all updates from the queue and return all updates aggregated by entity type.
litellm/proxy/db/db_transaction_queue/spend_update_queue.py:27
↓ 12 callersMethodgetConfigs
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 12 callersFunctiongetProviderLogoAndName
(providerValue: string)
ui/litellm-dashboard/src/components/provider_info_helpers.tsx:313
↓ 12 callersMethodget_aggregated_daily_spend_update_transactions
Aggregate updates by daily_transaction_key.
litellm/proxy/db/db_transaction_queue/daily_spend_update_queue.py:100
↓ 12 callersMethodget_api_key
(api_key: Optional[str] = None)
litellm/llms/gemini/common_utils.py:366
↓ 12 callersMethodget_app_roles_from_id_token
Extract app roles from the Microsoft Entra ID (Azure AD) id_token JWT. App roles are assigned in the Azure AD Enterprise Application
litellm/proxy/management_endpoints/ui_sso.py:3847
↓ 12 callersMethodget_base_completion_call_args
Must return the base completion call args
tests/llm_responses_api_testing/base_responses_api.py:109
↓ 12 callersMethodget_credentials
(self, prisma_client: PrismaClient)
litellm/proxy/proxy_server.py:6425
↓ 12 callersFunctionget_deployments_for_tag
Returns a list of deployments that match the requested model and tags in the request. Executes tag based filtering based on the tags in requ
litellm/router_strategy/tag_based_routing.py:152
↓ 12 callersFunctionget_end_user_object
Returns end user object from database or cache. If end user exists but has no budget_id, applies the default budget (if configured via l
litellm/proxy/auth/auth_checks.py:1071
↓ 12 callersMethodget_model_group_info
For a given model group name, return the combined model info Returns: - ModelGroupInfo if able to construct a model group
litellm/router.py:8792
↓ 12 callersFunctionget_token_count
(messages, model)
litellm/utils.py:6695
↓ 12 callersMethodget_url_and_signed_request
Build the AgentCore URL, construct a JSON-RPC envelope, and sign the request. Args: request_id: A2A JSON-RPC request ID
litellm/a2a_protocol/providers/bedrock_agentcore/transformation.py:77
↓ 12 callersMethodget_vertex_region
(self, vertex_region: Optional[str], model: str)
litellm/llms/vertex_ai/vertex_llm_base.py:70
↓ 12 callersFunctionh
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0e9hs7onyj28m.js:1
↓ 12 callersMethodhandle
( self, method: str, path: str, body: bytes, fetch_upstream: FetchUpst
tests/_openai_record_replay_proxy.py:152
↓ 12 callersFunctionincrement_spend_counters
Atomically increment spend counters for budget enforcement. Uses spend_counter_cache (DualCache with Redis backend when available) so co
litellm/proxy/proxy_server.py:2253
↓ 12 callersFunctioninfo_key_fn
Retrieve information about a key. Parameters: key: Optional[str] = Query parameter representing the key in the request user_a
litellm/proxy/management_endpoints/key_management_endpoints.py:3382
↓ 12 callersFunctionis_base64_encoded_unified_id
Check if a resource ID is a base64 encoded unified ID. Args: resource_id: The resource ID to check prefix: The expected pref
litellm/llms/base_llm/managed_resources/utils.py:42
↓ 12 callersMethodis_initialized
(self)
litellm/proxy/db/tool_registry_writer.py:297
↓ 12 callersMethodjsonify_object
(self, data: dict)
litellm/proxy/utils.py:2959
↓ 12 callersMethodkwargs_of
(self, handler_name: str)
tests/test_litellm/videos/test_main.py:77
↓ 12 callersFunctionl
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 12 callersFunctionmake_inputs_with_tools
Create GenericGuardrailAPIInputs with tool_calls.
tests/test_litellm/integrations/rubrik_test_helpers.py:19
↓ 12 callersFunctionn
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0.1o3m2oaq6je.js:1
↓ 12 callersFunctionnormalize_jsonrpc_response
Convert a JSON-RPC response's ``result`` to ``target``. Errors and non-dict results pass through untouched.
litellm/proxy/a2a/version_convert.py:56
↓ 12 callersFunctiono
()
litellm/proxy/_experimental/out/_next/static/chunks/035i-tbvd3z7s.js:1
↓ 12 callersFunctionparse_tool_call_arguments
Parse tool call arguments from a JSON string. When the JSON is malformed (e.g. truncated by the model), this function attempts a lightwe
litellm/litellm_core_utils/prompt_templates/common_utils.py:1609
↓ 12 callersMethodpoll_logs_for_key
( self, key: str, *, min_rows: int = 1, predicate: Callable[[list[Spen
tests/e2e/spend_tracking/spend_e2e_client.py:122
↓ 12 callersFunctionrQ
(e,t,r,s)
litellm/proxy/_experimental/out/_next/static/chunks/0nnx~7-7e5t~1.js:5
↓ 12 callersFunctionredis_key_for
(cassette_path: str)
tests/_vcr_redis_persister.py:95
↓ 12 callersFunctionregenerate_key_fn
Regenerate an existing API key while optionally updating its parameters. Parameters: - key: str (path parameter) - The key to regenerate
litellm/proxy/management_endpoints/key_management_endpoints.py:4503
↓ 12 callersMethodrender_template
(self, template_id: str, variables: Optional[Dict[str, Any]] = None)
litellm/integrations/gitlab/gitlab_prompt_manager.py:210
↓ 12 callersFunctionrequestAnimationFrame
(...e)
litellm/proxy/_experimental/out/_next/static/chunks/15.9ylrtxojbj.js:1
↓ 12 callersMethodreset_budget_for_litellm_budget_table
Resets the budget for all LiteLLM End-Users (Customers), and Team Members if their budget has expired The corresponding Budget durati
litellm/proxy/common_utils/reset_budget_job.py:221
↓ 12 callersMethodresolve_credentials
(self, subject, server)
tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_server_manager.py:156
↓ 12 callersFunctionresolve_mcp_auth
Resolve the auth value for an MCP server. Priority: 1. ``mcp_auth_header`` — per-request/per-user override 2. OAuth2 Token Exchange (OBO
litellm/proxy/_experimental/mcp_server/oauth2_token_cache.py:276
↓ 12 callersMethodsave_cassette
(cassette_path, cassette_dict, serializer)
tests/_vcr_redis_persister.py:187
↓ 12 callersFunctionsend_email
smtp_host, smtp_port, smtp_username, smtp_password, sender_name, sender_email,
litellm/proxy/utils.py:4972
↓ 12 callersMethodset_deployment_health_states
Bulk-write all deployment health states as a single cache entry.
litellm/router_utils/health_state_cache.py:45
↓ 12 callersFunctionset_request_root_span
Anchor the request's root (server) span for explicit child parenting. No-ops for a non-recordable span so a bad capture can never replace a good
litellm/integrations/otel/plumbing/context.py:33
↓ 12 callersFunctionsplit_server_prefix_from_name
Return the unprefixed name plus the server name used as prefix.
litellm/proxy/_experimental/mcp_server/utils.py:322
↓ 12 callersFunctiont
()
litellm/proxy/_experimental/out/_next/static/chunks/06mj74u6dgxb8.js:23
↓ 12 callersFunctionta
(e,t,n)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 12 callersFunctiontoken_endpoint
Accept the authorization code from client and exchange it for OAuth token. Supports PKCE flow by forwarding code_verifier to upstream provide
litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py:911
↓ 12 callersMethodtransform_litellm_user_to_scim_user
( user: Union[LiteLLM_UserTable, NewUserResponse], )
litellm/proxy/management_endpoints/scim/scim_transformations.py:20
↓ 12 callersMethodtransform_request
( self, model: str, messages: List[AllMessageValues], optional_params: dict,
litellm/llms/vertex_ai/vertex_ai_partner_models/anthropic/transformation.py:86
↓ 12 callersMethodtransform_response
( self, model: str, raw_response: Response, model_response: ModelResponse,
litellm/llms/predibase/chat/transformation.py:126
↓ 12 callersMethodtransform_response
Transform Responses API response to chat completion response
litellm/completion_extras/litellm_responses_transformation/transformation.py:652
↓ 12 callersMethodtransform_responses_api_request_to_chat_completion_request
Transform a Responses API request into a Chat Completion request
litellm/responses/litellm_completion_transformation/transformation.py:178
↓ 12 callersMethodtransform_retrieve_file_request
Get URL and params for retrieving a file.
litellm/llms/manus/files/transformation.py:285
↓ 12 callersMethodtransform_search_request
Transform Search request to Brave Search API format. Transforms Perplexity unified spec parameters: - query → q (same)
litellm/llms/brave/search/transformation.py:161
↓ 12 callersFunctiontrim_messages
Trim a list of messages to fit within a model's token limit. Args: messages: Input messages to be trimmed. Each message is a diction
litellm/utils.py:6755
↓ 12 callersFunctionu7
(e,t,n)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 12 callersMethodupdate_headers_with_optional_anthropic_beta
Update headers with optional anthropic beta.
litellm/llms/anthropic/chat/transformation.py:1706
↓ 12 callersFunctionuseTeams
()
ui/litellm-dashboard/src/app/(dashboard)/hooks/useTeams.tsx:10
↓ 12 callersMethodvalidate_environment
( self, *args, **kwargs )
litellm/llms/base.py:78
↓ 12 callersFunctionw
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0p.6bs58-_3lw.js:1
↓ 12 callersFunctionwe
(t,e)
litellm/proxy/_experimental/out/_next/static/chunks/03~yq9q893hmn.js:1
↓ 11 callersFunctionE
(s,o,i)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 11 callersFunctionE
(e,t,r)
litellm/proxy/_experimental/out/_next/static/chunks/0e9hs7onyj28m.js:1
↓ 11 callersFunctionR
(s,o,u,_,w)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 11 callersFunctionT
(e,t,r,n)
litellm/proxy/_experimental/out/_next/static/chunks/0p.6bs58-_3lw.js:1
↓ 11 callersMethod_PROXY_track_cost_callback
( self, kwargs, # kwargs to completion completion_response: Optional[Union[litellm
litellm/proxy/hooks/proxy_track_cost_callback.py:171
↓ 11 callersFunction_async_get_cooldown_deployments
Async implementation of '_get_cooldown_deployments'
litellm/router_utils/cooldown_handlers.py:294
↓ 11 callersFunction_attach_mock_success_dispatch
Match production entrypoint: ``_run_deferred_stream_guardrails`` uses dispatch.
tests/test_litellm/proxy/guardrails/test_deferred_guardrail_logging.py:41
↓ 11 callersMethod_base_validate_azure_environment
(headers: dict, litellm_params: Optional[GenericLiteLLMParams])
litellm/llms/azure/common_utils.py:666
← previousnext →1,401–1,500 of 71,069, ranked by callers