MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions202,479 in github.com/BerriAI/litellm

↓ 13 callersMethodasync_upload_data_to_s3
(self, batch_logging_element: s3BatchLoggingElement)
tests/unit/integrations/test_s3_v2.py:4261
↓ 13 callersFunctionattach_post_call_pipelines_to_retrieval
( data: dict[str, object], # mutable-ok: request-state dict the policy engine hooks all write in place
litellm/proxy/policy_engine/response_retrieval.py:107
↓ 13 callersMethodattempt_db_reconnect
Attempt to reconnect the Prisma client in a singleflight manner. `force` bypasses the cooldown unconditionally; `force_recreate`
litellm/proxy/utils.py:7781
↓ 13 callersFunctionattempt_failure
(error: BaseException)
litellm/router_rust/core.py:532
↓ 13 callersMethodattempts_on
(self, backend: str, marker: str)
tests/integration/routing/test_messages_stream_retry_budget_sources_owned_proxy.py:183
↓ 13 callersFunctionattribute_items
(source: object, name: str)
litellm/litellm_core_utils/core_helpers.py:213
↓ 13 callersFunctionbefore_provider_request
(script: &CStr, body: Value)
litellm-rust/crates/callbacks-legacy-python/src/adapter.rs:1152
↓ 13 callersMethodbill_if_finished
( self, response_id: str, response: ResponsesAPIResponse, track_untracked: _Un
litellm/proxy/response_api_endpoints/endpoints.py:1040
↓ 13 callersMethodblock_on
(&self, future: F)
litellm-rust/crates/cache-s3/src/cache.rs:94
↓ 13 callersMethodbody
(self, model: str, tools: Sequence[JsonValue], text: str = _PROMPT)
tests/integration/providers/test_chat_template_tool_count_wire.py:105
↓ 13 callersFunctionbuild_generated_model_list
Build the model_list for the ephemeral proxy's config.yaml. Every real model referenced anywhere (tier targets, classifier, embedding) is dedupli
litellm/proxy/client/cli/commands/autoroute/config.py:147
↓ 13 callersFunctionc
()
litellm/proxy/_experimental/out/_next/static/chunks/2aatum0yo4cv8.js:1
↓ 13 callersFunctioncalculate_grounding_requests
Billable grounding requests across candidates, counting each distinct query once. Duplicate queries within and across grounding metadata items co
litellm/llms/vertex_ai/gemini/grounding_requests.py:37
↓ 13 callersMethodcall
( &self, request: impl FnOnce(Reply<A>) -> P::HostCall + Send, )
litellm-rust/crates/host/src/machine/context.rs:66
↓ 13 callersMethodcall
(&self, event: &CallEvent)
litellm-rust/crates/python-bridge/src/redis/events.rs:167
↓ 13 callersMethodcan_user_attach_credential
( litellm_params: GenericLiteLLMParams | None, user_api_key_dict: UserAPIKeyAuth, exis
litellm/proxy/management_endpoints/model_management_endpoints.py:2683
↓ 13 callersMethodcarry_failed_attempt_usage
Move what a failed earlier attempt stashed off the retry sharing this logging object, so the retry logs its own usage while the request's fail
litellm/litellm_core_utils/litellm_logging.py:2780
↓ 13 callersFunctionchat
(gateway: Gateway, body: Mapping[str, JsonValue], *, key: str | None = None)
tests/integration/providers/_tool_search_support.py:236
↓ 13 callersMethodchat_raw
( self, key: str, model: str, text: str, *, stream: bool = Fal
tests/e2e/logging/logging_client.py:500
↓ 13 callersMethodcheck_eu_ai_act
Check EU AI Act compliance. Returns: List of compliance check results for: - Art. 9: Guardrails applied
litellm/proxy/compliance_checks.py:213
↓ 13 callersFunctioncheck_passthrough_routes_caller_permission
Only proxy admins may set `allowed_passthrough_routes` or `denied_passthrough_routes` (top-level or under `metadata`), since the runtime rout
litellm/proxy/management_endpoints/common_utils.py:167
↓ 13 callersFunctioncheck_vector_store_permission
Check if a specific permission is allowed for a given vector store index. Args: index_name: The name of the vector store index
litellm/proxy/vector_store_endpoints/utils.py:366
↓ 13 callersFunctionclaim_onboarding_link
Special route. Allows UI link share user to update their password. - Get the invite link - Validate it's still 'valid' - Check if us
litellm/proxy/proxy_server.py:19921
↓ 13 callersFunctionclassify
(resp: ClassifiableResponse, response_type: type[R])
tests/e2e/e2e_http.py:419
↓ 13 callersFunctionclear_cache
Clear router caches and reload models. Returns what the reload saw (see ReconcileOutcome) so callers can pass it to raise_if_reload_degr
litellm/proxy/management_endpoints/model_management_endpoints.py:4038
↓ 13 callersMethodclient
A client for the current connection, kept while the connection is unchanged so its token is reused.
litellm/integrations/zerobus/logger.py:115
↓ 13 callersMethodclient
(&self)
litellm-rust/crates/redis-store/src/remote.rs:33
↓ 13 callersFunctioncommit_gateway_requests_to_db
Increment request totals and failed status-code counts in bounded statements. Returns the rows that were not written (the failed chunk and e
litellm/proxy/db/gateway_request_tracking.py:229
↓ 13 callersFunctioncompaction_summary
(item: object)
litellm/responses/litellm_completion_transformation/compaction_items.py:155
↓ 13 callersMethodcomplete
()
litellm/proxy/_experimental/out/_next/static/chunks/2aatum0yo4cv8.js:1
↓ 13 callersFunctioncompute_autorouter_savings
Price established baseline usage; conversation shape cannot establish cache warmth.
litellm/proxy/spend_tracking/savings.py:331
↓ 13 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/mcp_server/utils.py:121
↓ 13 callersMethodcontent_of
(index: object)
tests/unit/proxy/guardrails/guardrail_hooks/test_tool_permission.py:3748
↓ 13 callersMethodconvert_tool_response_to_message
( cls, tool_calls: list[ChatCompletionToolCallChunk], # mutable-ok: mirrors override contract
litellm/llms/anthropic/chat/transformation.py:3445
↓ 13 callersMethodcount
(self, key: str)
tests/unit/router_strategy/test_least_busy.py:57
↓ 13 callersMethodcounter
(self, kind: CounterKind)
litellm/redis/stores/rate_limits/types.py:27
↓ 13 callersFunctioncp
(e,t,n)
litellm/proxy/_experimental/out/_next/static/chunks/0_6jqgnorqxl2.js:1
↓ 13 callersMethodcreate
(self, **kwargs)
tests/unit/llms/azure/test_azure.py:32
↓ 13 callersMethodcreate_aiohttp_transport
Creates an AiohttpTransport with RequestNotRead error handling Note: aiohttp TCPConnector ssl parameter accepts: - SSLContex
litellm/llms/custom_httpx/http_handler.py:1428
↓ 13 callersFunctioncreate_model_call_details
Create model_call_details dict with standard_logging_object.
tests/unit/integrations/test_custom_logger.py:77
↓ 13 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:731
↓ 13 callersFunctiondelete_cache_key_objects
Evict a batch of deleted key objects here and on every other worker. Auth resolves a cached key object without re-reading its team, so a key
litellm/proxy/auth/auth_checks.py:3514
↓ 13 callersFunctiondelete_group
(candidate: Gateway, team: str, *, key: str | None = None)
tests/integration/_support/scim.py:109
↓ 13 callersFunctiondelete_team
delete team and associated team keys Parameters: - team_ids: List[str] - Required. List of team IDs to delete. Example: ["team-1234", "t
litellm/proxy/management_endpoints/team_endpoints.py:4749
↓ 13 callersFunctiondelete_verification_tokens
Helper that deletes the list of tokens from the database - check if user is proxy admin - check if user is team admin and key is a team
litellm/proxy/management_endpoints/key_management_endpoints.py:5677
↓ 13 callersMethoddeployment
(&self, id: &str)
litellm-rust/crates/router-core/src/registry.rs:875
↓ 13 callersMethoddeserialize
Decode a cache entry to ``model_type``. - ``None`` → ``None`` - Already an instance of ``model_type`` (including subclasses)
litellm/proxy/common_utils/cache_pydantic_utils.py:70
↓ 13 callersMethoddict
(self)
litellm/proxy/management_endpoints/key_management_endpoints.py:237
↓ 13 callersMethoddiscover_models
Live model discovery for a configured deployment. Defaults to the api_key/api_base facade every provider already implements via ``get
litellm/llms/base_llm/base_utils.py:96
↓ 13 callersMethoddrain
Half-close every producer connection, then keep reading until each producer hangs up or ``timeout``. Returns how many producer connections we
litellm/proxy/collector.py:114
↓ 13 callersFunctiondynamic_otlp_headers
Per-request OTLP headers for ``callback_name``, or ``None`` if N/A. ``None`` means "no per-request routing" — the caller uses its default tracer.
litellm/integrations/otel/presets/__init__.py:104
↓ 13 callersFunctionee
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/2_9r2jeem0dh8.js:1
↓ 13 callersFunctionembedding
( model, input=[], # Optional params dimensions: int | None = None, encoding_format: str |
litellm/main.py:6859
↓ 13 callersFunctionencrypt_guardrail_litellm_params
Encrypt every string stored under a sensitive key (at any dict depth) for the guardrails table.
litellm/proxy/guardrails/guardrail_registry.py:170
↓ 13 callersFunctionenforce_key_and_fallback_model_access
Key-level model allowlist and client fallbacks (same as standard auth). Not included in common_checks — common_checks enforces team/user/proj
litellm/proxy/auth/user_api_key_auth.py:4879
↓ 13 callersFunctionensure_fresh_login
(ctx: click.Context)
litellm/proxy/client/cli/commands/up.py:128
↓ 13 callersMethodenum
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 13 callersFunctioneo
(e,a)
litellm/proxy/_experimental/out/_next/static/chunks/2r8xiri7nad3g.js:1
↓ 13 callersFunctionerror_body
(status: int, message: str)
tests/integration/_support/anthropic_sse.py:112
↓ 13 callersFunctionerror_lines
(output: str)
tests/integration/database/test_v1_migration_error_logging.py:183
↓ 13 callersFunctiones
(e)
litellm/proxy/_experimental/out/_next/static/chunks/3ndfu962692da.js:1
↓ 13 callersFunctionevent_list
A transform_stream_line result. One place builds it so every parser returns the same shape.
litellm/llms/base_llm/harness/transformation.py:34
↓ 13 callersMethodevent_stream_items
The upstream event stream of ``endpoint`` cut into the items the provider's guardrail translation scans, or None when the provider has no stre
litellm/llms/pass_through/guardrail_translation/handler.py:380
↓ 13 callersFunctionexchange_login_assertion_for_refresh_token
The assertion as captured when no server wants a refresh token, otherwise the assertion plus the refresh token one target's IdP client can redeem.
litellm/proxy/mcp_server/outbound_credentials/login_assertion_exchange.py:127
↓ 13 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:54
↓ 13 callersMethodfetch
(&self, url: Url, policy: DownloadPolicy)
litellm-rust/crates/http/src/media.rs:146
↓ 13 callersFunctionfetch_mcp_server
Get the info on the mcp server specified by the `server_id` Parameters: - server_id: str - Required. The unique identifier of
litellm/proxy/management_endpoints/mcp_management_endpoints.py:1934
↓ 13 callersMethodfile_id
(self, filename: str)
tests/integration/management/test_vector_store_file_list_managed_ids.py:389
↓ 13 callersFunctionfilter_team_based_models
If a model has a team_id Only use if request is from that team
litellm/litellm_core_utils/routing_common_utils.py:330
↓ 13 callersMethodfind_and_validate_specific_team_id
Find and validate specific team ID from team_id_jwt_field or team_alias_jwt_field
litellm/proxy/auth/handle_jwt.py:1603
↓ 13 callersMethodfind_unique
( self, where: Mapping[str, object], include: Mapping[str, object] | None = None )
litellm/repositories/prisma_protocols.py:28
↓ 13 callersMethodfinish
(self, output: OutputOf<P>, source: &ResultSource)
litellm-rust/crates/inference/src/caching.rs:279
↓ 13 callersFunctionfinite_cost
(value: object)
litellm/litellm_core_utils/core_helpers.py:1052
↓ 13 callersFunctionfixed_private_key
(value: int = _FIXED_PRIVATE_VALUE)
tests/unit/llms/base_llm/auth/test_jwt_signing.py:29
↓ 13 callersFunctionfixture_proc
(name: str, **kwargs)
tests/unit/llms/opencode/harness/test_transformation.py:192
↓ 13 callersFunctionflag
(argv: Sequence[str], name: str)
tests/unit/llms/pi/harness/test_transformation.py:256
↓ 13 callersFunctionflush_tool_usage_transactions
Write the index rows as bounded standalone statements, then every rollup upsert for the drained queue batch in one transaction. One flush fans out
litellm/proxy/db/spend_log_tool_index.py:194
↓ 13 callersFunctionfu
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0_6jqgnorqxl2.js:1
↓ 13 callersFunctionfunction_call
(name: str, arguments: str, call_id: str = "call-1")
tests/unit/harness/handlers/test_tool_loop_handler.py:63
↓ 13 callersMethodget
(self, server_id: str, config: ClientCredentialsConfig)
litellm/proxy/mcp_server/outbound_credentials/client_credentials.py:213
↓ 13 callersFunctiongetGuardrailsList
(accessToken: string)
ui/litellm-dashboard/src/components/networking.tsx:3504
↓ 13 callersFunctiongetSecureItem
(key: string)
ui/litellm-dashboard/src/utils/secureStorage.ts:19
↓ 13 callersMethodget_access_token
(self, credentials, project_id, _retry_reauth=False)
tests/unit/llms/vertex_ai/files/test_vertex_ai_files_streaming.py:853
↓ 13 callersFunctionget_base_url
Extract base URL from OpenAPI spec.
litellm/proxy/mcp_server/openapi_to_mcp_generator.py:331
↓ 13 callersMethodget_chat_completion_message_history_for_previous_response_id
Return the chat completion message history for a previous response id
litellm/responses/litellm_completion_transformation/session_handler.py:297
↓ 13 callersMethodget_complete_url
( self, api_base: str | None, api_key: str | None, model: str, optiona
litellm/llms/gdc/chat/transformation.py:102
↓ 13 callersMethodget_configured_token_limits
(self, model_name: str)
litellm/router_deprecated.py:605
↓ 13 callersMethodget_deployment_model_info
(self, model_id: str, model_name: str)
litellm/router_deprecated.py:376
↓ 13 callersFunctionget_dynamic_logging_metadata
( user_api_key_dict: UserAPIKeyAuth, proxy_config: ProxyConfig )
litellm/proxy/litellm_pre_call_utils.py:1273
↓ 13 callersMethodget_experimental_ui_login_jwt_auth_token
(user_info: LiteLLM_UserTable)
litellm/proxy/auth/auth_checks.py:4077
↓ 13 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:100
↓ 13 callersMethodget_key_object_from_ui_hash_key
( hashed_token: str, )
litellm/proxy/auth/auth_checks.py:4183
↓ 13 callersMethodget_model_group_usage
(self, model_group: str)
litellm/router_deprecated.py:693
↓ 13 callersFunctionget_openai_response_types
()
litellm/responses/streaming_iterator.py:112
↓ 13 callersMethodget_policy
Get a policy by name. Args: policy_name: Name of the policy to retrieve Returns: Policy object if f
litellm/proxy/policy_engine/policy_registry.py:278
↓ 13 callersMethodget_prompt_caching_cache_key
( messages: list[AllMessageValues] | None, tools: Sequence[ChatCompletionToolParam] | None,
litellm/router_utils/prompt_caching_cache.py:397
↓ 13 callersMethodget_redirect_response_from_openid
( result: OpenID | dict | CustomOpenID, request: Request, received_response: dict | No
litellm/proxy/management_endpoints/ui_sso.py:3929
↓ 13 callersMethodget_request_headers
( self, credentials: Credentials | None, aws_region_name: str, extra_headers:
litellm/llms/bedrock/base_aws_llm.py:1552
↓ 13 callersMethodget_requested_response_api_optional_param
Filter parameters to only include those defined in ResponsesAPIOptionalRequestParams. Args: params: Dictionary of parame
litellm/responses/utils.py:356
↓ 13 callersMethodget_source
Return the provenance of an in-memory policy, or None if unknown.
litellm/proxy/policy_engine/policy_registry.py:338
← previousnext →4,901–5,000 of 202,479, ranked by callers