MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions202,479 in github.com/BerriAI/litellm

↓ 7 callersFunction_make_sink_app
( recorder: Optional[FakeRecorder], sink: Optional[FakeSink], status_code: int = 200, model_id
tests/unit/proxy/middleware/test_billable_request_metrics_middleware.py:491
↓ 7 callersFunction_make_sse_stream
Create a mock StreamingResponse with body_iterator from a list of event dicts.
tests/unit/proxy/response_polling/test_response_polling_handler.py:1401
↓ 7 callersFunction_make_stream_wrapper
(model: str)
tests/unit/llms/oci/chat/test_oci_chat_transformation.py:1793
↓ 7 callersFunction_make_streaming_chunks
(parts)
tests/unit/proxy/guardrails/guardrail_hooks/_cisco_ai_defense_test_utils.py:258
↓ 7 callersFunction_make_user
()
tests/unit/proxy/auth/test_onboarding.py:55
↓ 7 callersFunction_make_verdict_response
(overall_score: float)
tests/unit/proxy/guardrails/test_llm_as_a_judge.py:44
↓ 7 callersFunction_managed_batch_row
(index, file_object=None)
tests/unit/enterprise/proxy/hooks/test_managed_files.py:4664
↓ 7 callersFunction_managed_object_table
(prisma_client: _ManagedResourcePrismaClient)
enterprise/litellm_enterprise/proxy/hooks/managed_files.py:622
↓ 7 callersMethod_manager
(self)
tests/unit/proxy/mcp_server/test_mcp_server_manager.py:12208
↓ 7 callersMethod_manager_with
(self, server_ids, allow_all=())
tests/unit/proxy/mcp_server/auth/test_user_api_key_auth_mcp.py:9112
↓ 7 callersFunction_mantle_models
(wire: Wire)
tests/integration/providers/test_count_tokens_model_wire.py:200
↓ 7 callersFunction_many_marks
(marker: str, *, assistant_marked: bool)
tests/integration/providers/test_responses_bridge_message_cache_control_wire.py:685
↓ 7 callersMethod_map_quality_to_image_size
Map OpenAI quality to OpenRouter image_size format. Uses the same mapping as image generation since OpenRouter handles both
litellm/llms/openrouter/image_edit/transformation.py:336
↓ 7 callersFunction_mapping
(value: object)
litellm/llms/anthropic/messages/safeguards.py:250
↓ 7 callersFunction_marked_input_text
(text: str)
tests/unit/router_utils/pre_call_checks/test_prompt_caching_deployment_check.py:1610
↓ 7 callersFunction_marker
(label: str)
tests/integration/providers/test_malformed_tools_chaos.py:71
↓ 7 callersFunction_marker
()
tests/integration/messages_endpoint/chat_bridge/test_chat_bridge_mid_stream_failure_bookkeeping_wire.py:83
↓ 7 callersFunction_marker
( name: str = "prefix", ttl: int = 3600, tokens: int = 6000, previous: tuple[str, ...] = () )
tests/unit/proxy/spend_tracking/test_baseline_accounting.py:43
↓ 7 callersMethod_mask
(self, text: str)
tests/unit/proxy/mcp_server/guardrail_translation/test_mcp_guardrail_handler.py:113
↓ 7 callersFunction_matching_requests
(wire: Wire, marker: str)
tests/integration/observability/test_guardrail_stream_scope.py:409
↓ 7 callersMethod_matching_rows
(self, scope: DailyActivityScope)
tests/unit/proxy/management_endpoints/test_daily_activity_routes.py:270
↓ 7 callersMethod_maybe_execute_pipelines
Execute guardrail pipelines if any are configured for this request. Checks metadata for pipelines resolved by the policy engine
litellm/proxy/utils.py:3017
↓ 7 callersMethod_maybe_wrap_in_fake_stream
If the original request was streaming but converted to non-streaming for WebSearch interception, wrap the dict response in a FakeAnth
litellm/llms/custom_httpx/llm_http_handler.py:6340
↓ 7 callersMethod_mcp_request
A minimal ``Request`` for direct ``_admit_dcr_bridge_delegate`` calls, mirroring how ``process_mcp_request`` builds one from the ASGI scope wi
tests/unit/proxy/mcp_server/auth/test_user_api_key_auth_mcp.py:6730
↓ 7 callersFunction_member_budget_spend_keys
(models: Sequence[str])
tests/unit/proxy/auth/test_fallback_budget.py:84
↓ 7 callersFunction_member_with_budget
(gateway: Gateway, scenario: Scenario, team_id: str, *, max_budget: float)
tests/integration/spend/test_team_member_total_spend_reconciliation.py:52
↓ 7 callersFunction_message
(response: ChatResponse)
tests/e2e/llm_translation/test_together_ai_e2e.py:211
↓ 7 callersFunction_messages
(log: str)
tests/integration/configuration/test_json_logs_startup.py:139
↓ 7 callersFunction_messages
(marker: str)
tests/integration/sdk/test_stream_open_error_provider_headers_sdk.py:142
↓ 7 callersFunction_messages_body
(model: str, prompt: str, *, stream: bool, cached: bool = True)
tests/integration/messages_endpoint/chat_bridge/test_chat_bridge_multi_tool_call_blocks_wire.py:397
↓ 7 callersFunction_messages_endpoint_count
(router: Router, request_body: Mapping[str, JsonValue])
tests/unit/proxy/test_proxy_token_counter.py:4110
↓ 7 callersFunction_metadata_entries
(kwargs: dict[str, object])
tests/unit/proxy/guardrails/guardrail_hooks/test_model_armor.py:5028
↓ 7 callersFunction_metric
(guardrail_id: str, date: str = "2026-04-25", requests: int = 10, passed: int = 8, blocked: int = 2)
tests/unit/proxy/guardrails/test_usage_endpoints.py:70
↓ 7 callersFunction_minimal_spend_payload
()
tests/unit/proxy/db/test_db_spend_update_writer.py:179
↓ 7 callersMethod_mint
(self, api_base: str | None, monkeypatch: pytest.MonkeyPatch)
tests/unit/llms/anthropic/test_anthropic_wif.py:323
↓ 7 callersFunction_mint_access
()
tests/unit/proxy/mcp_server/outbound_credentials/test_session_token.py:58
↓ 7 callersFunction_mint_session_token
Mint a ``lite login`` token carrying the grants as they were at login time.
tests/unit/proxy/auth/test_user_api_key_auth_request_flow.py:9074
↓ 7 callersFunction_misconfigured
(rig: FederationRig, scenario: Scenario, shape: _Misconfiguration)
tests/integration/management/test_credential_federation_values.py:976
↓ 7 callersFunction_mock_deployment
(model_name: str, **deployment_limits: int)
tests/unit/proxy/test_route_llm_request.py:2549
↓ 7 callersFunction_mock_guardrail_post_response
(action: str = "NONE", texts=None, blocked_reason=None)
tests/unit/proxy/guardrails/guardrail_hooks/test_generic_guardrail_api.py:1456
↓ 7 callersFunction_mock_mapping
( id="mapping-1", claim_name="email", claim_value="user@example.com", issuer=None, )
tests/unit/proxy/management_endpoints/test_jwt_key_mapping.py:427
↓ 7 callersFunction_mock_oauth_discovery
( respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch, *, server_url: str, scopes: lis
tests/unit/proxy/mcp_server/test_mcp_server_manager.py:12938
↓ 7 callersFunction_mock_response
(status_code: int = 200, body=None, raise_json=False)
tests/unit/proxy/a2a/test_discovery.py:36
↓ 7 callersFunction_model
(scenario: Scenario)
tests/integration/management/test_team_member_lifecycle.py:130
↓ 7 callersFunction_model_actions_mock
(name: str)
tests/unit/proxy/db/test_routing_prisma_wrapper.py:52
↓ 7 callersFunction_model_spans
(spans: tuple[Span, ...])
tests/integration/observability/test_otel_team_capture_message_content.py:289
↓ 7 callersFunction_models_in
The candidates a tier entry actually calls, each with its own pricing key. `litellm_params.model` is not always a model: on Azure it is the deplo
litellm/router_strategy/savings_baseline.py:74
↓ 7 callersMethod_modify_response_with_permission_errors
Modify the response to replace denied tool_calls blocks with error results Args: response: The model response to modify
litellm/proxy/guardrails/guardrail_hooks/tool_permission.py:1463
↓ 7 callersFunction_multipart_parts
(request: Request)
tests/integration/compatibility/test_missing_body_param_status.py:1822
↓ 7 callersFunction_nested_pytest_environment
(environment: Mapping[str, str])
tests/integration/database/test_harness_lifecycle.py:73
↓ 7 callersFunction_never_listed_passthrough_server
()
tests/unit/proxy/mcp_server/test_mcp_server_tool_calls_and_headers.py:7933
↓ 7 callersFunction_no_spend_record
A rollup row for a key with no spend, where SUM() returns NULL (None).
tests/unit/proxy/management_endpoints/test_common_daily_activity.py:1774
↓ 7 callersMethod_non_admin
(self)
tests/unit/proxy/management_endpoints/test_common_utils.py:947
↓ 7 callersMethod_normalize_message_content
Coerce OpenAI multi-modal content into a plain text string. Supports: * Plain string. * List of content-part dicts where ``t
litellm/proxy/guardrails/guardrail_hooks/cisco_ai_defense/cisco_ai_defense.py:1998
↓ 7 callersFunction_normalize_multipart_boundary
Rewrite random multipart boundaries to a fixed string in-place. httpx generates a fresh ``boundary=<random hex>`` for every multipart request
tests/_vcr_conftest_common.py:827
↓ 7 callersFunction_object
(value: JsonValue)
tests/integration/providers/test_gemini_tool_result_part_reference_wire.py:99
↓ 7 callersFunction_object_permission_mocks
Prisma double whose user row optionally already links a permission row.
tests/unit/proxy/management_endpoints/test_internal_user_endpoints.py:4579
↓ 7 callersMethod_obo_call_tool_with_retry
Call a token_exchange (OBO) tool; on an upstream 401/403 re-mint the token once and retry. The exchanged token is baked into the client at bu
litellm/proxy/mcp_server/mcp_server_manager.py:6527
↓ 7 callersMethod_obo_subject_token
The caller's bearer as the token_exchange (OBO) subject token, for that mode only. Prompts/resources discovery and reads on a token_exchange
litellm/proxy/mcp_server/mcp_server_manager.py:4115
↓ 7 callersFunction_one_call
(peer: McpPeer)
tests/integration/mcp/test_mcp_credentials.py:49
↓ 7 callersFunction_only
(wire: Wire)
tests/integration/sdk/test_ollama_embedding_wire.py:75
↓ 7 callersFunction_only
(records: tuple[dict[str, JsonValue], ...])
tests/integration/mcp/test_mcp_accounting_guardrails.py:389
↓ 7 callersFunction_only_choice
(body: Mapping[str, JsonValue])
tests/integration/providers/test_bedrock_mantle_claude_chat_wire.py:235
↓ 7 callersFunction_openai_backend
()
tests/integration/security/test_files_batches_access.py:148
↓ 7 callersFunction_openai_chunk
(choices: Sequence[Mapping[str, object]], usage: Mapping[str, int] | None = None)
tests/unit/litellm_core_utils/test_streaming_chunk_builder_utils.py:1741
↓ 7 callersFunction_openai_error_stream
(marker: str, code: str, message: str)
tests/integration/sdk/test_responses_bridge_stream_errors_sdk.py:134
↓ 7 callersFunction_openai_exception
(response: httpx.Response)
tests/unit/proxy/test_proxy_server_exception_mapping.py:48
↓ 7 callersFunction_openai_ir
(raw: Mapping[str, object])
tests/unit/llms/openai/decisions/test_openai_decisions_transformation.py:96
↓ 7 callersFunction_operation_span
(rig: _Rig, method: str, path: str, body: dict[str, object] | None = None)
tests/integration/observability/test_passthrough_operation_name.py:107
↓ 7 callersFunction_optional_attr_sequence
(obj: object, name: str)
litellm/llms/anthropic/messages/adapters/streaming_iterator.py:95
↓ 7 callersFunction_optional_str
(value: JsonValue | None)
litellm/llms/chatgpt/authenticator.py:45
↓ 7 callersFunction_outcome_from_worker
Build the ``user_properties`` list a worker-side ``record_vcr_outcome`` would attach. ``worker_id=""`` simulates the single-process case where
tests/unit/test_vcr_classification.py:387
↓ 7 callersFunction_output_blocking_callbacks
(seen: dict[str, object])
tests/unit/proxy/utils/proxy_logging/test_guardrail_pipeline.py:2289
↓ 7 callersMethod_output_config_anywhere
(optional_params: Mapping[str, object])
tests/unit/test_utils.py:3900
↓ 7 callersFunction_override_auth
(user)
tests/unit/proxy/management_endpoints/search_endpoints/test_search_tool_management.py:649
↓ 7 callersFunction_owned_containers_in_db
(monkeypatch, *model_object_ids: str)
tests/unit/containers/test_container_proxy_ownership.py:264
↓ 7 callersFunction_owned_tool
A discovered tool, the model and key that discovered it, and the owner the tool routes must report.
tests/integration/management/test_tool_policy_user.py:215
↓ 7 callersFunction_owner_fingerprint_for
Stable, non-reversible identifier for the caller used to bind an mcp-session-id to its creator. Hash the resolved credential before
litellm/proxy/mcp_server/server.py:1395
↓ 7 callersFunction_page
(*container_ids: str, has_more: bool)
tests/unit/containers/test_container_proxy_ownership.py:285
↓ 7 callersFunction_paged_params
()
tests/unit/proxy/mcp_server/test_mcp_server_tool_calls_and_headers.py:103
↓ 7 callersFunction_parse
(adapter: TypeAdapter[_T], value: object)
litellm/proxy/guardrails/guardrail_hooks/akto/akto_attachments.py:400
↓ 7 callersMethod_parseSync
(e)
litellm/proxy/_experimental/out/_next/static/chunks/2j7hjtph8n74b.js:1
↓ 7 callersMethod_parse_anthropic_file
Parse Anthropic file object into OpenAI format.
litellm/llms/anthropic/files/transformation.py:316
↓ 7 callersFunction_parsed_assistant_message
(content: list[dict[str, object]], stop_reason: str)
tests/unit/llms/anthropic/chat/test_anthropic_chat_transformation.py:3827
↓ 7 callersFunction_passthrough_mode_scope
(server_name: str, extra_headers=None)
tests/unit/proxy/mcp_server/test_mcp_stale_session.py:1251
↓ 7 callersFunction_patch_pypi
Make PyPI return a JSON response with the given ``info`` block.
tests/unit/test_check_licenses.py:44
↓ 7 callersMethod_patch_resolves
Patch ``socket.getaddrinfo`` for a deterministic SSRF-guard test. ``mapping`` is ``{hostname: [ip-string, ...]}``; unknown hosts raise
tests/unit/proxy/mcp_server/test_mcp_server_manager.py:10808
↓ 7 callersMethod_patch_sso_settings
PATCH /update/sso_settings against a stored row; returns (response, saved row).
tests/unit/proxy/ui_crud_endpoints/test_proxy_setting_endpoints.py:741
↓ 7 callersMethod_patch_user_reload
(*, user_id, active=True, organization_id=None, tpm_limit=None, rpm_limit=None)
tests/unit/proxy/mcp_server/auth/test_user_api_key_auth_mcp.py:8604
↓ 7 callersFunction_patched_bedrock_post
(guardrail: BedrockGuardrail, response: MagicMock)
tests/unit/proxy/guardrails/guardrail_hooks/test_bedrock_guardrails.py:6256
↓ 7 callersFunction_paths
(app: FastAPI)
tests/unit/proxy/test__lazy_features.py:63
↓ 7 callersFunction_payload
(result: typing.Any)
tests/integration/mcp/test_proxy_mcp_e2e.py:675
↓ 7 callersMethod_payloads
(self, chunks)
tests/unit/llms/openai/responses/test_openai_responses_guardrail_handler.py:4620
↓ 7 callersFunction_peer
(headers: Mapping[str, str])
tests/integration/providers/test_openai_like_response_headers_wire.py:133
↓ 7 callersFunction_permission_for_stores
(*store_ids: str)
tests/integration/authorization/test_rag_query_vector_store_allowlist.py:43
↓ 7 callersFunction_pkce_record
(base_url, seconds_left)
tests/unit/proxy/client/cli/test_up_commands.py:250
↓ 7 callersFunction_poll
(*bodies: object)
tests/unit/llms/replicate/chat/test_handler.py:22
↓ 7 callersFunction_poll
(client: ManagementClient, attempt: Callable[[], T | None], failure: str)
tests/e2e/management/test_budget_customer_user_org_e2e.py:34
↓ 7 callersMethod_poll_engine_proc
poll via os.kill(pid, 0) every 1s. Only used when BOTH waitpid thread and pidfd are unavailable (e.g., PID is not our child process an
litellm/proxy/utils.py:7380
↓ 7 callersFunction_poll_until_serves_again
Poll past the window until the blocked key serves again; every refusal must stay a budget block, so a crashed reset path or provider error fails l
tests/e2e/quota_management/budgets/test_budget_reset_e2e.py:38
← previousnext →10,201–10,300 of 202,479, ranked by callers