MCPcopy Create free account

hub / github.com/BerriAI/litellm / endpoints

Endpoints5,595 in github.com/BerriAI/litellm

Routetest_pass_through_guardrail_leaves_tools_untouched
pytest.mark.parametrize( "input_value", ["hi", [{"role": "user", "content": "hi", "type": "mes
tests/unit/llms/openai/responses/test_openai_responses_guardrail_handler.py:None
Routetest_pass_through_guardrail_scans_the_client_body_without_the_callers_key_metadata
pytest.mark.parametrize("route", [OPENAI_ROUTE, ANTHROPIC_ROUTE])
tests/integration/observability/test_passthrough_guardrail_scan_text.py:None
Routetest_pass_through_keeps_the_user_id_from_routes_a_guardrail_scans
pytest.mark.parametrize( "default_on, event_hook, guardrails_config, client_fields, stream_scope, forwarde
tests/unit/proxy/pass_through_endpoints/test_pass_through_endpoints.py:None
Routetest_pass_through_stream_rate_limit_relays_the_provider_status_and_headers
pytest.mark.parametrize("route", _PASS_THROUGHS)
tests/integration/streaming/test_stream_open_error_provider_headers_proxy.py:None
Routetest_pass_through_stream_relays_the_scripted_frames_verbatim
pytest.mark.parametrize("route", _PASS_THROUGH_ROUTES)
tests/integration/providers/test_vertex_anthropic_structured_output_wire.py:None
Routetest_pass_through_success_handler_gemini_routing
patch( "litellm.proxy.pass_through_endpoints.llm_provider_handlers.gemini_passthrough_logging_handler.
tests/unit/proxy/pass_through_endpoints/llm_provider_handlers/test_gemini_passthrough_logging_handler.py:None
Routetest_pass_through_treats_the_configured_anthropic_base_as_anthropic
pytest.mark.parametrize( "target, forwarded", [ ("http://gateway.test:8080/anthropic/v1/messag
tests/unit/proxy/pass_through_endpoints/test_pass_through_endpoints.py:None
Routetest_passthrough_anthropic
meta( Subject( domain=Domain.PASSTHROUGH, route=Route.PASSTHROUGH, providers=(Prov
tests/e2e/claude_code/passthrough/test_anthropic.py:None
Routetest_passthrough_azure
meta( Subject( domain=Domain.PASSTHROUGH, route=Route.PASSTHROUGH, providers=(Prov
tests/e2e/claude_code/passthrough/test_azure.py:None
Routetest_passthrough_bedrock_invoke
meta( Subject( domain=Domain.PASSTHROUGH, route=Route.PASSTHROUGH, providers=(Prov
tests/e2e/claude_code/passthrough/test_bedrock_invoke.py:None
Routetest_passthrough_cold_start_emits_401_with_matching_resource_metadata
pytest.mark.parametrize( "route,expected_metadata_path", [ ( "/mcp/sample_docs",
tests/unit/proxy/mcp_server/test_mcp_oauth_passthrough_cold_start.py:None
Routetest_passthrough_denies_model_outside_key_allowlist
meta( Subject( domain=Domain.PROXY_AUTH, route=Route.PASSTHROUGH,
tests/e2e/llm_translation/test_passthrough_e2e.py:None
Routetest_passthrough_detected_stream_upstream_error_logs_model_from_url
pytest.mark.parametrize( "target, custom_llm_provider, expected_provider", [ (_GEMINI_FLASH_TA
tests/unit/proxy/pass_through_endpoints/test_pass_through_endpoints.py:None
Routetest_passthrough_failure_stamps_server_span
pytest.mark.parametrize("path,http_route", SMOKE_PASSTHROUGHS)
tests/unit/integrations/open_telemetry/test_otel_passthrough_endpoints.py:None
Routetest_passthrough_guardrail_block_logs_model_from_url
pytest.mark.parametrize( "target, custom_llm_provider, body, expected_model, expected_provider", [
tests/unit/proxy/pass_through_endpoints/test_pass_through_endpoints.py:None
Routetest_passthrough_guardrails_follow_effective_relay_stream_decision
pytest.mark.parametrize( ("route_stream", "body_stream", "expected_streaming"), [ (True, False
tests/unit/proxy/pass_through_endpoints/test_pass_through_endpoints.py:None
Routetest_passthrough_mid_stream_drop_logs_model_from_url
pytest.mark.parametrize( "target, custom_llm_provider, expected_provider", [ (_GEMINI_FLASH_TA
tests/unit/proxy/pass_through_endpoints/test_pass_through_endpoints.py:None
Routetest_passthrough_prefix_lists_batches_from_openai
meta( Subject( domain=Domain.PASSTHROUGH, route=Route.PASSTHROUGH,
tests/e2e/llm_translation/test_passthrough_e2e.py:None
Routetest_passthrough_prefix_uploads_a_file_to_openai
meta( Subject( domain=Domain.PASSTHROUGH, route=Route.PASSTHROUGH,
tests/e2e/llm_translation/test_passthrough_e2e.py:None
Routetest_passthrough_provider_record_no_longer_emits_empty_messages
pytest.mark.parametrize( "body", [ {"prompt": "hi"}, {"input": "hi"},
tests/unit/llms/bedrock/files/test_bedrock_files_transformation.py:None
Routetest_passthrough_spend_logs_follow_the_authenticated_tenant_storage_policy
pytest.mark.parametrize("logging_params_for", [_passthrough_logging_params, _router_passthrough_logging_params
tests/unit/proxy/spend_tracking/test_spend_tracking_utils.py:None
Routetest_passthrough_stream_relays_safeguards_and_bytes_verbatim
pytest.mark.parametrize("route", tuple(ROUTES))
tests/integration/messages_endpoint/safeguards/test_safeguard_results_passthrough_routes.py:None
Routetest_passthrough_upload_is_rejected_outside_a_native_vertex_batch
pytest.mark.parametrize( "content, form, expected_param", [ pytest.param(
tests/e2e/batches/test_batches_e2e.py:None
Routetest_passthrough_upstream_error_logs_model_from_url
pytest.mark.parametrize( "target, custom_llm_provider, stream, expected_provider", [ (_GEMINI_
tests/unit/proxy/pass_through_endpoints/test_pass_through_endpoints.py:None
Routetest_passthrough_upstream_error_on_a_user_defined_route_to_google_gets_no_url_attribution
pytest.mark.parametrize("target", [_GEMINI_FLASH_TARGET, _VERTEX_FLASH_TARGET])
tests/unit/proxy/pass_through_endpoints/test_pass_through_endpoints.py:None
Routetest_passthrough_upstream_error_to_a_host_outside_gemini_and_vertex_gets_no_url_attribution
pytest.mark.parametrize( "target", [ _RELAYED_VERTEX_COUNT_TOKENS_TARGET, _TRANSLATE_T
tests/unit/proxy/pass_through_endpoints/test_pass_through_endpoints.py:None
Routetest_passthrough_vertex_ai
meta( Subject( domain=Domain.PASSTHROUGH, route=Route.PASSTHROUGH, providers=(Prov
tests/e2e/claude_code/passthrough/test_vertex_ai.py:None
Routetest_password_reset_session_can_reach_change_password_and_its_own_identity
pytest.mark.parametrize("route", ["/user/password/change", "/management/v1/users/me"])
tests/unit/proxy/auth/test_route_checks.py:None
Routetest_password_reset_session_is_blocked_everywhere_else_with_reset_message
pytest.mark.parametrize( "route", [ "/user/info", "/key/generate", "/user/upda
tests/unit/proxy/auth/test_route_checks.py:None
Routetest_patch_accepts_the_same_credential_name_echoed_back
pytest.mark.parametrize( ("patch_info", "expected_info"), [ ({}, {"custom_llm_prov
tests/unit/proxy/credential_endpoints/test_endpoints.py:None
Routetest_patch_agent_in_db_replaces_access_group_ids_when_provided
pytest.mark.parametrize( ("patch_body", "expected"), [ ({"access_group_ids": ["ag-2", "ag-3"]}
tests/unit/proxy/agent_endpoints/test_agent_registry.py:None
Routetest_patch_body_reshaping_adds_no_keys_the_caller_did_not_send
pytest.mark.parametrize( "body", [ {"tpm_limit": 5}, {"max_budget": None}, {"o
tests/unit/proxy/management_endpoints/test_team_endpoints.py:None
Routetest_patch_model_non_admin_cannot_touch_an_oidc_api_key_reference
pytest.mark.parametrize( "stored_api_key, patched_params", [ ("sk-static", {"api_k
tests/unit/proxy/management_endpoints/test_model_management_endpoints.py:None
Routetest_patch_organization_update_with_null_tpm_limit_clears_it_and_keeps_sibling_limits
pytest.mark.covers("mgmt.organization.update.null_clears_budget_limit")
tests/integration/management/test_organization_budget_clear.py:None
Routetest_path_only_model_alias_reaches_the_allowed_deployment
pytest.mark.parametrize(("route", "kind"), _PATH_MODEL_ROUTES)
tests/integration/authorization/test_audit_any_sweep_auth.py:None
Routetest_path_only_model_alias_refuses_an_unallowed_deployment
pytest.mark.parametrize(("route", "kind"), _PATH_MODEL_ROUTES)
tests/integration/authorization/test_audit_any_sweep_auth.py:None
Routetest_path_placeholder_matches_what_the_router_accepts
pytest.mark.parametrize( "pattern, route, matches", [ # a :path placeholder takes what the rou
tests/unit/proxy/auth/test_route_checks.py:None
Routetest_pcm16_without_a_rate_streams_at_the_openai_default_rate
pytest.mark.parametrize( ("audio_input", "sample_rate"), [({"format": {"type": "audio/pcm"}}, 24_000),
tests/unit/llms/soniox/realtime/test_soniox_realtime_transformation.py:None
Routetest_pdf_input_anthropic
pytest.mark.covers("llm.messages.anthropic.pdf_input.nonstream.works")
tests/e2e/claude_code/pdf_input/test_anthropic.py:None
Routetest_pdf_input_azure
pytest.mark.covers("llm.messages.azure_foundry.pdf_input.nonstream.works")
tests/e2e/claude_code/pdf_input/test_azure.py:None
Routetest_pdf_input_bedrock_converse
pytest.mark.covers("llm.messages.bedrock_converse.pdf_input.nonstream.works")
tests/e2e/claude_code/pdf_input/test_bedrock_converse.py:None
Routetest_pdf_input_bedrock_invoke
pytest.mark.covers("llm.messages.bedrock_invoke.pdf_input.nonstream.works")
tests/e2e/claude_code/pdf_input/test_bedrock_invoke.py:None
Routetest_pdf_input_vertex_ai
pytest.mark.covers("llm.messages.vertex.pdf_input.nonstream.works")
tests/e2e/claude_code/pdf_input/test_vertex_ai.py:None
Routetest_pending_claude_web_call_replays_to_anthropic_as_its_own_server_tool_use
pytest.mark.parametrize( ("server_tool_use", "expected_input"), ( (
tests/unit/responses/litellm_completion_transformation/test_litellm_completion_responses.py:None
Routetest_per_server_auth_header_reaches_both_openapi_dispatch_arms
pytest.mark.parametrize("dispatch_arm", ["local_registry", "call_tool"])
tests/unit/proxy/mcp_server/test_openapi_tool_auth.py:None
Routetest_personal_admin_can_assign_mcp_toolsets
patch( "litellm.proxy.management_helpers.object_permission_utils.get_allow_all_keys_server_ids", retur
tests/unit/proxy/management_helpers/test_object_permission_utils.py:None
Routetest_personal_key_blocks_over_its_own_budget
pytest.mark.covers("quota_management.budget.key.blocks_over_limit")
tests/e2e/quota_management/budgets/test_budget_enforcement_e2e.py:None
Routetest_personal_key_resets_after_window
pytest.mark.covers("quota_management.budget.key.resets_after_window")
tests/e2e/quota_management/budgets/test_budget_reset_e2e.py:None
Routetest_personal_key_user_budget_resets_after_window
pytest.mark.covers("quota_management.budget.internal_user.resets_after_window")
tests/e2e/quota_management/budgets/test_budget_reset_e2e.py:None
Routetest_personal_key_withheld_restricted_owner_team_denies_all_agents
pytest.mark.parametrize("blocked", [False, True], ids=["over-budget", "blocked"])
tests/unit/proxy/agent_endpoints/auth/test_agent_permission_handler.py:None
Routetest_personal_non_admin_cannot_assign_mcp_toolsets
patch( "litellm.proxy.management_helpers.object_permission_utils.get_allow_all_keys_server_ids", retur
tests/unit/proxy/management_helpers/test_object_permission_utils.py:None
Routetest_pg_vector_search_request_construction
patch("litellm.llms.custom_httpx.http_handler.HTTPHandler.post")
tests/unit/llms/pg_vector/vector_stores/test_pg_vector_transformation.py:None
Routetest_pi_asks_for_no_more_output_tokens_than_the_model_or_its_own_default
pytest.mark.parametrize("max_output_tokens", [PI_DEFAULT_MAX_TOKENS // 4, PI_DEFAULT_MAX_TOKENS * 8])
tests/unit/llms/pi/harness/test_transformation.py:None
Routetest_pinned_agent_upstream_failures_reach_caller_without_hint
pytest.mark.parametrize( ("fields", "status"), ( ({"error": {"code": -32603, "message": "scrip
tests/integration/compatibility/test_a2a_protocol_version_errors.py:None
Routetest_pinned_langgraph_agent_answers_message_send_in_the_legacy_dialect
pytest.mark.parametrize("route", ROUTES)
tests/integration/compatibility/test_a2a_protocol_version_override.py:None
Routetest_pinned_v0_3_serves_flat_message_shape
meta( Subject( domain=Domain.AGENTS_API, route=Route.A2A, provider
tests/e2e/a2a/test_a2a_agent_e2e.py:None
Routetest_pinned_v1_0_serves_nested_message_shape
meta( Subject( domain=Domain.AGENTS_API, route=Route.A2A, provider
tests/e2e/a2a/test_a2a_agent_e2e.py:None
Routetest_pins_source_identity_before_emitted_id
pytest.mark.parametrize( "model, pinned", [ ("literal-claude-router-source", "emit
tests/unit/proxy/client/cli/test_configure_commands.py:None
Routetest_pipeline
router.post( "/policies/test-pipeline", tags=["Policies"], dependencies=[Depends(user_api_key_auth
litellm/proxy/policy_engine/policy_endpoints.py:None
Routetest_placement_is_scoped_to_complexity_router_deployments
pytest.mark.parametrize( "model,present_fields,scoped", [ ("auto_router/complexity_router", fr
tests/unit/router_strategy/test_auto_router_model_naming.py:None
Routetest_plain_exception_answers_an_openai_shaped_500
pytest.mark.parametrize( ("route_name", "named"), _PLAIN_EXCEPTION_CASES, ids=("run_without_assistant", "m
tests/integration/providers/test_assistants_route_errors_wire.py:None
Routetest_plain_formatter_keeps_message_colors_only_with_the_color_format
pytest.mark.parametrize( ("log_format", "want_suffix"), [ (_COLOR_LOG_FORMAT, "litellm.acomple
tests/unit/test_logging.py:None
Routetest_plain_query_price_leaves_a_token_priced_row_billing_tokens
pytest.mark.parametrize( ("token_rates", "expected_costs"), [ ({"input_cost_per_token": 1e-05,
tests/unit/litellm_core_utils/test_decisions_pricing.py:None
Routetest_plumbing_turns_do_not_re_escalate_a_pinned_session
pytest.mark.parametrize( "plumbing_turn", [ pytest.param( [{"type"
tests/unit/router_strategy/test_complexity_router.py:None
Routetest_policies_and_guardrails
router.post( "/utils/test_policies_and_guardrails", tags=["utils"], dependencies=[Depends(user_api
litellm/proxy/management_endpoints/policy_endpoints/endpoints.py:None
Routetest_policy_id_from_init
patch( "litellm.proxy.guardrails.guardrail_hooks.zscaler_ai_guard.ZscalerAIGuard.make_zscaler_ai_guard_api
tests/unit/proxy/guardrails/guardrail_hooks/zscaler_ai_guard/test_zscaler_ai_guard.py:None
Routetest_policy_id_from_request_metadata
patch( "litellm.proxy.guardrails.guardrail_hooks.zscaler_ai_guard.ZscalerAIGuard.make_zscaler_ai_guard_api
tests/unit/proxy/guardrails/guardrail_hooks/zscaler_ai_guard/test_zscaler_ai_guard.py:None
Routetest_policy_id_from_team_metadata
patch( "litellm.proxy.guardrails.guardrail_hooks.zscaler_ai_guard.ZscalerAIGuard.make_zscaler_ai_guard_api
tests/unit/proxy/guardrails/guardrail_hooks/zscaler_ai_guard/test_zscaler_ai_guard.py:None
Routetest_policy_id_from_user_api_key_metadata
patch( "litellm.proxy.guardrails.guardrail_hooks.zscaler_ai_guard.ZscalerAIGuard.make_zscaler_ai_guard_api
tests/unit/proxy/guardrails/guardrail_hooks/zscaler_ai_guard/test_zscaler_ai_guard.py:None
Routetest_policy_id_zero_from_request_metadata
patch( "litellm.proxy.guardrails.guardrail_hooks.zscaler_ai_guard.ZscalerAIGuard.make_zscaler_ai_guard_api
tests/unit/proxy/guardrails/guardrail_hooks/zscaler_ai_guard/test_zscaler_ai_guard.py:None
Routetest_policy_matching
router.post( "/policy/test", tags=["policy management"], dependencies=[Depends(user_api_key_auth)]
litellm/proxy/management_endpoints/policy_endpoints/endpoints.py:None
Routetest_policy_template
router.post( "/policy/templates/test", tags=["policy management"], dependencies=[Depends(user_api_
litellm/proxy/management_endpoints/policy_endpoints/endpoints.py:None
Routetest_poll_for_authentication_auto_assigned_team
patch("litellm.proxy.client.cli.commands.auth._handle_team_selection_during_polling")
tests/unit/proxy/auth/test_cli_auth.py:None
Routetest_poll_for_authentication_no_data
patch("litellm.proxy.client.cli.commands.auth._handle_team_selection_during_polling")
tests/unit/proxy/auth/test_cli_auth.py:None
Routetest_poll_for_authentication_no_teams
patch("litellm.proxy.client.cli.commands.auth._handle_team_selection_during_polling")
tests/unit/proxy/auth/test_cli_auth.py:None
Routetest_poll_for_authentication_team_selection_cancelled
patch( "litellm.proxy.client.cli.commands.auth._handle_team_selection_during_polling", return_value=No
tests/unit/proxy/auth/test_cli_auth.py:None
Routetest_poll_for_authentication_team_selection_success
patch( "litellm.proxy.client.cli.commands.auth._handle_team_selection_during_polling", return_value="j
tests/unit/proxy/auth/test_cli_auth.py:None
Routetest_poll_for_ready_200_ready
patch( "litellm.proxy.client.cli.commands.auth.requests.get", side_effect=[ Mock(
tests/unit/proxy/auth/test_cli_auth.py:None
Routetest_poll_for_ready_404
patch( "litellm.proxy.client.cli.commands.auth.requests.get", side_effect=[Mock(status_code=404)], )
tests/unit/proxy/auth/test_cli_auth.py:None
Routetest_poll_for_ready_connection_failure
patch( "litellm.proxy.client.cli.commands.auth.requests.get", side_effect=[ requests.RequestEx
tests/unit/proxy/auth/test_cli_auth.py:None
Routetest_poll_for_ready_pending
patch( "litellm.proxy.client.cli.commands.auth.requests.get", side_effect=[ Mock(
tests/unit/proxy/auth/test_cli_auth.py:None
Routetest_poll_for_ready_single_pending
patch( "litellm.proxy.client.cli.commands.auth.requests.get", side_effect=[ Mock(
tests/unit/proxy/auth/test_cli_auth.py:None
Routetest_polly_generative_voice_returns_mp3
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.AUDIO, p
tests/e2e/llm_translation/test_audio_speech_e2e.py:None
Routetest_port_override_reaches_settings_launch_and_pid_record
pytest.mark.parametrize( ("command", "leading_args"), [(start, []), (autoroute_group, ["start"
tests/unit/proxy/client/cli/autoroute/test_commands.py:None
Routetest_positional_param_from_any_default_source_returns_400
pytest.mark.parametrize("route", tuple(_POSITIONAL))
tests/integration/compatibility/test_status_code_followups_defaults.py:None
Routetest_positional_param_in_the_body_reaches_upstream
pytest.mark.parametrize("route", tuple(_POSITIONAL))
tests/integration/compatibility/test_status_code_followups_defaults.py:None
Routetest_post_call_failure_hook_keeps_the_call_type_request_setup_logged
pytest.mark.parametrize( "call_type, body", [ ("anthropic_messages", {"model": "m", "messages"
tests/unit/proxy/utils/proxy_logging/test_post_call_failure_hook.py:None
Routetest_post_call_failure_hook_keeps_the_route_for_multi_operation_routes
pytest.mark.parametrize("route", ["/v1/files", "/files/file-abc", "/v1/containers"])
tests/unit/proxy/utils/proxy_logging/test_post_call_failure_hook.py:None
Routetest_post_call_failure_hook_lifts_route_call_type_for_gate_rejections
pytest.mark.parametrize( "route, request_data, expected_call_type", [ ("/v1/chat/completions",
tests/unit/proxy/utils/proxy_logging/test_post_call_failure_hook.py:None
Routetest_post_call_judges_a_returned_qualified_member_name_by_the_member_names_pre_call_judged
pytest.mark.parametrize( ("decision", "default_action", "kept"), [("allow", "deny", ["weather_
tests/unit/proxy/guardrails/guardrail_hooks/test_tool_permission.py:None
Routetest_post_call_pipeline_drops_the_steps_that_did_not_run_only_while_nothing_has_read_them
pytest.mark.parametrize( ("log_parked", "call_type", "bucket", "expected_after_response"), [ p
tests/unit/proxy/utils/proxy_logging/test_guardrail_pipeline.py:None
Routetest_post_call_scans_output_on_every_registered_alias
pytest.mark.parametrize( "request_route", [ "/responses",
tests/unit/proxy/guardrails/guardrail_hooks/unified_guardrails/test_unified_guardrail.py:None
Routetest_post_call_success_hook_called_when_guardrails_configured
patch(_COLLECT, return_value=["rubrik"])
tests/unit/proxy/pass_through_endpoints/test_passthrough_post_call_guardrails.py:None
Routetest_post_call_success_hook_skipped_when_no_guardrails
patch(_COLLECT, return_value=[])
tests/unit/proxy/pass_through_endpoints/test_passthrough_post_call_guardrails.py:None
Routetest_post_maps_gateway_fault_4xx_to_client_error
pytest.mark.parametrize( "code", ["invalid_client", "unauthorized_client", "unsupported_grant_type", "inva
tests/unit/proxy/mcp_server/outbound_credentials/test_token_exchange_provider.py:None
Routetest_post_vs_patch_metadata_write_mapping
pytest.mark.parametrize( "label, existing_metadata, body, expected_post, expected_patch", _METADATA_MA
tests/unit/proxy/management_endpoints/test_team_endpoints.py:None
Routetest_postgres_connection_capacity_refusal_is_service_unavailable_not_a_data_error
pytest.mark.parametrize( "error", [ DataError(data={"user_facing_error": {"message": _TOO_MANY
tests/unit/proxy/db/test_exception_handler.py:None
Routetest_postgres_service_span_is_named_by_sql_verb_and_prisma_table
pytest.mark.parametrize( ("call_type", "event_metadata", "expected"), [ ("get_data", {"table_n
tests/unit/integrations/otel/test_otel_v2_logger.py:None
Routetest_postgres_sqlstate_reads_the_code_prisma_attached_to_the_failed_statement
pytest.mark.parametrize( ("error", "sqlstate"), [ ( RawQueryError(
tests/unit/proxy/db/test_exception_handler.py:None
Routetest_pre_call_blocks_a_provider_defined_tool_whose_name_is_not_its_own
pytest.mark.parametrize( "tool, call_type", [ ({"type": "web_search_20250305", "na
tests/unit/proxy/guardrails/guardrail_hooks/test_tool_permission.py:None
← previousnext →3,901–4,000 of 5,595, ranked by callers