MCPcopy Create free account

hub / github.com/BerriAI/litellm / endpoints

Endpoints5,595 in github.com/BerriAI/litellm

Routetest_init_logs_respects_existing_logger_provider
patch.dict( os.environ, {"LITELLM_OTEL_INTEGRATION_ENABLE_EVENTS": "true"}, clear=True )
tests/unit/integrations/test_opentelemetry.py:None
Routetest_init_metrics_creates_instruments_under_their_published_names
patch.dict( os.environ, {"LITELLM_OTEL_INTEGRATION_ENABLE_METRICS": "true"}, clear=True )
tests/unit/integrations/test_opentelemetry.py:None
Routetest_init_metrics_respects_existing_meter_provider
patch.dict( os.environ, {"LITELLM_OTEL_INTEGRATION_ENABLE_METRICS": "true"}, clear=True )
tests/unit/integrations/test_opentelemetry.py:None
Routetest_init_missing_api_key
patch.dict(os.environ, {}, clear=True)
tests/unit/integrations/test_braintrust_logging.py:None
Routetest_init_stores_each_supplied_value_except_none_as_class_level_config
pytest.mark.parametrize( ("supplied", "stored"), [ pytest.param({}, {}, id="nothing-supplied")
tests/unit/llms/nlp_cloud/chat/test_nlp_cloud_chat_transformation.py:None
Routetest_init_with_env_var
patch.dict(os.environ, {"BRAINTRUST_API_KEY": "test-env-api-key"})
tests/unit/integrations/test_braintrust_logging.py:None
Routetest_initialize_applies_streaming_scan_settings
patch("litellm.logging_callback_manager")
tests/unit/proxy/guardrails/guardrail_hooks/test_decision_model.py:None
Routetest_initialize_builds_guardrail_with_the_given_instructions
patch("litellm.logging_callback_manager")
tests/unit/proxy/guardrails/guardrail_hooks/test_decision_model.py:None
Routetest_initialize_deployment_for_pass_through_success
pytest.mark.usefixtures("isolate_passthrough_endpoint_router_state")
tests/unit/proxy/pass_through_endpoints/test_llm_passthrough_endpoints.py:None
Routetest_initialize_guardrail_honors_configured_mode
pytest.mark.parametrize( ("mode", "runs_pre_call", "runs_post_call"), [("post_call", False, True), ("p
tests/unit/proxy/guardrails/guardrail_hooks/test_crowdstrike_aidr.py:None
Routetest_initialize_guardrail_ok
patch("litellm.proxy.guardrails.guardrail_hooks.llm_as_a_judge.litellm.logging_callback_manager")
tests/unit/proxy/guardrails/test_llm_as_a_judge.py:None
Routetest_initialize_guardrail_preserves_every_mode_shape
pytest.mark.parametrize( ("mode", "runs_pre_call", "runs_post_call"), [ ("pre_call", True, Fal
tests/unit/proxy/guardrails/test_llm_as_a_judge.py:None
Routetest_initialize_guardrail_uses_default_router_provider
patch("litellm.proxy.guardrails.guardrail_hooks.llm_as_a_judge.litellm.logging_callback_manager")
tests/unit/proxy/guardrails/test_llm_as_a_judge.py:None
Routetest_initialize_presidio_mcp_only_mode_skips_post_call_output_scan
pytest.mark.parametrize( "mode, filter_scope, expect_output_scanned", [ ("pre_mcp_call", None,
tests/unit/proxy/guardrails/test_init_guardrails.py:None
Routetest_initialize_rejects_duplicate_check_names
patch("litellm.logging_callback_manager")
tests/unit/proxy/guardrails/guardrail_hooks/test_decision_model.py:None
Routetest_initialize_rejects_invalid_streaming_scan_settings
patch("litellm.logging_callback_manager")
tests/unit/proxy/guardrails/guardrail_hooks/test_decision_model.py:None
Routetest_initialize_rejects_missing_model_and_empty_checks
patch("litellm.logging_callback_manager")
tests/unit/proxy/guardrails/guardrail_hooks/test_decision_model.py:None
Routetest_initialized_presidio_scans_selected_surface
pytest.mark.parametrize("surface", ["mcp_arguments", "mcp_result", "llm_output"])
tests/unit/proxy/guardrails/guardrail_hooks/test_presidio.py:None
Routetest_inline_content_that_cannot_be_decoded_blocks_instead_of_skipping_inspection
pytest.mark.parametrize( ("inputs", "input_type"), [ ( _user_turn_with({"type": "i
tests/unit/proxy/guardrails/guardrail_hooks/test_ovalix.py:None
Routetest_input_image_and_input_file_parts_are_eligible
pytest.mark.parametrize( "part", [ {"type": "input_image", "image_url": "https://e
tests/unit/integrations/test_anthropic_cache_control_hook.py:None
Routetest_input_items_list_the_stored_prompt
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.RESPONSES,
tests/e2e/llm_translation/test_responses_retrieve_e2e.py:None
Routetest_input_rewrite_preserves_caller_input
pytest.mark.parametrize( ("input_value", "expected"), ( pytest.param( [{"type": "r
tests/unit/rust_bridge/test_detectors.py:None
Routetest_input_scan_error_drops_the_response_scan_only_without_continue
pytest.mark.parametrize( "scope,continue_on_input_failure,expected_calls,expected_statuses", (
tests/unit/integrations/test_custom_guardrail.py:None
Routetest_input_that_is_not_a_responses_prompt_never_narrows_or_raises
pytest.mark.parametrize( "request_input", [ [LONG_PROMPT, LONG_PROMPT], [{"role": "use
tests/unit/router_utils/pre_call_checks/test_prompt_caching_deployment_check.py:None
Routetest_input_type_is_forwarded_verbatim
pytest.mark.parametrize("input_type", ["request", "response"])
tests/unit/proxy/guardrails/guardrail_hooks/test_airia.py:None
Routetest_input_without_a_marker_is_untouched_under_drop_params
pytest.mark.parametrize("input", ("hi", [{"type": "message", "role": "user", "content": "hi"}]), ids=("string"
tests/unit/llms/openai/responses/test_openai_responses_transformation.py:None
Routetest_instructions_are_marked_when_the_bridge_builds_the_system_message
pytest.mark.parametrize( "content", [ pytest.param("hi", id="string-content"), pytest.
tests/unit/responses/test_responses_api_request_body.py:None
Routetest_instructions_are_neither_scanned_nor_rewritten
pytest.mark.parametrize("data_input", ["Hello", [{"role": "user", "content": "Hello"}]])
tests/unit/llms/openai/responses/test_openai_responses_guardrail_handler.py:None
Routetest_integration_token_user_id_scenario
patch("litellm.integrations.openmeter.HTTPHandler")
tests/unit/integrations/test_openmeter.py:None
Routetest_interaction_accepts_content_list
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.GOOGLE_GENAI,
tests/e2e/llm_translation/test_google_interactions_e2e.py:None
Routetest_interaction_applies_system_instruction
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.GOOGLE_GENAI,
tests/e2e/llm_translation/test_google_interactions_e2e.py:None
Routetest_interaction_calls_declared_tool
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.GOOGLE_GENAI,
tests/e2e/llm_translation/test_google_interactions_e2e.py:None
Routetest_interaction_forwards_native_body_to_gemini
pytest.mark.parametrize( "request_input", [ "plan a trip", [ {"role": "use
tests/integration/providers/test_gemini_interactions_wire.py:None
Routetest_interaction_on_another_openai_compatible_provider_is_billed_at_its_reported_cost
pytest.mark.parametrize("model", ("openrouter/openai/gpt-4o-mini", "deepseek/deepseek-chat"))
tests/unit/llms/openai_like/test_kyma_provider.py:None
Routetest_interactions_default_to_the_gemini_provider
pytest.mark.parametrize("endpoint", ["aget_interaction", "adelete_interaction", "acancel_interaction"])
tests/unit/test_router/core/test_endpoints_characterization_generic.py:None
Routetest_interactions_get_poll_is_not_billed
pytest.mark.parametrize( "call_type", ["aget", "get", "aget_interaction", "adelete_interaction", "acan
tests/unit/litellm_core_utils/test_litellm_logging.py:None
Routetest_interactions_with_an_openai_model_answers_in_the_interactions_shape
pytest.mark.parametrize("route", ("/v1beta/interactions", "/interactions"))
tests/integration/providers/test_interactions_openai_bridge_wire.py:None
Routetest_intercepted_search_is_billed_under_the_request_session
meta( Subject( domain=Domain.SPEND_BUDGETS, route=Route.MESSAGES,
tests/e2e/quota_management/spend_tracking/test_websearch_interception_session_e2e.py:None
Routetest_internal_call_origin_success_ops_are_skipped
pytest.mark.parametrize("origin", ["shadow_eval_judge", "autorouter_compaction"])
tests/unit/proxy/hooks/test_parallel_request_limiter_v3.py:None
Routetest_internal_details_in_an_upstream_message_are_redacted
pytest.mark.parametrize("route", ROUTES, ids=ROUTE_IDS)
tests/integration/providers/test_assistants_route_errors_wire.py:None
Routetest_internal_ip_reports_zero_blocked
patch("litellm.public_mcp_servers", [])
tests/unit/proxy/auth/test_mcp_ip_filtering.py:None
Routetest_internal_ip_sees_all_servers
patch("litellm.public_mcp_servers", [])
tests/unit/proxy/auth/test_mcp_ip_filtering.py:None
Routetest_internal_user_blocked_from_admin_viewer_logs_routes
pytest.mark.parametrize("route", ADMIN_VIEWER_LOGS_PAGE_ROUTES)
tests/unit/proxy/auth/test_route_checks.py:None
Routetest_internal_user_blocked_from_global_spend_routes
pytest.mark.parametrize("route", GLOBAL_SPEND_ROUTES)
tests/unit/proxy/auth/test_route_checks.py:None
Routetest_internal_user_blocked_from_search_tool_writes
pytest.mark.parametrize( "route", [ "/search_tools", # create "/search_tools/abc123",
tests/unit/proxy/auth/test_route_checks.py:None
Routetest_internal_user_blocked_from_vector_store_writes
pytest.mark.parametrize( "route", ["/vector_store/new", "/vector_store/update", "/vector_store/delete"
tests/unit/proxy/auth/test_route_checks.py:None
Routetest_internal_user_can_read_search_tools
pytest.mark.parametrize( "route", [ "/search_tools/list", "/search_tools/ui/available_
tests/unit/proxy/auth/test_route_checks.py:None
Routetest_internal_user_cannot_escalate_protected_fields
pytest.mark.parametrize( ("field", "value"), ( ("max_budget", 1000), ("max_budget", "1
tests/integration/authorization/test_user_self_update_guard.py:None
Routetest_internal_user_cannot_set_denied_routes_while_proxy_admin_can
pytest.mark.parametrize( "body", [{"denied_passthrough_routes": ["/integration-deny-probe"]}, {"metada
tests/integration/authorization/test_passthrough_route_denylist.py:None
Routetest_internal_user_credential_connection_route_collisions_denied
pytest.mark.parametrize( ("method", "route"), [ ("PATCH", "/credentials/x/user_connection"),
tests/unit/proxy/auth/test_route_checks.py:None
Routetest_internal_user_credential_connection_routes_allowed
pytest.mark.parametrize( ("method", "route"), [ ("GET", "/credentials/user_connections"),
tests/unit/proxy/auth/test_route_checks.py:None
Routetest_internal_user_view_only_blocked_from_global_spend_routes
pytest.mark.parametrize("route", GLOBAL_SPEND_ROUTES)
tests/unit/proxy/auth/test_route_checks.py:None
Routetest_internal_users_can_access_scoped_tag_usage_routes
pytest.mark.parametrize("route", ["/tag/list", "/tag/daily/activity"])
tests/unit/proxy/auth/test_route_checks.py:None
Routetest_internal_users_cannot_read_or_change_global_alerts
pytest.mark.parametrize("method", ["get", "put"])
tests/unit/proxy/management_endpoints/test_model_deprecation_alerts.py:None
Routetest_invalid_callback_data_never_interrupts_model_requests
pytest.mark.parametrize( "payload", ( None, {"id": []}, {"id": "x", "messages"
tests/unit/tracing/test_exporter.py:None
Routetest_invalid_chunking_returns_error
pytest.mark.covers("llm.vector_stores.openai.input_validation.nonstream.works")
tests/e2e/llm_translation/test_vector_stores_e2e.py:None
Routetest_invalid_connection_input_never_writes_requests_or_echoes_secrets
pytest.mark.parametrize("target", ["claude", "codex"])
tests/unit/proxy/client/cli/test_configure_commands.py:None
Routetest_invalid_connection_settings_are_rejected_without_saving
pytest.mark.parametrize( "patch", ({"github_api_url": None}, {"gitlab_api_url": None}, {"repos": ["invalid
tests/unit/proxy/management_endpoints/test_roi_calculator_endpoints.py:None
Routetest_invalid_custom_tier_configs_are_rejected
pytest.mark.parametrize( "patch,error_match", [ ({"classifier_type": "heuristic",
tests/unit/router_strategy/test_complexity_router.py:None
Routetest_invalid_excluded_services_values_are_rejected
pytest.mark.parametrize("value", ["", " ", "auth", "none,redis", "redis,", ",postgres"])
tests/unit/types/test_utils.py:None
Routetest_invalid_forecast_settings_are_rejected
pytest.mark.parametrize( "overrides", [ {"max_quality_gap": -0.1}, {"max_quality_gap":
tests/unit/router_strategy/test_llm_v2.py:None
Routetest_invalid_identity_fails_before_registration_is_written
pytest.mark.parametrize("operation", ["create", "patch", "put"])
tests/unit/proxy/agent_endpoints/test_agent_registry.py:None
Routetest_invalid_litellm_metadata_answers_400_when_metadata_carries_tags
pytest.mark.parametrize("route", ["/v1/chat/completions", "/v1/responses", "/cursor/chat/completions"])
tests/unit/proxy/test_litellm_pre_call_utils.py:None
Routetest_invalid_marengo_3_params_are_rejected_before_the_request_is_sent
pytest.mark.parametrize( "params", [ {"input_type": "clip"}, {"input_type": "video", "
tests/unit/llms/bedrock/embed/test_twelvelabs_marengo_3_transformation.py:None
Routetest_invalid_marengo_3_params_name_the_field_and_the_reason
pytest.mark.parametrize( "params,problem", [ ( {"input_type": "clip"},
tests/unit/llms/bedrock/embed/test_twelvelabs_marengo_3_transformation.py:None
Routetest_invalid_max_completion_tokens_return_client_errors
pytest.mark.covers("llm.chat_completions.openai.input_validation.nonstream.works")
tests/e2e/llm_translation/test_chat_completions_contract_e2e.py:None
Routetest_invalid_n_returns_client_error
pytest.mark.covers("llm.images_generations.openai.input_validation.nonstream.works")
tests/e2e/llm_translation/test_image_generation_e2e.py:None
Routetest_invalid_native_verdict_uses_existing_fallback
pytest.mark.parametrize("output", ["", "not-json", '{"tier":"UNKNOWN"}'])
tests/unit/router_strategy/test_complexity_router.py:None
Routetest_invalid_provider_response_is_an_api_error
pytest.mark.parametrize("provider", ("nace", "openrouter", "fireworks_ai", "typesafe"))
tests/unit/llms/base_llm/decisions/test_base_decisions_transformation.py:None
Routetest_invalid_reasoning_effort_is_a_400_not_a_500
pytest.mark.parametrize( "model", ["gemini-2.5-flash"], ids=["thinking_budget_mapper"], )
tests/unit/llms/vertex_ai/gemini/test_vertex_and_google_ai_studio_gemini.py:None
Routetest_invalid_response_id_returns_error
pytest.mark.covers("llm.responses.openai.input_validation.nonstream.works")
tests/e2e/llm_translation/test_responses_retrieve_e2e.py:None
Routetest_invalid_role_returns_client_error
pytest.mark.covers("llm.chat_completions.openai.input_validation.nonstream.works")
tests/e2e/llm_translation/test_chat_completions_contract_e2e.py:None
Routetest_invalid_saved_setup_fails_without_network_or_secret_output_and_can_be_forgotten
pytest.mark.parametrize("target", ["claude", "codex"])
tests/unit/proxy/client/cli/test_configure_commands.py:None
Routetest_invalid_size_returns_client_error
pytest.mark.covers("llm.images_generations.openai.input_validation.nonstream.works")
tests/e2e/llm_translation/test_image_generation_e2e.py:None
Routetest_invalid_temperatures_return_client_errors
pytest.mark.covers("llm.chat_completions.openai.input_validation.nonstream.works")
tests/e2e/llm_translation/test_chat_completions_contract_e2e.py:None
Routetest_invalid_tools_return_an_error_value
pytest.mark.parametrize( "tools", ( "lookup", [1], [{"name": "lookup", "input_
tests/unit/llms/vertex_ai/count_tokens/test_context.py:None
Routetest_invalid_verdict_fails_closed_to_capable_tier
pytest.mark.parametrize( "reply", [ "not json", _capability_reply(p_so
tests/unit/router_strategy/test_complexity_router.py:None
Routetest_invalid_voice_returns_error
pytest.mark.covers("llm.audio_speech.openai.input_validation.nonstream.works")
tests/e2e/llm_translation/test_audio_speech_e2e.py:None
Routetest_invitation_endpoints_non_admin_denied
pytest.mark.parametrize( "endpoint,payload", [ ("/invitation/new", {"user_id": "ta
tests/unit/proxy/test_proxy_server_endpoints_and_startup.py:None
Routetest_invitation_endpoints_proxy_admin_success
pytest.mark.parametrize( "endpoint,payload,mock_return", [ ( "/inv
tests/unit/proxy/test_proxy_server_endpoints_and_startup.py:None
Routetest_invocation_routes_resolve_the_same_target
pytest.mark.parametrize( "route,body,expected", [ ("/a2a/agent", {}, "agent"), ("/a2a/
tests/unit/proxy/agent_endpoints/auth/test_managed_authorization.py:None
Routetest_invoke_caller_schema_drops_unsupported_constraints_before_going_native
pytest.mark.parametrize( "caller_schema_param", [ lambda schema: {"output_format": {"type": "j
tests/unit/llms/bedrock/chat/invoke_transformations/test_bedrock_chat_invoke_transformations_anthropic_claude_transformation.py:None
Routetest_invoke_invalid_temperature_returns_client_error
pytest.mark.covers("llm.bedrock_native.bedrock_invoke.input_validation.nonstream.works")
tests/e2e/llm_translation/test_bedrock_native_e2e.py:None
Routetest_invoke_missing_max_tokens_returns_error
pytest.mark.covers("llm.bedrock_native.bedrock_invoke.input_validation.nonstream.works")
tests/e2e/llm_translation/test_bedrock_native_e2e.py:None
Routetest_invoke_missing_messages_returns_error
pytest.mark.covers("llm.bedrock_native.bedrock_invoke.input_validation.nonstream.works")
tests/e2e/llm_translation/test_bedrock_native_e2e.py:None
Routetest_invoke_model_that_cannot_force_the_json_tool_gets_native_output_without_thinking_unless_opted_out
pytest.mark.parametrize( ("forced_tool_use", "map_flag", "model_info", "thinking_params", "native"), [
tests/unit/llms/bedrock/chat/invoke_transformations/test_bedrock_chat_invoke_transformations_anthropic_claude_transformation.py:None
Routetest_invoke_passthrough_route_reaches_bedrock_runtime_for_a_mantle_deployment
pytest.mark.parametrize( ("route_kwargs", "env", "expected_bearer"), [ ({"api_key": "deploymen
tests/unit/llms/bedrock_mantle/passthrough/test_bedrock_mantle_passthrough_transformation.py:None
Routetest_invoke_regional_id_completes
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.CHAT_COMPLETIONS,
tests/e2e/llm_translation/test_bedrock_provider_matrix_e2e.py:None
Routetest_invoke_regional_id_streams
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.CHAT_COMPLETIONS,
tests/e2e/llm_translation/test_bedrock_provider_matrix_e2e.py:None
Routetest_invoke_returns_message
meta( Subject( domain=Domain.PASSTHROUGH, route=Route.PASSTHROUGH,
tests/e2e/llm_translation/test_bedrock_native_e2e.py:None
Routetest_invoke_stream_keeps_the_wrapper_when_the_request_body_carries_no_json_tool_schema
pytest.mark.parametrize( ("data", "json_mode"), [ pytest.param("not json", True, id="unparseab
tests/unit/llms/bedrock/chat/test_invoke_handler.py:None
Routetest_invoke_stream_returns_chunks
meta( Subject( domain=Domain.PASSTHROUGH, route=Route.PASSTHROUGH,
tests/e2e/llm_translation/test_bedrock_native_e2e.py:None
Routetest_invoke_uses_opt_in_native_output_is_false_when_native_output_did_not_come_from_the_opt_in
pytest.mark.parametrize( ("model", "model_info", "request_params"), [ ("us.anthropic.claude-op
tests/unit/llms/bedrock/chat/invoke_transformations/test_bedrock_chat_invoke_transformations_anthropic_claude_transformation.py:None
Routetest_is_adaptive_thinking_model_is_sourced_from_cost_map
pytest.mark.parametrize( "model, expected", [ # explicit cost-map entries, across provider rou
tests/unit/llms/anthropic/chat/test_anthropic_chat_transformation.py:None
Routetest_is_anthropic_messages_url
pytest.mark.parametrize( ("url", "expected"), [ pytest.param("https://api.anthropic.com/v1/mes
tests/unit/llms/anthropic/test_anthropic_common_utils.py:None
Routetest_is_api_route_allowed
pytest.mark.parametrize( "route, user_role, expected_result", [ ("/key/generate", "internal_us
tests/unit/proxy/auth/test_user_api_key_auth.py:None
Routetest_is_azure_model_router
pytest.mark.parametrize( "model,expected", [ # Deployment names containing 'model-
tests/unit/llms/azure_ai/test_azure_ai_cost_calculator.py:None
Routetest_is_bad_request_without_fallback_only_stops_on_a_real_400_when_the_flag_is_off
pytest.mark.parametrize( ("exception", "stops_fallbacks"), [ pytest.param( litellm
tests/unit/router_utils/test_fallback_event_handlers.py:None
Routetest_is_bedrock_native_output_rejection_matches_only_the_400s_that_reject_native_output
pytest.mark.parametrize( ("status_code", "error_text", "expected"), [ (400, f'{{"message":"{_F
tests/unit/llms/bedrock/test_bedrock_common_utils.py:None
Routetest_is_collection_route
pytest.mark.parametrize( "url_route, suffix, expected", [ ("https://api.anthropic.com/v1/messa
tests/unit/proxy/pass_through_endpoints/llm_provider_handlers/test_batch_attribution.py:None
← previousnext →3,101–3,200 of 5,595, ranked by callers