MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions202,479 in github.com/BerriAI/litellm

↓ 12 callersMethod_is_permission_error
Check if the error message indicates a database permission error. Permission errors should NOT be marked as applied, as the migratio
litellm-proxy-extras/litellm_proxy_extras/utils.py:431
↓ 12 callersFunction_is_streaming_request
Returns True if the call type is a streaming request. Returns True if: - if "stream=True" in kwargs (litellm chat completion, litell
litellm/utils.py:2802
↓ 12 callersFunction_json_field
(value: object, key: str)
litellm/completion_extras/litellm_responses_transformation/transformation.py:369
↓ 12 callersFunction_jsonl
(*lines: dict)
tests/unit/batches/test_batch_line_items.py:28
↓ 12 callersFunction_key
( *, user_id: str = _OWNER, created_by: str = _OWNER, team_id: str | None = None, max_budg
tests/unit/proxy/management_endpoints/test_key_budget_change.py:40
↓ 12 callersMethod_keyword_override
Find a deployment whose declared keywords appear in `user_message`. Returns (model_name, matched_keyword) or None when no keyword ma
litellm/router_strategy/quality_router/quality_router.py:235
↓ 12 callersFunction_kwargs
( *, messages=None, chosen="fast", extra_metadata=None, extra_litellm_params=None, )
tests/unit/router_strategy/adaptive_router/test_hooks.py:54
↓ 12 callersFunction_langfuse_config
(tmp_path: Path, general_settings: Mapping[str, JsonValue] | None = None)
tests/integration/observability/test_langfuse_delivery.py:103
↓ 12 callersFunction_langfuse_environment
(langfuse: Wire)
tests/integration/observability/test_langfuse_delivery.py:120
↓ 12 callersFunction_list_items
(value: object)
litellm/llms/anthropic/messages/convertible_blocks.py:118
↓ 12 callersMethod_live_messages
Wrap (text, audio) prompt/candidate pairs as the server messages a Live session emits.
tests/unit/proxy/pass_through_endpoints/test_vertex_ai_live_passthrough.py:263
↓ 12 callersFunction_load_team_member_default_model_budget
( user_api_key_auth_obj: UserAPIKeyAuth, team_object: LiteLLM_TeamTable | None, prisma_client: Pri
litellm/proxy/auth/user_api_key_auth.py:3737
↓ 12 callersFunction_log_responses_success
( check: PromptCachingDeploymentCheck, logged_messages: object, metadata: dict[str, object], m
tests/unit/router_utils/pre_call_checks/test_prompt_caching_deployment_check.py:1841
↓ 12 callersFunction_logger
(reader, *, enable_metrics: bool)
tests/unit/integrations/otel/test_otel_v2_metrics.py:138
↓ 12 callersFunction_logging_obj
(*, log_parked: bool, call_type: str = "acompletion")
tests/unit/proxy/utils/proxy_logging/test_guardrail_pipeline.py:1212
↓ 12 callersMethod_logging_obj
(self, model_call_details)
tests/unit/proxy/test_proxy_utils_model_creation_and_error_logging.py:1031
↓ 12 callersFunction_lookup_deprecated_key
Check if a token exists in the deprecated keys table and is still within its grace period. Returns the active_token_id if found and valid, o
litellm/proxy/utils.py:5410
↓ 12 callersMethod_make
(env=None, config_value=None, message_logging=True)
tests/unit/integrations/test_opentelemetry.py:1029
↓ 12 callersFunction_make_app_with_role
Create a TestClient where the auth dependency returns the given role.
tests/unit/proxy/agent_endpoints/test_endpoints.py:92
↓ 12 callersFunction_make_hook
()
tests/unit/router_strategy/adaptive_router/test_hooks.py:22
↓ 12 callersFunction_make_mock_agent
( static_headers=None, extra_headers=None, url="http://backend-agent:10001", )
tests/unit/proxy/agent_endpoints/test_agent_headers.py:29
↓ 12 callersFunction_make_mock_response
(json_body: dict = None, text: str = None)
tests/unit/llms/bedrock/search/test_agentcore_search_transformation.py:49
↓ 12 callersFunction_make_model_call_details
Build a model_call_details dict that mimics real proxy/SDK flows.
tests/unit/litellm_core_utils/test_redact_messages.py:458
↓ 12 callersFunction_make_originating_mock
(api_base: str, api_key: str, model_name: str = "gpt-5.4")
tests/unit/router_utils/pre_call_checks/test_encrypted_content_affinity_check.py:1258
↓ 12 callersFunction_make_request
Minimal fake Starlette Request.
tests/unit/proxy/test_dynamic_mcp_route.py:41
↓ 12 callersFunction_make_router_mock_with_cooldown
Build a MagicMock routing context whose ``health().cooldowns.async_get_active_cooldowns`` returns ``cooldown_entries`` (defaulting to ``[]``
tests/unit/router_utils/pre_call_checks/test_encrypted_content_affinity_check.py:1270
↓ 12 callersFunction_make_server
(**kwargs)
tests/unit/proxy/mcp_server/test_per_user_oauth_cache.py:43
↓ 12 callersFunction_make_user_api_key_cache
(get_value=None, get_side_effect=None)
tests/unit/proxy/proxy_server/test_spend_counters.py:58
↓ 12 callersFunction_marked
(text: str)
tests/unit/router_utils/pre_call_checks/test_prompt_caching_deployment_check.py:943
↓ 12 callersFunction_masked_texts
(inputs: GenericGuardrailAPIInputs)
tests/unit/llms/bedrock/passthrough/guardrail_translation/test_handler.py:1425
↓ 12 callersFunction_matched_plan_mode_sentinel
The plan-mode sentinel this request carries, or None when it carries none. Reads the raw wire body when the proxy captured one, because the senti
litellm/router_strategy/complexity_router/complexity_router.py:878
↓ 12 callersFunction_metadata_verdict
(stored: dict[str, object], sent: dict[str, object], declared: frozenset[str] = frozenset())
tests/unit/proxy/management_endpoints/test_team_admin_field_permissions.py:351
↓ 12 callersFunction_mistral_service
(expected_requests: int = 1)
tests/unit/rust_bridge/ocr/test_secrets.py:110
↓ 12 callersFunction_mock_blocked_response
(reason="Prompt injection detected")
tests/unit/proxy/guardrails/guardrail_hooks/akto/test_akto.py:96
↓ 12 callersFunction_mock_embedding_route
(respx_mock: respx.MockRouter)
tests/unit/llms/milvus/vector_stores/test_milvus_vector_stores_transformation.py:135
↓ 12 callersFunction_mock_pdf_chat_route
(respx_mock: respx.MockRouter, api_base: str)
tests/unit/test_main.py:11114
↓ 12 callersFunction_mock_response
(payload=None)
tests/unit/llms/parallel_ai/test_parallel_ai_search.py:34
↓ 12 callersFunction_mock_response
(payload: dict)
tests/unit/llms/minimax/videos/test_minimax_video_transformation.py:42
↓ 12 callersFunction_mock_scheduled_proxy_config
()
tests/unit/proxy/test_proxy_server_endpoints_and_startup.py:852
↓ 12 callersFunction_model_spend_rows
(model: str, expected: int)
tests/integration/providers/test_ollama_prompt_tools_wire.py:173
↓ 12 callersFunction_native_authorize
(client_id, session_user_id="u1", lookup=None, **overrides)
tests/unit/proxy/mcp_server/test_gateway_dcr_flow.py:1798
↓ 12 callersFunction_non_admin
()
tests/unit/proxy/test_model_list_discoverable.py:77
↓ 12 callersFunction_object_name
(prefix: str, batch_id: str, part: int = 0)
tests/integration/observability/test_batch_line_items_cold_storage.py:499
↓ 12 callersFunction_observation
(request_id: str, started: float = 10000.0, **overrides: object)
tests/unit/proxy/spend_tracking/test_baseline_accounting.py:56
↓ 12 callersFunction_observe
(rig: _Rig, endpoint: Endpoint, body: Mapping[str, JsonValue])
tests/integration/providers/test_bedrock_kimi_k3_cache_point_wire.py:618
↓ 12 callersFunction_one_spend_row
(request_id: str, call_type: str, status: str)
tests/integration/compatibility/test_a2a_protocol_version_override.py:68
↓ 12 callersFunction_only
(requests: Sequence[Request], suffix: str)
tests/integration/messages_endpoint/test_tool_result_text_wire.py:182
↓ 12 callersFunction_only_call
(wire: Wire, marker: str)
tests/integration/providers/test_responses_compaction_items_wire.py:264
↓ 12 callersFunction_openai
(gateway: Gateway)
tests/integration/compatibility/test_openai_sdk_client_paths.py:445
↓ 12 callersFunction_openapi_forwarded_extra_headers
( mcp_server: MCPServer, raw_headers: dict[str, str] | None, user_api_key_auth: UserAPIKeyAuth | N
litellm/proxy/mcp_server/mcp_server_manager.py:1391
↓ 12 callersFunction_optin
(guardrail: str)
tests/integration/providers/test_realtime_transcription_guardrail_session_update.py:283
↓ 12 callersFunction_orphaned_tool_history_messages
()
tests/unit/llms/bedrock/chat/test_converse_transformation.py:7999
↓ 12 callersFunction_ovalix_env
()
tests/unit/proxy/guardrails/guardrail_hooks/test_ovalix.py:72
↓ 12 callersFunction_params_with_context
(context_id: object)
tests/unit/a2a_protocol/providers/bedrock_agentcore/test_bedrock_agentcore_a2a.py:263
↓ 12 callersFunction_payload
(**overrides: Any)
tests/unit/integrations/clickhouse/test_clickhouse_spend_logger.py:74
↓ 12 callersFunction_payload
(**overrides)
tests/unit/integrations/otel/test_otel_v2_emitter.py:38
↓ 12 callersFunction_payloads
(n, message=None)
tests/unit/integrations/datadog/test_datadog_logger_batching.py:18
↓ 12 callersFunction_peer
(replies: Mapping[str, Reply])
tests/integration/sdk/test_router_sync_stream_fallback_wire.py:49
↓ 12 callersFunction_perplexity
()
tests/integration/providers/test_decisions_box_deployment_flag_wire.py:193
↓ 12 callersFunction_pkce_credential
()
tests/unit/proxy/client/cli/test_auth_commands.py:1709
↓ 12 callersFunction_poll
(otel_reader: OtelReader, *, call_id: str, route: str, genai_span: str)
tests/e2e/logging/test_otel_trace_e2e.py:132
↓ 12 callersFunction_post
(gateway: Gateway, body: Mapping[str, JsonValue], *, beta: str | None = None)
tests/integration/messages_endpoint/providers/anthropic/test_anthropic_safeguards_beta_wire.py:194
↓ 12 callersMethod_post_call_image_processing
(response: httpx.Response, image_url: str = "")
litellm/litellm_core_utils/prompt_templates/factory.py:4057
↓ 12 callersFunction_process_single_key_update
Process a single key update with all validations and checks. This function encapsulates all the logic for updating a single key, includi
litellm/proxy/management_endpoints/key_management_endpoints.py:3280
↓ 12 callersFunction_proxy_server_attrs_for_custom_auth
Build the minimal set of proxy_server module attributes that _user_api_key_auth_builder reads when exercising a custom-auth return path.
tests/unit/proxy/auth/test_user_api_key_auth_request_flow.py:593
↓ 12 callersFunction_proxy_url
(gateway: Gateway)
tests/integration/routing/test_deployment_mode_routing_wire.py:204
↓ 12 callersFunction_proxy_ws_url
(candidate: Gateway, path: str)
tests/integration/providers/test_responses_websocket_session_limit.py:399
↓ 12 callersFunction_query_raw_spend_logs
(rows: Sequence[dict[str, str | None]])
tests/unit/proxy/spend_tracking/test_key_metadata_recovery.py:45
↓ 12 callersFunction_raw_secret
()
tests/integration/providers/test_realtime_webrtc_http.py:52
↓ 12 callersFunction_read_all
(stream: CustomStreamWrapper)
tests/unit/responses/mcp/test_chat_completions_handler.py:1817
↓ 12 callersFunction_redact_sensitive_litellm_params
Replace credential-bearing values in ``litellm_params`` with ``REDACTED_BY_LITELM`` while preserving non-secret keys (``api_base``, ``reg
litellm/proxy/vector_store_endpoints/management_endpoints.py:95
↓ 12 callersFunction_register_public_and_private_plugins
()
tests/unit/proxy/anthropic_endpoints/test_claude_code_marketplace.py:347
↓ 12 callersFunction_req
(body, uri="https://api.openai.com/v1/chat/completions")
tests/unit/test_vcr_safe_body_matcher.py:36
↓ 12 callersFunction_request_from
(body: Mapping[str, object], **config_overrides: object)
tests/unit/proxy/management_endpoints/test_auto_router_endpoints.py:98
↓ 12 callersMethod_request_kwargs
( *, key_hash: str = "key-hash-a", app: str = "cli", agent_id: str | None = No
tests/unit/test_router/test_router.py:9144
↓ 12 callersMethod_request_kwargs
(session_id: str)
tests/unit/router_strategy/test_complexity_router.py:7092
↓ 12 callersFunction_require
(condition: bool, message: str)
tests/base_sdk_tests/check_base_sdk_install.py:27
↓ 12 callersFunction_reservation
()
tests/unit/interactions/test_background_cost_polling.py:65
↓ 12 callersFunction_resolve_advisor_credentials
Resolve the (api_key, api_base) override for the advisor sub-call. A caller-supplied ``api_base`` is only honored alongside a caller-supplied
litellm/llms/anthropic/messages/native/interceptors/advisor.py:209
↓ 12 callersFunction_resolve_credential_from_model_config
Walk the precedence chain and return the first matching credential name. Checks (in order): 1. project_model_config[model_name][provider
litellm/proxy/litellm_pre_call_utils.py:3824
↓ 12 callersFunction_resolve_cursor_model_variant
( data: dict, llm_router: "Router | None" )
litellm/proxy/response_api_endpoints/endpoints.py:262
↓ 12 callersMethod_resolve_mcp_server_for_tool_call
Resolve MCP server for call_tool (prefixed name, registry, fallback).
litellm/proxy/mcp_server/mcp_server_manager.py:6863
↓ 12 callersFunction_response
(*days: DailySpendData)
tests/unit/proxy/management_endpoints/test_ptu_consumption.py:58
↓ 12 callersFunction_response
(tokens: list[dict[str, object]], total_audio_proc_ms: int | None = None)
tests/unit/llms/soniox/realtime/test_soniox_realtime_transformation.py:54
↓ 12 callersFunction_retrieve_kwargs
(provider: StreamProvider)
tests/unit/responses/test_responses_api_lifecycle.py:182
↓ 12 callersFunction_router
(wire: Wire, deployments: tuple[str, ...], **settings: object)
tests/integration/sdk/test_router_sync_stream_fallback_wire.py:63
↓ 12 callersMethod_router
(redis_cache)
tests/unit/proxy/health_endpoints/test_health_endpoints.py:5768
↓ 12 callersMethod_router
vision_by_model: model name -> True/False (deployment model_info) or None (undeclared).
tests/unit/router_strategy/test_complexity_router.py:15003
↓ 12 callersMethod_router
(mock_router_instance, *, vision, classifier_declares_vision=True, classifier_type="llm", **extra)
tests/unit/router_strategy/test_complexity_router.py:16735
↓ 12 callersFunction_router_holding
A stand-in for the proxy's router whose registry().all() is the live model_list passed.
tests/unit/proxy/spend_tracking/test_ptu_flat_cost_rollup.py:2100
↓ 12 callersMethod_router_row
(model_name: str, model_id: str, classifier_type: str)
tests/unit/router_strategy/test_complexity_router.py:1833
↓ 12 callersFunction_router_with_models
(model_names)
tests/unit/proxy/utils/helpers/test_model_access.py:31
↓ 12 callersFunction_row
(dump: dict)
tests/unit/proxy/management_endpoints/test_customer_endpoints.py:879
↓ 12 callersFunction_rows_written
Every (date, category, route, successful, failed) tuple the database received, in statement order.
tests/unit/proxy/db/test_gateway_request_tracking.py:158
↓ 12 callersFunction_run
(validator, payload=None, premium_user=True, timeout_seconds=1.0)
tests/unit/proxy/management_helpers/test_team_metadata_validation.py:46
↓ 12 callersFunction_run_until_resynced
(subscriber: ConfigSyncSubscriber, resynced: asyncio.Event)
tests/unit/proxy/common_utils/test_config_sync_pubsub.py:392
↓ 12 callersFunction_run_upstream_reporting_passthrough
Drive a generic pass-through against an upstream that reports its own cost/usage. Returns (recorded standard logging payloads, proxy logging mock)
tests/unit/proxy/pass_through_endpoints/test_pass_through_endpoints.py:7061
↓ 12 callersMethod_scan
( self, handler: PanwPrismaAirsHandler, scan_result: Mapping[str, object] = ALLOW )
tests/unit/proxy/guardrails/guardrail_hooks/test_panw_prisma_airs.py:4787
↓ 12 callersFunction_scheduler
()
tests/unit/proxy/common_utils/test_scheduled_job_stagger.py:32
↓ 12 callersFunction_scope
( *, table: DailyActivityTable = DailyActivityTable.USER, entity_ids: tuple[str, ...] | None = ("u
tests/unit/repositories/test_daily_activity_repository.py:49
← previousnext →5,301–5,400 of 202,479, ranked by callers