MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions202,479 in github.com/BerriAI/litellm

↓ 7 callersMethodaguardrail
Pick one of the guardrails named ``guardrail_name`` (weighted) and run it. A guardrail name is no model group, so the router's retries never a
litellm/router_rust/invoke/endpoints.py:2374
↓ 7 callersFunctionalert_naming
(alerts: Wire, marker: str)
tests/integration/observability/test_stream_error_alert_api_base.py:134
↓ 7 callersMethodallow
(self)
litellm/proxy/mcp_server/scope_challenge.py:43
↓ 7 callersMethodanonymize_text
Send analysis results to the Presidio anonymizer endpoint to get redacted text
litellm/proxy/guardrails/guardrail_hooks/presidio.py:918
↓ 7 callersFunctionanthropic_messages
Async: Make llm api request in Anthropic /messages API spec. Runs the empty-content-block sanitizer before any backend dispatch.
litellm/llms/anthropic/messages/native/handler.py:453
↓ 7 callersFunctionanthropic_model_capabilities
The capability probes the Rust messages route reads, once per model-map state: each probe walks the model map (``get_model_info`` plus generalizat
litellm/rust_bridge/host/model_capabilities.py:61
↓ 7 callersFunctionanthropic_process_openai_file_message
( message: ChatCompletionFileObject, )
litellm/litellm_core_utils/prompt_templates/factory.py:2342
↓ 7 callersFunctionanthropic_response
()
litellm-rust/crates/inference-chat/tests/request.rs:47
↓ 7 callersFunctionanthropic_response
(body: &str)
litellm-rust/crates/inference-chat/tests/chat_completions.rs:30
↓ 7 callersMethodapi_base
(self, mount: str)
tests/e2e/provider_edge.py:1166
↓ 7 callersMethodapi_base
(self)
tests/e2e/llm_translation/conversational_matrix.py:104
↓ 7 callersMethodapply
Apply metadata to the response object
litellm/litellm_core_utils/llm_response_utils/response_metadata.py:269
↓ 7 callersMethodapply_guardrail
Every stream check records, as the end-of-stream check can be skipped. Masking a stream blocks.
litellm/proxy/guardrails/guardrail_hooks/akto/akto.py:803
↓ 7 callersMethodapply_guardrail
Validate (and optionally redact) text via HiddenLayer before/after LLM calls.
litellm/proxy/guardrails/guardrail_hooks/hiddenlayer/hiddenlayer.py:269
↓ 7 callersMethodapply_guardrail
Validate (and optionally redact) text via HiddenLayer before/after LLM calls.
litellm/proxy/guardrails/guardrail_hooks/hiddenlayer/hiddenlayer.py:482
↓ 7 callersMethodapply_guardrail
Filters MCP tools the end user cannot access based on their object_permission.mcp_servers / mcp_access_groups settings.
litellm/proxy/guardrails/guardrail_hooks/mcp_end_user_permission/mcp_end_user_permission.py:53
↓ 7 callersFunctionapprox_equal
(actual: float, expected: float)
tests/integration/cost_calculation/conftest.py:84
↓ 7 callersFunctionaresponses
Async: Handles responses API requests by reusing the synchronous function
litellm/responses/main.py:912
↓ 7 callersFunctionaresponses_with_emulated_file_search
Emulated file_search for providers that don't support it natively. Replaces file_search tools with a function tool, intercepts the tool call
litellm/responses/file_search/emulated_handler.py:515
↓ 7 callersFunctionas_float
(value: object)
litellm/integrations/otel/model/utils.py:43
↓ 7 callersFunctionas_int
(value: object)
litellm/integrations/otel/model/utils.py:28
↓ 7 callersFunctionas_mapping
(value: object)
litellm/proxy/client/cli/commands/statusline_script.py:114
↓ 7 callersFunctionas_router
(core: RouterCore)
tests/unit/test_router/core/test_gaps_router_core_crate_picks.py:28
↓ 7 callersFunctionassertNotInfinite
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 7 callersFunctionassert_auth_denied
(result: StreamingResponse, context: str)
tests/e2e/e2e_http.py:266
↓ 7 callersFunctionassert_hooks
(records: HookRecords, surface: str, call_id: str, expected: list[str])
tests/integration/_support/hook_counts.py:322
↓ 7 callersFunctionassert_lands_once_as
(model: str, identities: Sequence[str], status: str)
tests/integration/providers/test_chat_completions_tool_search_wire.py:465
↓ 7 callersFunctionassert_preference_served
(gateway: Gateway, name: str, preference: str)
tests/integration/management/test_claude_code_plugin_installation_preference.py:124
↓ 7 callersFunctionassert_reached_with_the_deployment_credential
(rig: Rig, cell: str, attempts: int = 1)
tests/integration/observability/test_prometheus_provider_auth_failure.py:455
↓ 7 callersFunctionassert_search_call_answered
(answer: Answer, marker: str)
tests/integration/providers/test_chat_completions_tool_search_wire.py:396
↓ 7 callersFunctionassert_served
(outcomes: Sequence[Outcome], identity: Callable[[str], str])
tests/integration/routing/test_payment_required_cooldown.py:221
↓ 7 callersMethodassert_wire_contract
(self, batches: Sequence[Request], target: str = TRACE_PATH)
tests/integration/observability/test_langtrace_delivery.py:211
↓ 7 callersMethodasync_batch_get_cache_shared
`async_batch_get_cache` for several caches in one Redis round trip. Each cache still serves what it can from its own in-memory tier,
litellm/caching/dual_cache.py:414
↓ 7 callersMethodasync_failure_handler
( self, exception: Exception, traceback_exception: str, start_time: datetime.d
tests/unit/litellm_core_utils/audio_utils/test_transcription_streaming.py:92
↓ 7 callersMethodasync_generate_content_handler
Async version of the generate content handler. Uses async HTTP client to make requests.
litellm/llms/custom_httpx/llm_http_handler.py:12497
↓ 7 callersMethodasync_get_cache
(self, key, **kwargs)
tests/unit/test_scheduler.py:50
↓ 7 callersMethodasync_get_fully_unhealthy_model_names
(self)
litellm/router_deprecated.py:689
↓ 7 callersMethodasync_get_ttl
Get the remaining TTL of a key in in-memory cache or redis
litellm/caching/dual_cache.py:708
↓ 7 callersMethodasync_increment_cache
(self, key: str, value: float, **kwargs: object)
tests/unit/test_router/test_io_token_rate_limits.py:1884
↓ 7 callersMethodasync_key_generated_hook
Hook that runs after a successful /key/generate request Handles the following: - Sending Email with Key Details - St
litellm/proxy/hooks/key_management_event_hooks.py:44
↓ 7 callersMethodasync_key_rotated_hook
( data: RegenerateKeyRequest | None, existing_key_row: LiteLLM_VerificationToken, resp
litellm/proxy/hooks/key_management_event_hooks.py:165
↓ 7 callersMethodasync_log_failure_event
(self, kwargs, response_obj, start_time, end_time)
tests/unit/integrations/test_custom_callback_input.py:236
↓ 7 callersMethodasync_log_success_event
( self, kwargs: _PromptCachingSuccessEventKwargs, response_obj: object, start_
litellm/router_utils/pre_call_checks/prompt_caching_deployment_check.py:400
↓ 7 callersMethodasync_log_success_event
(self, kwargs, response_obj, start_time, end_time)
litellm/router_utils/pre_call_checks/model_rate_limit_check.py:480
↓ 7 callersMethodasync_moderation_hook
( self, data: dict, user_api_key_dict: UserAPIKeyAuth, call_type: CallTypesLit
litellm/proxy/guardrails/guardrail_hooks/aim/aim.py:157
↓ 7 callersFunctionasync_openai_client
(gateway: Gateway)
tests/integration/providers/_count_tokens_system_lift.py:234
↓ 7 callersMethodasync_post_call_streaming_iterator_hook
( # type: ignore[override] self, user_api_key_dict, response, request_data )
tests/unit/proxy/test_proxy_logging_hook_detection.py:102
↓ 7 callersMethodasync_post_call_success_hook
Post-call hook for Lakera guardrail.
litellm/proxy/guardrails/guardrail_hooks/lakera_ai_v2.py:747
↓ 7 callersMethodasync_post_call_success_hook
Post-call hook to sanitize model responses.
litellm/proxy/guardrails/guardrail_hooks/model_armor/model_armor.py:896
↓ 7 callersMethodasync_post_call_success_hook
Runs after the LLM API call to validate the response. Uses 'COMPLETION' messageType as this is output from the model.
litellm/proxy/guardrails/guardrail_hooks/lasso/lasso.py:246
↓ 7 callersFunctionasync_pre_call_deployment_hook
Allow modifying the request just before it's sent to the deployment. Use this instead of 'async_pre_call_hook' when you need to modify the r
litellm/utils.py:1812
↓ 7 callersMethodasync_pre_call_hook
( self, user_api_key_dict: UserAPIKeyAuth, cache: DualCache, data: dict,
litellm/proxy/guardrails/guardrail_hooks/noma/noma.py:560
↓ 7 callersMethodasync_release_max_parallel_requests_on_disconnect
Release the slot ``async_pre_call_hook`` took for a connection whose per-turn callbacks released none.
litellm/proxy/hooks/parallel_request_limiter.py:794
↓ 7 callersMethodasync_responses_api_session_handler
Async hook to get the chain of previous input and output pairs and return a list of Chat Completion messages
litellm/responses/litellm_completion_transformation/transformation.py:1473
↓ 7 callersMethodasync_set_cache
(self, key: str, value: object, *, local_only: bool = False)
litellm/scheduler.py:41
↓ 7 callersMethodasync_set_cache
(self, key: str, value: str, nx: bool, ttl: int)
tests/unit/integrations/focus/test_focus_logger.py:15
↓ 7 callersMethodasync_should_run_agentic_loop
( self, response: object, model: str, messages: list[dict], tools: lis
litellm/integrations/websearch_interception/handler.py:707
↓ 7 callersMethodasync_upload_payload_to_azure_blob_storage
Uploads the payload to Azure Blob Storage using a 3-step process: 1. Create file resource 2. Append data 3. Flush the
litellm/integrations/azure_storage/azure_storage.py:220
↓ 7 callersMethodasynchronous
(&self, py: Python<'_>)
litellm-rust/crates/callbacks-legacy-python/src/deferred.rs:21
↓ 7 callersMethodat
(&self, indices: &[usize])
litellm-rust/crates/router-core/src/registry.rs:740
↓ 7 callersMethodattach
(self, team: str, callback: str, variables: Mapping[str, str], kind: str | None = None)
tests/integration/observability/test_otel_team_capture_message_content.py:207
↓ 7 callersFunctionattach_guardrail_information
(response: object, request_data: Mapping[str, object])
litellm/proxy/common_request_processing.py:1920
↓ 7 callersFunctionattach_ptu_hours
The response with ``ptu_hours`` filled in on every PTU model group and its api keys, on each day, and on the total, from the tokens already on the
litellm/proxy/management_endpoints/ptu_consumption.py:86
↓ 7 callersFunctionattach_user_details
( prisma_client: PrismaClient, recovered: Mapping[str, KeyMetadataDict], )
litellm/proxy/spend_tracking/key_metadata_recovery.py:327
↓ 7 callersFunctionattempt
( *, native_call: Callable[[], NativeT] | None, adapt: Callable[[NativeT], ResultT], context:
litellm/rust_bridge/runtime.py:149
↓ 7 callersMethodattributing_source_for_server
The source a billable call to ``server_id`` is attributed to, or None to bill the caller as themselves (their own grant reaches it, or nothing
litellm/proxy/mcp_server/auth/user_api_key_auth_mcp.py:2651
↓ 7 callersMethodauthorize
(&self, context: Context)
litellm-rust/crates/gateway-mcp/src/native.rs:335
↓ 7 callersFunctionauthorize_model_for_key
Enforce the caller's model grants on a model name the auth layer never saw. The files and batches routes carry their model in a header, quer
litellm/proxy/openai_files_endpoints/common_utils.py:485
↓ 7 callersFunctionauthorized_headers
( headers: Mapping[str, object], api_key: str | None, model: str )
litellm/llms/edenai/common_utils.py:63
↓ 7 callersFunctionauthorized_video_model
( decoded: DecodedVideoId, llm_router: "Router | None", user_api_key_dict: UserAPIKeyAuth )
litellm/proxy/video_endpoints/utils.py:128
↓ 7 callersMethodauto_router_capability_violation
Why one more router claiming ``capability`` cannot join this router, or None when it can (``auto_router_capability_violation``); the limit is
litellm/router_rust/surface/legacy_members.py:264
↓ 7 callersMethodavector_store_search
(self, **kwargs: object)
tests/unit/integrations/vector_store_integrations/test_bedrock_vector_store.py:47
↓ 7 callersFunctionavideo_generation
Asynchronously calls the `video_generation` function with the given arguments and keyword arguments. Parameters: - `prompt` (str): Text
litellm/videos/main.py:46
↓ 7 callersFunctionawithout_stored_instructions
(request: Mapping[str, object])
litellm/responses/stored_system_prompt.py:163
↓ 7 callersFunctionazure_openai_params
( api_version: str = AZURE_OPENAI_API_VERSION, responses_api_version: str | None = None )
tests/e2e/llm_translation/responses_helpers.py:11
↓ 7 callersFunctionb
(e,r="",s)
litellm/proxy/_experimental/out/_next/static/chunks/11et800l-khs-.js:1
↓ 7 callersFunctionbackfill_discovery_stamped_issuers
Clear gateway-written issuer stamps, returning the number of rows healed.
litellm/proxy/mcp_server/oauth_issuer_stamp_backfill.py:108
↓ 7 callersMethodbase
(self)
tests/integration/observability/test_akto_logging_only.py:226
↓ 7 callersFunctionbatch
(status: str)
tests/e2e_harness/batches/test_batch_cleanup.py:80
↓ 7 callersFunctionbatch_cost_poller_is_active
Whether the CheckBatchCost poller will account for a managed batch's cost itself. False whenever the poller cannot be relied on: polling dis
litellm/proxy/openai_files_endpoints/common_utils.py:1598
↓ 7 callersFunctionbedrock_signer
Credentials are resolved on the first signed request, not here, so a run that mounts Bedrock but never calls it needs no AWS identity at all.
tests/e2e/provider_edge_bedrock.py:70
↓ 7 callersFunctionbedrock_supports_openai_responses
Whether a Bedrock model is served by bedrock-runtime's OpenAI Responses surface. Purely data-driven from the model's price-map capability signal
litellm/llms/bedrock/common_utils.py:1497
↓ 7 callersFunctionbeta_values
(request: Request)
tests/integration/messages_endpoint/providers/databricks/test_databricks_native_messages_wire.py:219
↓ 7 callersFunctionblock
(**file: JsonValue)
tests/integration/providers/test_gemini_embedding_file_block_wire.py:34
↓ 7 callersFunctionblue
(t: str)
litellm/setup_wizard.py:160
↓ 7 callersFunctionbodies_for
( records: Sequence[tuple[str, dict[str, JsonValue]]], scenario_id: str )
tests/integration/routing/test_fallback_hop_foreign_encrypted_reasoning.py:363
↓ 7 callersFunctionbody
(value: Value)
litellm-rust/crates/inference-messages/src/handler.rs:503
↓ 7 callersFunctionbreakpoint_count
(body: Mapping[str, JsonValue])
tests/integration/providers/_mantle_gpt_prompt_cache_support.py:393
↓ 7 callersFunctionbroken_stream
(gateway: Gateway, model: str, key: str, **fields: JsonValue)
tests/integration/spend/_partial_stream.py:118
↓ 7 callersFunctionbudget_windows_absent_cache_key
Cache key marking a key or team that holds no budget windows, so the spend fallback skips its row read.
litellm/proxy/common_utils/user_api_key_cache.py:588
↓ 7 callersFunctionbug_report_notice
(report: BugReport)
litellm/litellm_core_utils/bug_report.py:191
↓ 7 callersFunctionbuild
(cls)
tests/unit/proxy/db/test_exception_handler.py:427
↓ 7 callersMethodbuild_block_sse_chunks
Build the streaming chunks that deliver a guardrail block message and cleanly terminate the stream in this provider's wire format.
litellm/llms/base_llm/guardrail_translation/base_translation.py:226
↓ 7 callersMethodbuild_logged_response
(self, litellm_logging_obj: MagicMock)
tests/unit/passthrough/test_streaming_interrupt_spend_tracking.py:44
↓ 7 callersMethodbuild_login_redirect
( request: Request, cache: DualCache, relay_state: str | None = None )
litellm/proxy/management_endpoints/sso/saml_sso.py:253
↓ 7 callersFunctionbuild_mcp
( config: &Config, secrets: Arc<dyn litellm_secrets::source::SecretSource>, shutdown: tokio_util::
litellm-rust/crates/gateway/src/lib.rs:96
↓ 7 callersFunctionbuild_sentry_init_options
(env: Mapping[str, str])
litellm/litellm_core_utils/sentry_scrubbing.py:137
↓ 7 callersMethodbuild_tag_metadata
(request_data: Mapping[str, object])
litellm/proxy/guardrails/guardrail_hooks/akto/akto.py:477
↓ 7 callersFunctionbuild_token_exchange_form
( config: OAuthTokenExchangeConfig, subject_token: str, )
litellm/litellm_core_utils/oauth_token_exchange.py:138
↓ 7 callersFunctionbuild_upstream_oauth2_token_request
Client auth plus the RFC 8707 ``resource`` for one upstream plain-OAuth2 token request. Resolving both in one call is what stops a leg authentica
litellm/proxy/mcp_server/oauth_utils.py:828
← previousnext →10,601–10,700 of 202,479, ranked by callers