MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions202,479 in github.com/BerriAI/litellm

↓ 3 callersMethodadd_llm_api_request_schema_body
Add LLM API request schema bodies to OpenAPI specification for documentation. Args: openapi_schema: The base OpenAPI sch
litellm/proxy/common_utils/custom_openapi_spec.py:420
↓ 3 callersMethodadd_management_endpoint_metadata_to_request_metadata
Adds the `UserAPIKeyAuth` metadata to the request metadata. ignore any sensitive fields like logging, api_key, etc.
litellm/proxy/litellm_pre_call_utils.py:2170
↓ 3 callersMethodadd_message
( self, thread_id: str, message_data: dict, api_key: str | None, api_
litellm/llms/openai/openai.py:2735
↓ 3 callersMethodadd_model_id
( self, model_id: str, messages: list[AllMessageValues] | None, tools: Sequenc
litellm/router_utils/prompt_caching_cache.py:404
↓ 3 callersMethodadd_phase_event
Mark a point in the request on its root span, or on the ambient span before the root is anchored.
litellm/integrations/otel/logger.py:803
↓ 3 callersFunctionadd_policy_to_applied_policies_header
Add a policy name to the applied_policies list in request metadata. This is used to track which policies were applied to a request, simi
litellm/proxy/common_utils/callback_utils.py:642
↓ 3 callersMethodadd_pre_call_flush_hook
Called before every pre-call flush so late readers can declare into the same trip. The hook runs with this request active, so a ``Batch.PRE_CA
litellm/caching/redis_batch.py:600
↓ 3 callersMethodadd_project_io_token_rate_limit_descriptors_from_metadata
( self, user_api_key_dict: UserAPIKeyAuth, requested_model: str | None, descri
litellm/proxy/hooks/parallel_request_limiter_v3.py:3227
↓ 3 callersMethodadd_request_schema
Generic method to add a request schema to OpenAPI specification. Args: openapi_schema: The OpenAPI schema dict to modify
litellm/proxy/common_utils/custom_openapi_spec.py:293
↓ 3 callersMethodadd_search_tool_to_db
Add a search tool to the database. Args: search_tool: Search tool configuration prisma_client: Prisma client
litellm/proxy/search_endpoints/search_tool_registry.py:233
↓ 3 callersMethodadd_session_state
Last-write-wins per session row. The state_dict is a snapshot of the SessionState (signals counts + bookkeeping fields). The flusher
litellm/router_strategy/adaptive_router/update_queue.py:76
↓ 3 callersMethodadd_spend_log_transaction_to_daily_end_user_transaction
( self, payload: SpendLogsPayload, prisma_client: PrismaClient | None = None, )
litellm/proxy/db/db_spend_update_writer.py:3264
↓ 3 callersMethodadd_spend_log_transaction_to_daily_org_transaction
( self, payload: SpendLogsPayload, prisma_client: PrismaClient | None = None,
litellm/proxy/db/db_spend_update_writer.py:3231
↓ 3 callersMethodadd_spend_log_transaction_to_daily_tag_transaction
( self, payload: SpendLogsPayload, prisma_client: PrismaClient | None = None, )
litellm/proxy/db/db_spend_update_writer.py:3324
↓ 3 callersMethodadd_team_langfuse_callback
( self, team_id: str, creds: LangfuseCreds, *, callback_type: Literal[
tests/e2e/logging/logging_client.py:412
↓ 3 callersFunctionadd_team_spend
( executor: impl PgExecutor<'_>, spend: &EntitySpend, )
litellm-rust/crates/db/src/spend/team_spend.rs:6
↓ 3 callersFunctionadd_upstream_headers
(gateway: Gateway, peer: McpPeer, key: str, identity: str, a: int = 2)
tests/integration/mcp/test_mcp_user_env_vars.py:88
↓ 3 callersFunctionadd_user_spend
( executor: impl PgExecutor<'_>, spend: &EntitySpend, )
litellm-rust/crates/db/src/spend/user_spend.rs:6
↓ 3 callersMethodadded
A deployment joined the list at `position` (`_add_deployment` then `_add_model_to_list_and_index_map`); `add` is `add_deployment`, which also names it
litellm-rust/crates/router-core/src/host_index.rs:129
↓ 3 callersFunctionadditional_tools_in_input
(input: object)
litellm/responses/additional_tools.py:91
↓ 3 callersFunctionaddr
(host: &str, port: u16, tls: Option<&TlsOptions>)
litellm-rust/crates/redis-client/src/config.rs:232
↓ 3 callersFunctionadminHeaders
()
tests/e2e/ui/tests/playground/decisionsResponseHeader.spec.ts:15
↓ 3 callersFunctionadmin_ui_disabled
()
litellm/proxy/common_utils/admin_ui_utils.py:106
↓ 3 callersMethodadmin_view_unscoped
Whether this principal's admin-view role grants the unscoped MCP resolution, whatever credential carries it (admin key, dashboard session, or
litellm/proxy/mcp_server/auth/user_api_key_auth_mcp.py:4297
↓ 3 callersMethodadmit_series
( self, metric: _RemovableMetric, metric_name: str, label_values: tuple[str |
litellm/integrations/prometheus_helpers/bounded_prometheus_series_tracker.py:75
↓ 3 callersMethodadmitted_subject_sources
The independent sources a keyless admitted subject reaches MCP servers through: their own direct grants, plus every team they are a live roste
litellm/proxy/mcp_server/auth/user_api_key_auth_mcp.py:2340
↓ 3 callersFunctionadmitted_user_context
THE owner of "resolve this dashboard session's user identity": the same admitted-subject auth a gateway OAuth session for this user resolves with,
litellm/proxy/mcp_server/ui_session_utils.py:91
↓ 3 callersMethodaembed_query
( self, query_text: str, litellm_params: Mapping[str, object], embedding_execu
litellm/llms/base_llm/vector_store/transformation.py:359
↓ 3 callersMethodaembedding
( self, model: str, data: dict, model_response: EmbeddingResponse, inp
litellm/llms/azure/azure.py:678
↓ 3 callersMethodaembedding
(self, model, input, model_response, **kwargs)
tests/unit/caching/test_caching.py:397
↓ 3 callersMethodaencode_queries
(self, docs: list[str], **kwargs)
litellm/router_strategy/auto_router/litellm_encoder.py:132
↓ 3 callersFunctionaexchange_token
( client: AsyncHTTPHandler, config: OAuthTokenExchangeConfig, subject_token: str, timeout: flo
litellm/litellm_core_utils/oauth_token_exchange.py:282
↓ 3 callersMethodaexecute_search_vector_store_request
( self, vector_store_id: str, query: str | Sequence[str], vector_store_search_
litellm/llms/valkey/vector_stores/transformation.py:259
↓ 3 callersMethodafter_provider_response
(&self, raw: RawResponse)
litellm-rust/crates/host-native/tests/driver.rs:126
↓ 3 callersFunctionagentDisplayLabel
(label: string, t: TFunction)
ui/litellm-dashboard/src/app/(dashboard)/usage/_components/components/overview/agentCatalog.ts:247
↓ 3 callersFunctionagent_skill_frontmatter
(manifest: bytes)
litellm/proxy/discovery_endpoints/agent_skills_archive.py:246
↓ 3 callersFunctionaget
Async: Get a specific agent by id (``name`` is an alias of ``id``).
litellm/interactions/agents/main.py:425
↓ 3 callersMethodaget_token
(self, spec: TokenExchangeSpec)
litellm/llms/base_llm/auth/token_exchange.py:708
↓ 3 callersFunctionaggregate_tool_discoveries
Collapse items to one per tool_name, summing call_count, in first-seen order.
litellm/proxy/db/db_transaction_queue/tool_discovery_queue.py:25
↓ 3 callersMethodaglob
(self, pattern: str, path: str | None = None)
litellm/llms/deepagents/harness/sandbox_backend.py:309
↓ 3 callersFunctionah
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 3 callersFunctionah
litellm/proxy/_experimental/out/_next/static/chunks/138wymdv6q3wy.js:1
↓ 3 callersFunctionai
litellm/proxy/_experimental/out/_next/static/chunks/138wymdv6q3wy.js:1
↓ 3 callersFunctionaimage_edit
Asynchronously calls the `image_edit` function with the given arguments and keyword arguments. Parameters: - `args` (tuple): Positional
litellm/images/main.py:1135
↓ 3 callersMethodaimage_generation
( self, data: dict, model_response: ImageResponse | None, azure_client_params:
litellm/llms/azure/azure.py:991
↓ 3 callersMethodaiter_bytes
( self, iterator: AsyncIterator[bytes] )
litellm/types/utils.py:3997
↓ 3 callersMethodaiter_bytes
Given an async iterator that yields lines, iterate over it & yield every event encountered
litellm/llms/bedrock/chat/invoke_handler.py:870
↓ 3 callersFunctionaj
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 3 callersMethodall_blocked
Whether every deployment in the list is paused (was ``are_all_deployments_blocked``).
litellm/router_api.py:1338
↓ 3 callersMethodallowed_fails_is_default
``allowed_fails`` does not count as set on the router (``_is_allowed_fails_set_on_router``): not passed explicitly, and the value copied at in
litellm/router_rust/core.py:924
↓ 3 callersFunctionam
({models:e,value:t,onChange:r,disabled:a,compact:s=!1})
litellm/proxy/_experimental/out/_next/static/chunks/2j7hjtph8n74b.js:36
↓ 3 callersFunctionamount
(value: JsonValue)
tests/integration/streaming/test_mid_stream_fallback_continuation.py:454
↓ 3 callersFunctionanswer
(identity: str, text: str)
tests/integration/messages_endpoint/safeguards/test_safeguard_results_synthesized_streams.py:189
↓ 3 callersFunctionanswer
(request: httpx.Request)
tests/unit/decisions/test_main.py:4123
↓ 3 callersFunctionanswer_all
( gateway: Gateway, calls: tuple[Call, ...], *, tolerate_transport_errors: bool = False )
tests/integration/providers/_assistants_route_errors_support.py:388
↓ 3 callersFunctionanswer_json_text
(value: AnswerValue, *, ensure_ascii: bool)
litellm/llms/base_llm/base_utils.py:254
↓ 3 callersFunctionanswered_status_code
(message: str, status_code: int)
litellm/proxy/common_utils/openai_error_payload.py:191
↓ 3 callersFunctionanthropic_accepts_user_id
(user_id: str, max_length: int)
litellm/llms/anthropic/common_utils.py:237
↓ 3 callersFunctionanthropic_client
(gateway: Gateway)
tests/integration/providers/_count_tokens_system_lift.py:217
↓ 3 callersFunctionanthropic_client
(candidate: Gateway, key: str)
tests/integration/authorization/_hidden_alias_budget.py:317
↓ 3 callersFunctionanthropic_content_lists
(messages: Sequence[object])
litellm/litellm_core_utils/prompt_templates/reasoning_utils.py:275
↓ 3 callersFunctionanthropic_message_delta_fields
The ``stop_details`` and ``safeguard_results`` of the stream's ``message_delta``. The assembled OpenAI shape has no slot for them, and a client t
litellm/llms/anthropic/messages/stream_assembly.py:535
↓ 3 callersFunctionanthropic_message_id
The `msg_...` id the caller was served, which is what the spend row is keyed by on this route: off the `message_start` frame when streaming, off t
tests/e2e/llm_translation/passthrough_client.py:184
↓ 3 callersFunctionanthropic_messages_optional_param_keys
Valid AnthropicMessagesRequestOptionalParams keys. ``typing.get_type_hints`` is ~80us/call and this TypedDict is static, so resolving it
litellm/llms/anthropic/messages/native/utils.py:283
↓ 3 callersFunctionanthropic_pass_through_api_base
()
litellm/llms/anthropic/common_utils.py:207
↓ 3 callersFunctionanthropic_peer
(request: Request)
tests/integration/messages_endpoint/providers/anthropic/test_anthropic_safeguards_beta_wire.py:125
↓ 3 callersFunctionanthropic_response_body
(*, model: str = "claude-sonnet-5")
tests/rust-python-harness/strategies/trace_parity/fixtures.py:87
↓ 3 callersFunctionanthropic_sse_frame
(event: Mapping[str, object])
litellm/llms/anthropic/messages/utils.py:178
↓ 3 callersFunctionanthropic_system_blocks
The top-level ``system`` blocks for a run of system messages: every non-empty text part in order, each keeping its ``cache_control``, which is the
litellm/litellm_core_utils/prompt_templates/mid_conversation_system.py:177
↓ 3 callersFunctionanthropic_tool_names
Every name a /v1/messages tool dict can act under: the flat Anthropic ``name`` plus ``function.name`` for OpenAI-format tools the bridge forwards
litellm/llms/base_llm/guardrail_translation/utils.py:342
↓ 3 callersFunctionapi_base_line
(alert: str)
tests/integration/observability/test_stream_error_alert_api_base.py:142
↓ 3 callersFunctionapi_key_header_for_base
(api_base: str | None)
litellm/llms/azure_ai/common_utils.py:33
↓ 3 callersFunctionapoll_device_flow
(device_code: str, endpoints: GithubHostEndpoints)
litellm/llms/github_copilot/per_user_auth.py:463
↓ 3 callersFunctionapp_with_permissions
( model: &str, api_base: &str, permissions: litellm_gateway_auth::Permissions, )
litellm-rust/crates/gateway-inference/tests/support/mod.rs:38
↓ 3 callersMethodappendMap
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/085r5ieqhajig.js:1
↓ 3 callersFunctionapplied_edit
(body: dict[str, JsonValue])
tests/integration/messages_endpoint/safeguards/test_safeguard_results_compaction.py:97
↓ 3 callersMethodapply
(&self, mut response: axum::response::Response)
litellm-rust/crates/gateway-inference/src/caching.rs:103
↓ 3 callersMethodapply
( &self, headers: Vec<(String, String)>, kind: CredentialPlanKind, credential:
litellm-rust/crates/auth-types/src/policy.rs:48
↓ 3 callersFunctionapplyAddOnlySettings
(d *schema.ResourceData, payload map[string]interface{})
terraform/provider/litellm/resource_team_member_add.go:81
↓ 3 callersFunctionapplyBudgetPrecision
(formValues: TValues)
ui/litellm-dashboard/src/app/(dashboard)/budgets/_components/budgetPrecision.ts:12
↓ 3 callersFunctionapplyPatch
(s,o,i,a,u)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 3 callersFunctionapplyToolPermissionWrite
({ toolPermissions, entry, allowed, }: { readonly toolPermissions: Readonly<Record<string, readonly st
ui/litellm-dashboard/src/components/mcp_server_management/effectiveMcpServers.ts:153
↓ 3 callersFunctionapplyWidth
(next: number, persist: boolean)
ui/litellm-dashboard/src/components/ui/ResizableSheetContent.tsx:66
↓ 3 callersMethodapply_agent_caller_ceiling
Narrow an agent key's servers to those the invoking user and team (echoed back by the agent as ``x-litellm-user-id`` / ``x-litellm-team-id``)
litellm/proxy/mcp_server/auth/user_api_key_auth_mcp.py:4264
↓ 3 callersMethodapply_agent_caller_tool_ceiling
Narrow an agent key's tools on ``server_id`` to those the invoking user and team (echoed back by the agent as ``x-litellm-user-id`` / ``x-lite
litellm/proxy/mcp_server/auth/user_api_key_auth_mcp.py:4373
↓ 3 callersFunctionapply_bedrock_invoke_structured_output
Route Anthropic structured-output params to what the Bedrock model supports. Consumes the legacy top-level ``output_format`` and the newer
litellm/llms/bedrock/common_utils.py:628
↓ 3 callersFunctionapply_display_name_overrides
Apply admin-configured display name overrides, keyed by the unprefixed tool name like allowed_tools.
litellm/proxy/mcp_server/operations.py:824
↓ 3 callersMethodapply_forward_metadata_to_completion_params
Attach A2A metadata to completion kwargs for provider bridges (e.g. LangGraph). Uses ``extra_body`` so we do not collide with LiteLL
litellm/a2a_protocol/litellm_completion_bridge/transformation.py:101
↓ 3 callersMethodapply_guardrail
Apply the custom code guardrail to the inputs. This method calls the user-defined apply_guardrail function and processes its
litellm/proxy/guardrails/guardrail_hooks/custom_code/custom_code_guardrail.py:238
↓ 3 callersMethodapply_guardrail
For requests: Append [GUARDRAILED] to text For responses: Block by raising HTTPException (masking responses is no longer supported)
tests/unit/llms/openai/responses/test_openai_responses_guardrail_handler.py:78
↓ 3 callersMethodapply_guardrail
(self, inputs, request_data, input_type, logging_obj=None)
tests/unit/realtime_api/test_main.py:1650
↓ 3 callersFunctionapply_openai_param_overrides
If user passes in allowed_openai_params, apply them to optional_params These params will get passed as is to the LLM API since the user opte
litellm/utils.py:6288
↓ 3 callersFunctionapply_remaining_usage_headers
( additional_headers: dict[str, object], remaining_usage: Mapping[str, object], )
litellm/litellm_core_utils/add_retry_fallback_headers.py:203
↓ 3 callersMethodapply_response_schema_transformation
( self, value: dict, optional_params: dict, model: str, allow_integer_enums: bool = True )
litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py:1434
↓ 3 callersFunctionapply_unified_file_ids
(response: "LiteLLMBatch", unified_id_by_raw_id: Mapping[str, str])
litellm/proxy/openai_files_endpoints/common_utils.py:1453
↓ 3 callersFunctionapply_upstream_reported_operation
Record the GenAI operation the upstream named, overriding the route's label. An unknown name is ignored.
litellm/proxy/pass_through_endpoints/upstream_usage_headers.py:185
↓ 3 callersMethodapply_writer_url_to_env
Write just the assembled writer URL into ``os.environ``. Split out because the CLI shares this minting path but resolves the read rep
litellm/proxy/db/db_url_settings.py:605
↓ 3 callersMethodarelease_responses_websocket_slot
Release the slot a Responses WebSocket took at admission. Only call this once that admission succeeded: the legacy limiter keeps no record of
litellm/proxy/utils.py:5315
↓ 3 callersFunctionaresolve_api_key_secret_reference
( api_key: str | None, model: object, llm_provider: object, upstream: Mapping[str, object] )
litellm/utils.py:807
↓ 3 callersMethodaretrieve_fine_tuning_job
( self, fine_tuning_job_id: str, openai_client: AsyncOpenAI | AsyncAzureOpenAI, )
litellm/llms/openai/fine_tuning/handler.py:253
← previousnext →25,901–26,000 of 202,479, ranked by callers