MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions202,479 in github.com/BerriAI/litellm

↓ 15 callersFunction_ask_as_team_tagged
( rig: _Rig, tag: str, *, stream: bool = False, path: str = "/v1/chat/completions", ex
tests/integration/observability/test_guardrail_pipeline_applied_header.py:495
↓ 15 callersFunction_assert_billed
(key: str, sessions: int)
tests/integration/providers/test_realtime_unguarded_voice_turns.py:428
↓ 15 callersFunction_assert_dialed
(forward: ForwardProxy, response: httpx.Response, host: str)
tests/integration/providers/test_voyage_mongodb_host_wire.py:246
↓ 15 callersFunction_assert_held_back
(rig: _Rig, response: httpx.Response, marker: str)
tests/integration/providers/test_malformed_tools_wire.py:1695
↓ 15 callersFunction_assert_logged
(answer: _Answer, model: str, status: str)
tests/integration/routing/test_deployment_mode_routing_wire.py:343
↓ 15 callersFunction_assert_only_rendered
(wire: Wire, prompt: str, *, stream: bool = False)
tests/integration/providers/test_custom_prompt_template_wire.py:111
↓ 15 callersFunction_assertion
(typ: str = ID_JAG_TYP, **claims: object)
tests/unit/proxy/mcp_server/test_id_jag_grant.py:82
↓ 15 callersFunction_attribute_or_key
(value: object, key: str)
litellm/integrations/anthropic_cache_control_hook.py:569
↓ 15 callersFunction_audio_on_wire
(payload: JsonValue)
tests/integration/providers/test_responses_bridge_input_audio_wire.py:87
↓ 15 callersFunction_azure_sku_deployment
(model_group: str, sku_host: str, mode: str, **model_info: object)
tests/unit/test_router/test_router.py:7888
↓ 15 callersFunction_backend_ws_closing_with
(*frames: bytes | Exception)
tests/unit/litellm_core_utils/test_realtime_streaming.py:4873
↓ 15 callersMethod_base
(self, config, request, allow_client_side_credentials=False, *, selected_by_id: bool)
tests/unit/proxy/health_endpoints/test_health_endpoints.py:5250
↓ 15 callersFunction_body
(request: Request)
tests/integration/compatibility/test_openai_sdk_client_paths.py:92
↓ 15 callersFunction_build_sampling_request
The synthetic FastAPI Request for sampling sub-calls, carrying the original MCP connection's headers and client IP.
litellm/proxy/mcp_server/sampling_handler.py:1044
↓ 15 callersFunction_byte_items_sent
Return every byteItem payload (file scans) submitted to Model Armor.
tests/unit/proxy/guardrails/guardrail_hooks/test_model_armor.py:2421
↓ 15 callersMethod_cache
(self)
tests/unit/integrations/test_custom_guardrail.py:2202
↓ 15 callersFunction_chat_message
(response: httpx.Response)
tests/integration/providers/test_bedrock_native_structured_output_wire.py:470
↓ 15 callersFunction_chunk
(identity: str, choices: Sequence[JsonValue], **extra: JsonValue)
tests/integration/routing/test_vllm_passthrough_stream_relay.py:63
↓ 15 callersFunction_claude_code_payload
The exact adaptive-thinking shape Claude Code (claude-cli) sends.
tests/unit/llms/anthropic/messages/native/test_anthropic_messages_effort.py:19
↓ 15 callersFunction_client
(max_decompressed_body_size_mb: float = CAP_MB, root_path: str = "", **options: object)
tests/unit/proxy/middleware/test_request_body_decompression_middleware.py:58
↓ 15 callersFunction_client
( role: LitellmUserRoles, repository: _ConfigRepository, transport: httpx.AsyncBaseTransport | None = None
tests/unit/proxy/management_endpoints/test_roi_calculator_endpoints.py:133
↓ 15 callersFunction_completed_store
(rig: RagRig, response: httpx.Response)
tests/integration/authorization/test_rag_team_provider_credentials.py:822
↓ 15 callersFunction_config
(**overrides: object)
tests/unit/router_strategy/test_llm_v2.py:29
↓ 15 callersFunction_config_path
(home: Path)
tests/unit/proxy/client/cli/test_config_commands.py:37
↓ 15 callersFunction_convert_tool_envelope
(obj: object, *, to_chat: bool)
litellm/proxy/response_api_endpoints/endpoints.py:199
↓ 15 callersFunction_create
(gateway: Gateway, scenario: Scenario, values: Mapping[str, JsonValue])
tests/integration/management/test_credential_federation_values.py:162
↓ 15 callersMethod_create_anthropic_response_logging_payload
Create the standard logging object for Anthropic passthrough handles streaming and non-streaming responses
litellm/proxy/pass_through_endpoints/llm_provider_handlers/anthropic_passthrough_logging_handler.py:473
↓ 15 callersMethod_create_guardrail_span
Creates a span for Guardrail, if any guardrail information is present in standard_logging_object
litellm/integrations/opentelemetry.py:2062
↓ 15 callersFunction_create_team
A team the test deletes itself; cleanup only removes it if the test left it behind.
tests/integration/management/test_team_delete_large_membership.py:170
↓ 15 callersFunction_db_backed_proxy_config
( monkeypatch, rows: Mapping[str, Mapping[str, JsonValue]] )
tests/unit/proxy/proxy_server/test_proxy_config.py:1162
↓ 15 callersFunction_declaration
(description: str, value: JsonValue)
tests/integration/providers/test_gemini_anyof_null_branches_wire.py:152
↓ 15 callersFunction_delete
(replica: Gateway, interaction_id: str, key: str, *, path: str = "/v1beta/interactions")
tests/integration/spend/test_background_interaction_settlement.py:278
↓ 15 callersFunction_deploy
( scenario: Scenario, judge: Wire, simple: Wire, complex_: Wire, classifier: Mapping[str, JsonValue] | Non
tests/integration/routing/test_complexity_router_databricks_classifier.py:179
↓ 15 callersFunction_drain
(stream: object)
tests/unit/responses/mcp/test_aresponses_api_with_mcp.py:2524
↓ 15 callersFunction_drive_team_write
Drive POST ``update_team`` or PATCH ``patch_team`` against a mocked team. Returns ``(endpoint_result, update_mock)``; propagates whatever the end
tests/unit/proxy/management_endpoints/test_team_endpoints.py:13744
↓ 15 callersFunction_end_user_db_row
(user_id: str, **fields)
tests/unit/proxy/auth/test_auth_checks_object_access_and_lookup.py:8343
↓ 15 callersMethod_ensure_queue
Initialize the queue if it doesn't exist or if event loop has changed.
litellm/litellm_core_utils/logging_worker.py:148
↓ 15 callersFunction_error
(exception_type: type[Exception])
tests/unit/router_utils/test_get_retry_from_policy.py:27
↓ 15 callersMethod_estimate_tokens_for_request
Estimate total tokens this request will consume so we can reserve them upfront (input + output budget): estimated = input_tok
litellm/proxy/hooks/parallel_request_limiter_v3.py:957
↓ 15 callersFunction_eventually
Success callbacks run as tasks, so give the write a bounded window to land.
tests/unit/router_utils/pre_call_checks/test_prompt_caching_deployment_check.py:512
↓ 15 callersFunction_exception_types
Keep only the real exception classes among ``candidates``. The predicates below resolve prisma's error classes at call time, so a test that s
litellm/proxy/db/exception_handler.py:85
↓ 15 callersFunction_expect_metrics
( rig: Rig, populated: float, blank: float, *, api_provider: str = "openai", pf_id: st
tests/integration/observability/test_cache_hit_guardrail_metrics.py:279
↓ 15 callersFunction_failed
( core: RouterCore, model: str, *, expected_error: type[Exception], **request: object )
tests/unit/test_router/core/test_parity_failure_logging.py:84
↓ 15 callersFunction_far_deadline
A run deadline far enough out that only the other bounds can stop a batch loop.
tests/unit/proxy/test_spend_log_cleanup.py:49
↓ 15 callersFunction_flagged_deployment
(model: str, **litellm_params)
tests/unit/proxy/pass_through_endpoints/test_passthrough_endpoint_router.py:37
↓ 15 callersFunction_forwarded
(upstream: Wire)
tests/integration/observability/test_bedrock_guardrail_attachments.py:327
↓ 15 callersMethod_gauge_in_flight_from_cache_value
In-flight count from a cached gauge value: a dict of slot_id -> acquire timestamp when the in-memory registry is authoritative, or
litellm/proxy/hooks/parallel_request_limiter_v3.py:1514
↓ 15 callersMethod_guarded_stream
(guardrail: CustomGuardrail, upstream: AsyncIterable[object])
tests/unit/proxy/guardrails/guardrail_hooks/unified_guardrails/test_unified_guardrail.py:2424
↓ 15 callersMethod_guardrail
( event_hook: GuardrailEventHooks = GuardrailEventHooks.pre_call, default_on: bool = True,
tests/unit/llms/bedrock/realtime/test_bedrock_realtime_handler.py:1802
↓ 15 callersMethod_guardrail
(self, **overrides)
tests/unit/integrations/test_custom_guardrail.py:2197
↓ 15 callersMethod_handle_rate_limit_error
Handle rate limit exceeded by raising :class:`ProxyRateLimitError` (a 429).
litellm/proxy/hooks/parallel_request_limiter_v3.py:3282
↓ 15 callersFunction_handler_with_redis
( redis: _ScriptedRedis | FakeRateLimits, fail_closed: bool | None = None, force_hash_tag_grouping
tests/unit/proxy/hooks/test_parallel_request_limiter_v3.py:7857
↓ 15 callersFunction_info
( name: str, *, mode: str = "chat", providers: Sequence[str] = ("openai",), **overrides: o
tests/unit/proxy/public_endpoints/public_v1/test_model_hub.py:37
↓ 15 callersMethod_inject_cost_into_usage_dict
Inject cost information into the usage object of a streamed usage event (Anthropic ``message_delta`` or OpenAI ``chat.completion.chun
litellm/proxy/common_request_processing.py:5296
↓ 15 callersFunction_json_object_value
(value: JsonValue)
tests/integration/observability/_openinference_support.py:79
↓ 15 callersFunction_key
()
tests/unit/proxy/response_api_endpoints/test_endpoints.py:2461
↓ 15 callersFunction_key
(**overrides)
tests/unit/proxy/management_endpoints/test_team_admin_field_permissions.py:530
↓ 15 callersFunction_logged
(rig: Rig, key: str, count: int = 1)
tests/integration/providers/test_anthropic_refusal_stop_details_wire.py:517
↓ 15 callersFunction_make_chunk
( *, content: str = "", reasoning_content: str | None = None, usage: Usage = None, finish_
tests/unit/litellm_core_utils/test_streaming_chunk_builder_cursor.py:35
↓ 15 callersFunction_make_instruction_server
( server_id="s1", name="s1", *, alias=None, server_name=None, instructions=None, s
tests/unit/proxy/mcp_server/test_mcp_server_tool_calls_and_headers.py:6442
↓ 15 callersFunction_make_mock_session_iterator
Create a mock _get_session_iterator that yields a session returning json_response.
tests/unit/proxy/guardrails/guardrail_hooks/test_presidio.py:39
↓ 15 callersFunction_make_prisma
Return a mock prisma_client with litellm_tooltable.upsert, find_many, find_unique.
tests/unit/proxy/db/test_tool_registry_writer.py:59
↓ 15 callersMethod_make_server
(auth_type, delegate_auth_to_upstream=False)
tests/unit/proxy/mcp_server/auth/test_user_api_key_auth_mcp.py:2556
↓ 15 callersFunction_make_sync_client
()
tests/unit/interactions/test_agents_http_handler.py:52
↓ 15 callersFunction_make_wrapper
( chunks: list, provider: str = "anthropic", async_stream: bool = False, )
tests/unit/litellm_core_utils/test_streaming_overhead.py:88
↓ 15 callersFunction_mantle_body
(**fields: JsonValue)
tests/integration/providers/test_bedrock_mantle_count_tokens_wire.py:140
↓ 15 callersFunction_marker
()
tests/integration/observability/test_otel_trace_response_header.py:48
↓ 15 callersFunction_mock_callback_request
Return a MagicMock Request for callback/authorize same-origin tests. The callback handler only uses ``request`` to compute the proxy's own ba
tests/unit/proxy/mcp_server/test_discoverable_endpoints.py:124
↓ 15 callersFunction_mock_cli_sso_start_response
( login_id: str = "cli-session-uuid-456", poll_secret: str = "poll-secret", user_code: str = "ABCD
tests/unit/proxy/client/cli/test_auth_commands.py:81
↓ 15 callersFunction_mock_http_client
(response_body: Mapping[str, object])
tests/unit/llms/fireworks_ai/responses/test_fireworks_ai_responses_transformation.py:74
↓ 15 callersFunction_mock_inspect_response
( json_body: dict, *, status: int = 200, url: str = CHAT_URL )
tests/unit/proxy/guardrails/guardrail_hooks/_cisco_ai_defense_test_utils.py:69
↓ 15 callersFunction_mock_models
()
tests/unit/proxy/client/cli/test_configure_commands.py:30
↓ 15 callersFunction_mode
(stream: bool)
tests/integration/providers/test_gemini_long_decode_wire.py:115
↓ 15 callersFunction_model_list
()
tests/unit/router_strategy/test_router_routing_groups.py:28
↓ 15 callersFunction_native_body
(model: str, marker: str, **params: JsonValue)
tests/integration/providers/test_bedrock_runtime_chat_completions_wire.py:92
↓ 15 callersFunction_not_org_admin
update_team and team_info ask whether the caller administers the team's org before settling for team admin; a MagicMock prisma cannot answer that
tests/unit/proxy/management_endpoints/test_team_endpoints.py:153
↓ 15 callersMethod_oauth2_config
(self, **overrides)
tests/unit/proxy/mcp_server/test_mcp_server_manager.py:1124
↓ 15 callersFunction_observation
(payload: Mapping[str, object])
tests/unit/proxy/hooks/test_autorouter_baseline_cache.py:252
↓ 15 callersFunction_observed
(upstream_url: str, scenario_id: str)
tests/integration/providers/test_realtime_unguarded_voice_turns.py:403
↓ 15 callersFunction_one_delivery
(wire: Wire, target: str, marker: str)
tests/integration/providers/test_vertex_anthropic_inline_tools_beta_wire.py:119
↓ 15 callersFunction_only_request
(wire: Wire)
tests/integration/providers/test_responses_minted_reasoning_replay_wire.py:214
↓ 15 callersFunction_openai_error
(endpoint: str, model: str, supported: str)
tests/integration/routing/test_non_chat_model_endpoint_gate.py:221
↓ 15 callersFunction_os_environ_without_aws_keys
Strip AWS_* so get_credentials hits the ambient-env branch when no explicit keys are passed.
tests/unit/llms/bedrock/test_base_aws_llm.py:93
↓ 15 callersMethod_patch
org_perms: {org_id: LiteLLM_ObjectPermissionTable | None | LOAD_FAILS}. - table → org exists, ceiling = that permission. - None → o
tests/unit/proxy/mcp_server/auth/test_user_api_key_auth_mcp.py:9704
↓ 15 callersFunction_patch_responses_dispatch
Patch everything after the prompt management block so tests stay unit-level.
tests/unit/responses/test_responses_prompt_management.py:66
↓ 15 callersFunction_patched_websocket_passthrough_environment
(upstream_ws)
tests/unit/proxy/pass_through_endpoints/test_pass_through_endpoints.py:7602
↓ 15 callersFunction_payload
(response: httpx.Response)
tests/integration/providers/test_anthropic_count_tokens_system_lift_wire.py:242
↓ 15 callersFunction_permitted
(*fields: str)
tests/unit/proxy/management_endpoints/test_team_admin_field_permissions.py:200
↓ 15 callersFunction_post
(rig: Rig, path: str, body: Mapping[str, JsonValue], key: str)
tests/integration/providers/test_anthropic_refusal_stop_details_wire.py:265
↓ 15 callersFunction_prisma
(table=None)
tests/unit/proxy/credential_endpoints/test_user_provider_credentials.py:34
↓ 15 callersFunction_project_assignment_prisma
(stored_row: Mapping[str, object] | None = None)
tests/unit/proxy/management_endpoints/test_key_management_endpoints.py:21502
↓ 15 callersFunction_provider_router
(provider: str)
tests/unit/enterprise/proxy/hooks/test_managed_files.py:2436
↓ 15 callersMethod_push_in_memory_increments_to_redis
How this works: - async_log_success_event collects all provider spend increments in `redis_increment_operation_queue` - This
litellm/router_strategy/budget_limiter.py:714
↓ 15 callersFunction_raw_answer
(gateway: Gateway, body: Mapping[str, JsonValue])
tests/integration/providers/test_responses_bridge_tool_search_wire.py:383
↓ 15 callersFunction_read_responses_pin
( check: PromptCachingDeploymentCheck, request: dict[str, object], models: tuple[str, ...] = (AUTO
tests/unit/router_utils/pre_call_checks/test_prompt_caching_deployment_check.py:1827
↓ 15 callersFunction_refresher
( server=None, body=None, *, post_sink=None, persist_sink=None, clock=lambda: 1000.0 )
tests/unit/proxy/mcp_server/outbound_credentials/test_authz_code_refresher.py:64
↓ 15 callersMethod_register
(self, monkeypatch, key, provider, flag=True, **extra)
tests/unit/integrations/test_anthropic_cache_control_hook.py:4441
↓ 15 callersFunction_request
(query: str = "")
tests/unit/proxy/list_api/test_list_framework.py:107
↓ 15 callersMethod_resolve_category_file_path
Resolve a category file path that may be relative. Paths in policy templates (e.g. category_file) are often stored as relati
litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/content_filter.py:530
↓ 15 callersFunction_response
(status_code: int, *, json_body: object = None, text_body: str = "", headers: dict = None)
tests/unit/proxy/mcp_server/faults/test_classify.py:22
← previousnext →3,901–4,000 of 202,479, ranked by callers