MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions68,180 in github.com/BerriAI/litellm

↓ 10 callersMethodset_preprocessing_duration_attribute
Set ``litellm.preprocessing.duration_ms`` (proxy-receive -> first provider handoff) on the proxy SERVER span. ``litellm_received_at``
litellm/integrations/opentelemetry.py:3273
↓ 10 callersFunctionsetup_cache
()
tests/local_testing/test_caching_handler.py:49
↓ 10 callersFunctionstartNewTag
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 10 callersFunctionstore_user_oauth_credential
Persist an OAuth2 access token for a user+server pair. The payload is JSON-serialised and stored encrypted in the same ``credential_b64`` col
litellm/proxy/_experimental/mcp_server/db.py:883
↓ 10 callersMethodstream
( self, path: str, *, headers: BaseModel, json: BaseModel )
tests/e2e/transport.py:24
↓ 10 callersFunctionteamInfoCall
(accessToken: string, teamID: string | null)
ui/litellm-dashboard/src/components/networking.tsx:1060
↓ 10 callersMethodtext_completion
( self, model: str, prompt: str, is_retry: Optional[bool] = False, is_
litellm/router.py:3912
↓ 10 callersMethodtransform_anthropic_to_bedrock_count_tokens
Transform request to Bedrock CountTokens format. Supports both Converse and InvokeModel input types. Input (Anthropic format
litellm/llms/bedrock/count_tokens/transformation.py:58
↓ 10 callersMethodtransform_request
( self, model: str, messages: List[AllMessageValues], optional_params: dict,
litellm/llms/ollama/chat/transformation.py:237
↓ 10 callersMethodtransform_response
( self, model: str, raw_response: httpx.Response, model_response: ModelRespons
litellm/llms/sap/chat/transformation.py:385
↓ 10 callersFunctionu
(t,l)
litellm/proxy/_experimental/out/_next/static/chunks/05btv.l5gro_..js:4
↓ 10 callersFunctionui_view_users
Filter users based on partial match of user_id or email with pagination. Behaviour depends on the ``scope_user_search_to_org`` UI-setting fl
litellm/proxy/management_endpoints/internal_user_endpoints.py:2331
↓ 10 callersFunctionunpack_legacy_defs
Inline ``$ref``s backed by draft-04 ``definitions`` / OpenAPI ``components.schemas``. ``$defs`` is left untouched. Anthropic and Fireworks to
litellm/litellm_core_utils/prompt_templates/common_utils.py:1014
↓ 10 callersFunctionupdate_mcp_server
Update a new mcp server record in the db
litellm/proxy/_experimental/mcp_server/db.py:584
↓ 10 callersFunctionupdate_messages_with_model_file_ids
Updates messages with model file ids. For managed files (unified file IDs), uses model_file_id_mapping if it resolves the id, otherwise
litellm/litellm_core_utils/prompt_templates/common_utils.py:446
↓ 10 callersFunctionuseIsExpanded
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 10 callersFunctionuseLevel
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 10 callersFunctionuseOrganizations
(filters?: OrganizationListFilters)
ui/litellm-dashboard/src/app/(dashboard)/hooks/organizations/useOrganizations.ts:13
↓ 10 callersFunctionuse_custom_pricing_for_model
Check if the model uses custom pricing Returns True if any of `SPECIAL_MODEL_INFO_PARAMS` are present in `litellm_params` or `model_info`
litellm/litellm_core_utils/litellm_logging.py:4377
↓ 10 callersFunctionuser_info_v2
Lightweight endpoint to get user info. Returns only the user object — no keys, no teams objects. This is the v2 replacement for /user/info,
litellm/proxy/management_endpoints/internal_user_endpoints.py:868
↓ 10 callersMethodvalidate_anthropic_messages_environment
OPTIONAL Validate the environment for the request
litellm/llms/vertex_ai/vertex_ai_partner_models/anthropic/experimental_pass_through/transformation.py:23
↓ 10 callersMethodvalidate_environment
( self, headers: dict, model: str, messages: List[AllMessageValues], o
litellm/llms/github_copilot/chat/transformation.py:81
↓ 10 callersMethodwrap
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0pidya1qvuvx8.js:1
↓ 10 callersFunctiony
(e,t,r,o)
litellm/proxy/_experimental/out/_next/static/chunks/0.4.bbjx7y007.js:1
↓ 9 callersFunctionA
(t,e)
litellm/proxy/_experimental/out/_next/static/chunks/0ys10755n8os_.js:1
↓ 9 callersFunctionC
({visible:e,prebuiltPatterns:t,categories:a,selectedPatternName:r,patternAction:s,onPatternNameChange:n,onActi
litellm/proxy/_experimental/out/_next/static/chunks/05.uhnqp00zd5.js:1
↓ 9 callersFunctionN
({data:e=[],columns:l,isLoading:s=!1,sorting:a=[],onSortingChange:r,pagination:i,onPaginationChange:o,enablePa
litellm/proxy/_experimental/out/_next/static/chunks/05btv.l5gro_..js:1
↓ 9 callersFunctionS
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0.4.bbjx7y007.js:1
↓ 9 callersFunctionS
(t,e)
litellm/proxy/_experimental/out/_next/static/chunks/0ys10755n8os_.js:1
↓ 9 callersFunctionZf
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 9 callersFunction_
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0.yiw37jc_bvi.js:1
↓ 9 callersMethod__anext__
(self)
litellm/litellm_core_utils/streaming_handler.py:1877
↓ 9 callersMethod__anext__
(self)
tests/test_litellm/proxy/openai_files_endpoint/test_files_endpoint.py:96
↓ 9 callersMethod_add_deployment
Iterate through db models for any not in router - add them. Return - number of deployments added
litellm/proxy/proxy_server.py:4888
↓ 9 callersMethod_add_mcp_list_tools_to_first_chunk
Add mcp_list_tools from _hidden_params to the first chunk's delta.provider_specific_fields. This method checks if MCP metadata with
litellm/litellm_core_utils/streaming_handler.py:1555
↓ 9 callersMethod_admin_key_dict
(self)
tests/test_litellm/proxy/management_endpoints/test_team_default_params.py:502
↓ 9 callersMethod_aresponses_streaming_iterator
Wrap a Responses-API streaming iterator so MidStreamFallbackError triggers the Router's fallback chain (parity with _acomplet
litellm/router.py:2230
↓ 9 callersFunction_assert_not_role_blocked
The endpoint must not return a role-block error. Detects both the 400 ``not_allowed_access`` pattern (used by most management endpoints) and
tests/test_litellm/proxy/auth/test_admin_viewer_handler_access.py:75
↓ 9 callersMethod_async_set_router_remaining_metrics
Populate ``litellm_remaining_tokens_metric`` / ``litellm_remaining_requests_metric`` from the router's internal usage counter
litellm/integrations/prometheus.py:2207
↓ 9 callersFunction_attempt_json_repair
Attempt to repair truncated JSON produced by LLM tool calls. Handles the most common truncation patterns where the model generates valid
litellm/litellm_core_utils/prompt_templates/common_utils.py:1551
↓ 9 callersFunction_bedrock_block_response
Realistic Bedrock ApplyGuardrail response when a topic policy fires. Mirrors the shape in ``litellm/types/proxy/guardrails/guardrail_hooks/ b
tests/test_litellm/integrations/test_otel_guardrail_violation_spans.py:51
↓ 9 callersFunction_build_model_max_budget_usage
( api_key_hash: str, model_max_budget: Mapping[str, Mapping[str, object]], user_api_key_cache: Use
litellm/proxy/management_endpoints/key_management_endpoints.py:3116
↓ 9 callersFunction_build_request_mock_with_headers
(headers: dict)
tests/test_litellm/proxy/test_litellm_pre_call_utils.py:3989
↓ 9 callersMethod_build_router
Build semantic router with tools (MCPTool objects or OpenAI function dicts).
litellm/proxy/_experimental/mcp_server/semantic_tool_filter.py:100
↓ 9 callersFunction_call_as_admin
(data)
tests/test_litellm/proxy/management_endpoints/test_key_management_endpoints.py:10990
↓ 9 callersFunction_call_handler_and_capture_optional_params
Call anthropic_messages_handler with an Anthropic model and capture the anthropic_messages_optional_request_params dict passed to base_ll
tests/test_litellm/llms/anthropic/experimental_pass_through/messages/test_reasoning_auto_summary_messages.py:24
↓ 9 callersFunction_cassette
(played: int, dirty: bool, total: int)
tests/llm_translation/test_vcr_classification.py:205
↓ 9 callersFunction_check_team_project_limits
Check that project limits respect its parent Team's limits. Mirrors _check_org_team_limits() from team_endpoints.py. Validates: - P
enterprise/litellm_enterprise/proxy/management_endpoints/project_endpoints.py:90
↓ 9 callersFunction_close_dangling_otel_server_span
(request: Request, status_code: int, exc: Optional[Exception] = None)
litellm/proxy/proxy_server.py:1308
↓ 9 callersFunction_convert_to_bedrock_tool_call_invoke
OpenAI tool invokes: { "role": "assistant", "content": null, "tool_calls": [ { "id": "call_abc123",
litellm/litellm_core_utils/prompt_templates/factory.py:3602
↓ 9 callersFunction_count_entry_tokens
Token-count a single batch input entry's body (chat / text / embedding).
litellm/batches/batch_utils.py:338
↓ 9 callersMethod_create_httpx_client_factory
Create a custom httpx client factory that uses LiteLLM's SSL configuration. This factory follows the same CA bundle path logic as htt
litellm/experimental_mcp_client/client.py:443
↓ 9 callersMethod_create_mock_logging_obj
Create a mock logging object
tests/test_litellm/proxy/pass_through_endpoints/llm_provider_handlers/test_openai_passthrough_logging_handler.py:55
↓ 9 callersFunction_create_oauth2_server
Helper to create a mock OAuth2 MCPServer.
tests/test_litellm/proxy/_experimental/mcp_server/test_discoverable_endpoints.py:2129
↓ 9 callersMethod_delete_deployment
(Helper function of add deployment) -> combined to reduce prisma db calls - Create all up list of model id's (db + config) -
litellm/proxy/proxy_server.py:4810
↓ 9 callersMethod_emit
(e,...t)
litellm/proxy/_experimental/out/_next/static/chunks/16.oisvgwzo8s.js:7
↓ 9 callersMethod_emit_and_get_guardrail_span
(self, entry)
tests/test_litellm/integrations/test_otel_guardrail_violation_spans.py:360
↓ 9 callersFunction_encode_realtime_token_payload
Encode metadata with the upstream ephemeral key so /realtime/calls can route without requiring model as a query param.
litellm/proxy/realtime_endpoints/endpoints.py:162
↓ 9 callersMethod_encrypt_env_variables
Encrypts a dictionary of environment variables and returns them.
litellm/proxy/proxy_server.py:5095
↓ 9 callersMethod_expand_messages_for_classification
Convert raw OpenAI-format messages to Lasso API format with content blocks. - assistant messages with `tool_calls` → assistant messa
litellm/proxy/guardrails/guardrail_hooks/lasso/lasso.py:645
↓ 9 callersFunction_extract_text_content
Return the plain-text representation of a message content value.
litellm/llms/oci/chat/cohere.py:49
↓ 9 callersFunction_fake_file_row
( unified_id: str, created_by: str = "user-1", team_id: str = "team-1" )
tests/pass_through_unit_tests/test_passthrough_managed_ids.py:1634
↓ 9 callersMethod_fetch_tools_with_timeout
Fetch tools from MCP client with timeout and error handling. Uses anyio.fail_after() instead of asyncio.wait_for() to avoid conflict
litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:2627
↓ 9 callersFunction_filter_models_by_team_id
Filter models by team ID. Returns models where: - team_id matches the model's BYOK team_id, OR - team_id is in access_via_team_ids, OR
litellm/proxy/proxy_server.py:11313
↓ 9 callersFunction_get_allowed_mcp_servers_from_mcp_server_names
Get the filtered MCP servers from the MCP server names. Fails closed when ``mcp_servers`` is explicitly provided (path- or h
litellm/proxy/_experimental/mcp_server/server.py:1011
↓ 9 callersMethod_get_boto3_client
Get a boto3 client for the specified service using BaseAWSLLM auth.
litellm/rag/ingestion/bedrock_ingestion.py:572
↓ 9 callersMethod_get_generic_sso_redirect_params
Get redirect parameters for Generic SSO with proper state priority handling. Optionally generates PKCE parameters if GENERIC_CLIENT_U
litellm/proxy/management_endpoints/ui_sso.py:2666
↓ 9 callersFunction_get_jwt_handler_with_issuer_keys
(issuers: list, keys_by_url: dict)
tests/proxy_unit_tests/test_jwt.py:1647
↓ 9 callersFunction_get_jwt_handler_with_issuer_keys
(issuers: list, keys_by_url: dict)
tests/test_litellm/proxy/auth/test_handle_jwt.py:3692
↓ 9 callersMethod_get_log_exporter
Get the appropriate log exporter based on the configuration.
litellm/integrations/opentelemetry.py:2836
↓ 9 callersMethod_get_mcp_server_auth_headers_from_headers
Parse server-specific MCP auth headers from the request headers. Looks for headers in the format: x-mcp-{server_alias}-{header_name}
litellm/proxy/_experimental/mcp_server/auth/user_api_key_auth_mcp.py:433
↓ 9 callersMethod_get_mcp_server_from_tool_name
Get the MCP Server from the tool name (handles both prefixed and non-prefixed names) Args: tool_name: Tool name (can be
litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:3592
↓ 9 callersFunction_get_model_info_helper
Helper for 'get_model_info'. Separated out to avoid infinite loop caused by returning 'supported_openai_param's
litellm/utils.py:5135
↓ 9 callersMethod_get_openai_compatible_provider_info
( self, api_base: Optional[str], api_key: Optional[str] )
litellm/llms/lemonade/chat/transformation.py:205
↓ 9 callersFunction_get_public_model_name
Determine the public model name from patch or existing model. The top-level ``model_name`` is the rename channel. For team-scoped rows the DB
litellm/proxy/management_endpoints/model_management_endpoints.py:621
↓ 9 callersFunction_get_team_deployments
Fetch all deployments for a given team_id from the database. Centralizes team deployment queries to ensure consistent filtering and error ha
litellm/proxy/management_endpoints/model_management_endpoints.py:687
↓ 9 callersMethod_handle_non_streaming_allm_passthrough_route
( self, response: Any, proxy_logging_obj: "ProxyLogging", user_api_key_dict: "
litellm/proxy/common_request_processing.py:1988
↓ 9 callersMethod_handle_pipeline_result
Handle a PipelineExecutionResult — allow, block, or modify_response. Returns data dict if allowed, raises on block/modify_response.
litellm/proxy/utils.py:1259
↓ 9 callersMethod_http_server
(self, **overrides: Any)
tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_server_manager.py:4819
↓ 9 callersMethod_is_gemini_3_or_newer
Check if the model is Gemini 3 Pro or newer. Gemini 3 models include: - gemini-3-pro-preview - gemini-3-flash
litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py:274
↓ 9 callersFunction_key_access_group_grants_model
Returns True if the key's `access_group_ids` expand to models that grant access to `model`. Used to let a key's access group override a team'
litellm/proxy/auth/auth_checks.py:3204
↓ 9 callersFunction_list_key_helper
Helper function to list keys Args: page: int size: int user_id: Optional[str] team_id: Optional[str]
litellm/proxy/management_endpoints/key_management_endpoints.py:5353
↓ 9 callersFunction_load
(name: str)
tests/test_litellm/router_strategy/adaptive_router/test_signals.py:18
↓ 9 callersMethod_make_auth
(self, org_id=None, team_id=None)
tests/test_litellm/proxy/_experimental/mcp_server/auth/test_user_api_key_auth_mcp.py:3652
↓ 9 callersFunction_make_batch_db_record
Create a mock batch database record.
tests/test_litellm/enterprise/proxy/test_file_deletion_blocking.py:41
↓ 9 callersFunction_make_claim_request
(token: str | None = None)
tests/test_litellm/proxy/auth/test_onboarding.py:88
↓ 9 callersFunction_make_client
Build a minimal stand-in for PrismaClient that exposes only the surface `call_with_db_reconnect_retry` actually pokes at.
tests/test_litellm/proxy/db/test_exception_handler_reconnect_retry.py:24
↓ 9 callersMethod_make_filter
(self)
tests/test_litellm/proxy/_experimental/mcp_server/test_semantic_tool_filter.py:895
↓ 9 callersFunction_make_guardrail
()
tests/test_litellm/proxy/utils/proxy_logging/test_guardrail_pipeline.py:77
↓ 9 callersFunction_make_history
(n_pairs: int, result_filler: str = "x" * 200)
tests/test_litellm/llms/anthropic/experimental_pass_through/context_management/test_clear_tool_uses.py:43
↓ 9 callersFunction_make_logging_obj
Return a mock LiteLLMLoggingObj pre-configured for prompt management.
tests/test_litellm/responses/test_responses_prompt_management.py:30
↓ 9 callersFunction_make_org
(organization_id="org-1", members=None, models=None)
tests/test_litellm/proxy/test_team_org_move.py:29
↓ 9 callersFunction_make_output_message
Build a mock ResponseOutputMessage with output_text parts.
tests/test_litellm/llms/anthropic/experimental_pass_through/responses_adapters/test_responses_adapters_transformation.py:876
↓ 9 callersFunction_make_router
( available=("gpt-4o-mini", "gpt-4o"), prefs=None, costs=None, )
tests/test_litellm/router_strategy/adaptive_router/test_e2e_adaptive_router.py:30
↓ 9 callersMethod_make_server
( self, server_id: str, server_name: str, alias=None, name=None, )
tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_server_manager.py:3824
↓ 9 callersFunction_make_team
(team_id="team-1", member_ids=None, organization_id=None)
tests/test_litellm/proxy/test_team_org_move.py:49
↓ 9 callersFunction_make_team_key
(token: str, team_id: str = "team-abc")
tests/test_litellm/proxy/management_endpoints/test_key_management_endpoints.py:10920
↓ 9 callersFunction_make_unified_batch_id
Create a base64-encoded unified batch ID.
tests/test_litellm/enterprise/proxy/test_file_deletion_blocking.py:27
↓ 9 callersFunction_make_unified_vs_id
Build a valid base64-encoded unified vector-store ID.
tests/test_litellm/llms/test_file_search_responses.py:32
↓ 9 callersFunction_make_user_key
( user_id="org-admin-user", role=LitellmUserRoles.INTERNAL_USER.value )
tests/test_litellm/proxy/management_endpoints/test_org_admin_team_access.py:48
← previousnext →1,801–1,900 of 68,180, ranked by callers