MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions202,479 in github.com/BerriAI/litellm

↓ 8 callersFunction_databricks_chat_upstream
(respx_mock: respx.MockRouter)
tests/unit/responses/test_responses_api_bridge_flag.py:721
↓ 8 callersFunction_decode_sse_events
(events: tuple[bytes, ...])
tests/unit/llms/anthropic/messages/native/test_streaming_iterator.py:1227
↓ 8 callersFunction_decode_vector_store_ids_in_tools
Decodes unified (LiteLLM-managed) vector_store_ids in file_search tools to provider-native IDs. Non-unified IDs are passed through unchanged
litellm/litellm_core_utils/prompt_templates/file_id_utils.py:204
↓ 8 callersFunction_delete
(proxy: Gateway, name: str)
tests/integration/configuration/test_callback_delete.py:108
↓ 8 callersFunction_deleted_key_rows
(key: str)
tests/integration/management/test_project_lifecycle.py:136
↓ 8 callersMethod_deliver_enriched
(self, data: _Frame, window: FocusTimeWindow)
litellm/integrations/ternary/export_engine.py:221
↓ 8 callersFunction_denied_scope_manager
(known_server_names_to_ids: dict[str, str])
tests/unit/proxy/mcp_server/test_mcp_server_tool_calls_and_headers.py:1548
↓ 8 callersFunction_deployment
( gateway: Gateway, scenario: Scenario, project: str, *, location: str | None, api_base: str | None )
tests/integration/providers/test_vertex_realtime_multi_region_host.py:150
↓ 8 callersFunction_deployment
(scenario: Scenario, wire: Wire, backend: str = _HOSTED)
tests/integration/providers/test_hosted_vllm_stream_stall_wire.py:113
↓ 8 callersFunction_deployment
( index: int, api_base: str, team: bool, *, model: int | None = None, public_name: str
tests/integration/sdk/test_router_concurrent_deployment_delete_sdk.py:66
↓ 8 callersFunction_deployment_with_stored_ptu
()
tests/unit/proxy/management_endpoints/test_ptu_model_settings.py:560
↓ 8 callersFunction_deployments_hit
(wire: Wire)
tests/integration/sdk/test_router_tool_call_stream_fallback_budget_wire.py:130
↓ 8 callersFunction_discard_unexpected_key
(candidate: Gateway, response: httpx.Response)
tests/integration/management/test_project_lifecycle.py:173
↓ 8 callersMethod_dispatch_recording_logging_obj
(self)
tests/unit/proxy/guardrails/test_deferred_guardrail_logging.py:1452
↓ 8 callersMethod_dispatched_request_data
(self, messages, optional_params, call_type="acompletion")
tests/unit/proxy/test_proxy_utils_model_creation_and_error_logging.py:1469
↓ 8 callersMethod_drain_with_retry
Deliver everything queued on a stopped logger, or drop it with a log. A stopped logger has no periodic loop left, so every post-stop path
litellm/integrations/newrelic/newrelic_metrics.py:234
↓ 8 callersFunction_dual_cache_with_local_tpm
(local_tpm: int, redis_cache: MagicMock | None)
tests/unit/test_router/test_enforce_model_rate_limits.py:32
↓ 8 callersMethod_dynamic_params
(self, **overrides)
tests/unit/integrations/test_langfuse_otel.py:572
↓ 8 callersFunction_embedding_logging
()
tests/unit/llms/vertex_ai/vertex_embeddings/test_embedding_handler.py:54
↓ 8 callersFunction_embedding_response
( run_async: bool, endpoint: respx.Route, model: str, payload: object, logging_obj: Logging )
tests/unit/llms/vertex_ai/vertex_embeddings/test_embedding_handler.py:74
↓ 8 callersFunction_empty_covered_tables
Wire every rotation-covered table on `client` to return no rows. Lets a `check_encryption` / scanner test isolate the location under test wit
tests/unit/proxy/management_endpoints/test_credential_migration.py:46
↓ 8 callersFunction_encrypted
(plaintext: str, key: str = PREVIOUS_KEY)
tests/unit/proxy/db/test_master_key_migration.py:40
↓ 8 callersFunction_encrypted_user_env_blob
Encrypt ``values`` the way the production per-user write does, so tests can seed a correctly-encrypted ``values_b64`` blob without a live DB.
tests/unit/proxy/mcp_server/test_mcp_env_vars.py:879
↓ 8 callersMethod_endpoint_env
(self, mock_prisma, router, evict=None)
tests/unit/proxy/management_endpoints/test_model_management_endpoints.py:8755
↓ 8 callersFunction_enforce_custom_key_policy
( hook: Callable[..., Awaitable[Mapping[str, object]]] | None, build_policy_request: Callable[[], Cust
litellm/proxy/management_endpoints/key_management_endpoints.py:411
↓ 8 callersMethod_enrich_failure_metadata_with_key_info
Enriches failure spend log metadata by looking up the key object (and team object) from cache/DB when key fields are missing.
litellm/proxy/hooks/proxy_track_cost_callback.py:993
↓ 8 callersMethod_ensure_engine
Instantiate the heavy export engine lazily.
litellm/integrations/focus/focus_logger.py:74
↓ 8 callersMethod_ensure_tool_results_have_corresponding_tool_calls
Ensure that tool_result messages have corresponding tool_calls in the previous assistant message. This is critical for Anthropic API
litellm/responses/litellm_completion_transformation/transformation.py:2218
↓ 8 callersFunction_entra_agent_jwt_handler
(agent_id_jwt_field: str | None)
tests/unit/proxy/auth/test_handle_jwt.py:7654
↓ 8 callersFunction_entra_agent_registry
()
tests/unit/proxy/auth/test_handle_jwt.py:7641
↓ 8 callersFunction_environment_variables_row
(values: Mapping[str, str | None] | None, revision: int | None)
tests/unit/proxy/proxy_server/test_proxy_config.py:5621
↓ 8 callersFunction_error_of
(frame: str)
tests/unit/proxy/proxy_server/test_streaming_helpers.py:1566
↓ 8 callersFunction_error_reply
(status: int)
tests/integration/authorization/test_rag_team_provider_credentials.py:185
↓ 8 callersFunction_error_response
(status_code: int, message: str)
litellm/proxy/anthropic_endpoints/claude_code_endpoints/claude_code_marketplace.py:531
↓ 8 callersMethod_escalate_tier
Bump a tier one step up to the next-higher configured tier. Escalation is a built-in-ladder feature and a custom tier set is disabled from
litellm/router_strategy/complexity_router/complexity_router.py:3753
↓ 8 callersMethod_event_hook_is_event_type
Returns True if the event_hook is the same as the event_type eg. if `self.event_hook == "pre_call" and event_type == "pre_call"` ->
litellm/integrations/custom_guardrail.py:1480
↓ 8 callersFunction_event_type
(event: object)
tests/unit/responses/mcp/test_aresponses_api_with_mcp.py:2373
↓ 8 callersFunction_events
(lines: list[str])
tests/integration/spend/test_service_tier_stream_billing.py:130
↓ 8 callersMethod_exc
(self, original_response=None)
tests/unit/llms/openai/responses/test_openai_responses_guardrail_handler.py:4609
↓ 8 callersFunction_exchange_call
(code: str, moyai_url: str)
tests/unit/proxy/test_moyai_endpoints.py:140
↓ 8 callersFunction_exchange_env
(monkeypatch: pytest.MonkeyPatch)
tests/unit/proxy/test_moyai_endpoints.py:82
↓ 8 callersMethod_execute_guardrail_hook
Execute a single guardrail's hook. Args: callback: The guardrail callback to execute hook_type: One of "pre_
litellm/proxy/utils.py:2619
↓ 8 callersFunction_expect_block_sg_pdpa
Assert that the guardrail BLOCKS the sentence.
tests/unit/proxy/guardrails/guardrail_hooks/litellm_content_filter/test_content_filter.py:1242
↓ 8 callersFunction_expected_chat_request
(backend: str, prompt: str)
tests/integration/authorization/test_jwt_key_mapping_lifecycle.py:304
↓ 8 callersFunction_exporter_over
A LangfuseSpanExporter whose litellm HTTPHandler talks to a scripted transport instead of the network.
tests/unit/integrations/langfuse/test_langfuse_sdk.py:1279
↓ 8 callersFunction_extract_base64_data
Extract pure base64 data from an image URL. If the URL is a data URL (e.g., "data:image/png;base64,iVBOR..."), extract and return only t
litellm/litellm_core_utils/prompt_templates/common_utils.py:1340
↓ 8 callersFunction_extract_current_ask_and_system_prompt
The last real human ask and the last system prompt; either is None if absent. A conversation whose every user turn is only plumbing has no ask, s
litellm/router_strategy/complexity_router/complexity_router.py:720
↓ 8 callersFunction_extract_max_media_resolution_from_messages
Extract the highest media resolution (detail) from image content in messages. This is used to set the global media_resolution in generation_
litellm/llms/vertex_ai/gemini/transformation.py:151
↓ 8 callersMethod_extract_message_content
Extract content from a message, handling various formats. Handles tool calls, multimodal content (as JSON), and standard text conten
litellm/integrations/newrelic/newrelic.py:473
↓ 8 callersMethod_extract_output_messages
Convert output items in a terminal (``response.completed`` or ``response.incomplete``) event into Responses API message dicts suitabl
litellm/responses/streaming_iterator.py:3273
↓ 8 callersFunction_extract_prior_turns
Up to window_size turns other than current_ask, oldest first, as (role, text). The ask is classified on its own, so any turn repeating it is excl
litellm/router_strategy/complexity_router/complexity_router.py:1018
↓ 8 callersMethod_extract_rate_limit_labels
Pull the unified ``category`` / ``rate_limit_type`` fields off any exception that declares them (``litellm.RateLimitError`` and bare-
litellm/integrations/prometheus.py:3853
↓ 8 callersFunction_extract_upstream_auth_failure
The upstream 401/403 and its ``WWW-Authenticate`` header from the exception tree, or ``None``. Delegates to the shared traversal in ``faults`` so
litellm/proxy/mcp_server/mcp_server_manager.py:1644
↓ 8 callersMethod_extract_usage_metadata_from_websocket_messages
Extract and aggregate usage metadata from a list of WebSocket messages. Live emits one ``usageMetadata`` per turn and Google charges
litellm/proxy/pass_through_endpoints/llm_provider_handlers/vertex_ai_live_passthrough_logging_handler.py:189
↓ 8 callersFunction_fake_node
(bin_dir: Path, version: str)
tests/unit/test_with_dashboard_node.py:20
↓ 8 callersFunction_fake_openai
( stores: tuple[Mapping[str, object], ...], page_size: int = 100, post_status: int = 200 )
tests/unit/db_scripts/test_strip_vector_store_internal_metadata.py:33
↓ 8 callersFunction_fake_proxy_logging
A ``proxy_logging_obj`` double whose hooks capture the data they receive. ``guardrail_effect`` stands in for a guardrail: it is handed the synthe
tests/unit/proxy/mcp_server/test_mcp_guardrail_usage_monitor.py:62
↓ 8 callersFunction_fake_sleep
()
tests/unit/proxy/guardrails/test_usage_tracking.py:130
↓ 8 callersFunction_federated_deployment
(gateway: Gateway, scenario: Scenario, credential: str, api_base: str)
tests/integration/management/test_credential_federation_values.py:265
↓ 8 callersMethod_filter_single_text
Apply all content filtering checks to a single text. This method performs: 1. Category keyword checks 2. Regex patte
litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/content_filter.py:1550
↓ 8 callersFunction_filter_visible_search_tools
Drop search tools the caller is not authorized to invoke, applying the same key/team/user grants enforced on /search. Admins see all tools un
litellm/proxy/search_endpoints/search_tool_management.py:116
↓ 8 callersFunction_floor
()
tests/unit/test_with_dashboard_node.py:10
↓ 8 callersFunction_forge
(claims: dict[str, object], signing_key: str = _SIGNING_KEY)
tests/unit/proxy/mcp_server/outbound_credentials/test_envelope.py:92
↓ 8 callersFunction_fresh_guardrail
()
tests/unit/proxy/guardrails/test_content_filter_path_traversal.py:192
↓ 8 callersFunction_fresh_minute
()
tests/integration/routing/test_responses_websocket_turn_admission.py:231
↓ 8 callersFunction_gemini_response
(native_id: str | None, stream: bool)
tests/unit/llms/vertex_ai/gemini/test_thought_signature_in_tool_call_id.py:337
↓ 8 callersMethod_generate_cold_storage_object_key
Generate cold storage object key in the same format as S3Logger. Args: start_time: The start time of the request
litellm/litellm_core_utils/litellm_logging.py:7348
↓ 8 callersFunction_get_additional_usage_values_for_usage
(usage: litellm.Usage)
tests/unit/proxy/spend_tracking/test_spend_tracking_utils.py:88
↓ 8 callersMethod_get_allowed_mcp_servers_for_org
Get allowed MCP servers for an organization. Returns the MCP servers from the org's object_permission. An empty result means
litellm/proxy/mcp_server/auth/user_api_key_auth_mcp.py:3941
↓ 8 callersMethod_get_assembled_streaming_response
( self, result: ModelResponse | TextCompletionResponse | ModelResponseStream | ResponseComplet
litellm/litellm_core_utils/litellm_logging.py:5218
↓ 8 callersMethod_get_current_spend
Read current accumulated spend for a session.
litellm/proxy/hooks/max_budget_per_session_limiter.py:294
↓ 8 callersMethod_get_gcs_object_name_from_batch_jsonl
Gets a unique GCS object name for the VertexAI batch prediction job named as: litellm-vertex-{model}-{uuid} The stored mode
litellm/llms/vertex_ai/files/transformation.py:1162
↓ 8 callersMethod_get_guardrail
(self)
tests/unit/proxy/guardrails/test_content_filter_path_traversal.py:21
↓ 8 callersMethod_get_guardrails_by_mode
Get all guardrails that ran in a specific mode. If a guardrail doesn't have a mode specified, it's treated as pre-call (the
litellm/proxy/compliance_checks.py:31
↓ 8 callersMethod_get_litellm_resource
Create an OpenTelemetry Resource using config-driven defaults.
litellm/integrations/opentelemetry.py:509
↓ 8 callersFunction_get_model_from_request_context
( request_data: dict, route: str, request: Request | None, llm_router: litellm.Router | None =
litellm/proxy/auth/user_api_key_auth.py:262
↓ 8 callersFunction_get_proxy_model_info
(model: dict, caller_aliases: CallerAliases = GLOBAL_ALIASES_ONLY)
litellm/proxy/proxy_server.py:18481
↓ 8 callersFunction_get_resource_types
Return the list of SCIM ResourceType definitions per RFC 7643 Section 6.
litellm/proxy/management_endpoints/scim/scim_v2.py:1344
↓ 8 callersMethod_get_routed_model
Get the model this session should be routed to, if any.
litellm/proxy/hooks/sensitive_data_routing.py:80
↓ 8 callersFunction_get_server_auth_header
Helper function to get server-specific auth header with case-insensitive matching.
litellm/proxy/mcp_server/rest_endpoints.py:440
↓ 8 callersFunction_get_tools_for_single_server
Helper function to get tools for a single server. When ``apply_tool_filters`` is False the raw server catalog is returned without the
litellm/proxy/mcp_server/rest_endpoints.py:765
↓ 8 callersMethod_get_total_tokens_from_usage
Get total tokens from response usage for rate limiting. For 'input' and 'total' rate limit types, cached tokens are excluded
litellm/proxy/hooks/parallel_request_limiter_v3.py:4090
↓ 8 callersMethod_get_user_object_permission
The internal user's OWN object_permission: the entitlement attached to the HUMAN rather than to the credential they authenticated with.
litellm/proxy/mcp_server/auth/user_api_key_auth_mcp.py:4091
↓ 8 callersFunction_get_value
(value: object, key: str)
litellm/litellm_core_utils/provider_affinity.py:46
↓ 8 callersFunction_gh_stub
( listing: Mapping[str, object], zip_bytes: bytes, seen: list[tuple[str, ...]] | None = None )
tests/unit/test_lint_base_counts.py:294
↓ 8 callersFunction_google_count_tokens_request
(model_name: str, data: object)
litellm/proxy/google_endpoints/endpoints.py:159
↓ 8 callersFunction_google_id_token
(audience: str, issued_at: float)
tests/unit/test_utils.py:7612
↓ 8 callersMethod_groups_loader
(groups)
tests/unit/proxy/mcp_server/auth/test_user_api_key_auth_mcp.py:11595
↓ 8 callersFunction_guarded_migrations
Migrations the DDL rules apply to. Prisma checksums an applied migration, so the ones that predate these rules cannot be edited without breaking `
tests/unit/litellm_proxy_extras/test_litellm_proxy_extras_utils.py:335
↓ 8 callersFunction_guardrail
(gateway: Gateway, scenario: Scenario, wire: Wire, mode: str)
tests/integration/messages_endpoint/test_tool_result_text_wire.py:457
↓ 8 callersFunction_guardrail_table
Typed view of the guardrails table actions exposed by the Prisma repository.
litellm/proxy/guardrails/guardrail_registry.py:83
↓ 8 callersFunction_handle_team_membership_changes
Handle adding/removing user from teams based on changes. Roster write failures propagate so the SCIM endpoint returns an error the IdP retrie
litellm/proxy/management_endpoints/scim/scim_v2.py:1159
↓ 8 callersMethod_handler
(self, model, custom_llm_provider=None)
tests/unit/proxy/response_api_endpoints/test_endpoints.py:4306
↓ 8 callersMethod_handler
Handler wired to a stubbed AIRS endpoint, one queued scan result per call.
tests/unit/proxy/guardrails/guardrail_hooks/test_panw_prisma_airs.py:5918
↓ 8 callersFunction_has_attribute_error_in_chain
Walk the exception chain to find an AttributeError at any depth. Checks __cause__, __context__, and the litellm-specific original_exception a
litellm/proxy/common_request_processing.py:2109
↓ 8 callersFunction_has_non_empty_value
Check if a value has real content (not None, not empty list, not blank string).
litellm/proxy/management_endpoints/common_utils.py:806
↓ 8 callersMethod_has_post_call_guardrails
True when a guardrail explicitly registers post_call. event_hook=None matches all hooks in should_run_guardrail but must not defer as
litellm/proxy/common_request_processing.py:3968
↓ 8 callersFunction_health_report
(gateway: Gateway, model: str)
tests/integration/management/test_model_health_check.py:140
↓ 8 callersFunction_hosted_vllm_stream_choices
( logging_obj: Logging, upstream_choices: Sequence[Mapping[str, object]] )
tests/unit/litellm_core_utils/test_streaming_handler.py:7085
↓ 8 callersFunction_identity
(authorizer, subject_token=IDP_JWT, **unmet)
tests/unit/proxy/mcp_server/test_idp_token_exchange.py:66
← previousnext →8,601–8,700 of 202,479, ranked by callers