MCPcopy Create free account

hub / github.com/BerriAI/litellm / endpoints

Endpoints5,595 in github.com/BerriAI/litellm

Routetest_is_complexity_router_model
pytest.mark.parametrize( "model,expected", [ ("auto_router/complexity_router", True),
tests/unit/router_strategy/test_auto_router_model_naming.py:None
Routetest_is_deepgram_listen_route
pytest.mark.parametrize( ("url_route", "expected"), [ ("/deepgram/v1/listen", True), (
tests/unit/proxy/pass_through_endpoints/llm_provider_handlers/test_deepgram_listen_passthrough_logging_handler.py:None
Routetest_is_litellm_executed_batch_reads_the_llm_batch_id_prefix
pytest.mark.parametrize( "decoded_unified_batch_id, executed", [ ("litellm_proxy;model_id:my-v
tests/unit/proxy/openai_files_endpoint/test_files_common_utils.py:None
Routetest_is_llm_api_route
pytest.mark.parametrize( "route,expected", [ # Test exact matches ("/chat/completions"
tests/unit/proxy/auth/test_proxy_routes.py:None
Routetest_is_llm_api_route_similar_but_false
pytest.mark.parametrize( "route", [ "/v1/threads/thread_id/invalid", "/threads/thread_
tests/unit/proxy/auth/test_proxy_routes.py:None
Routetest_is_lock_timeout_error_recognises_a_statement_cancelled_under_lock_timeout
pytest.mark.parametrize( "error", [ _lock_timeout_error(), _lock_timeout_error(message
tests/unit/proxy/db/test_exception_handler.py:None
Routetest_is_managed_cloud_storage_uri_sees_through_percent_encoding
pytest.mark.parametrize( "file_id", ( "gs%3A%2F%2Fbucket%2Flitellm-vertex-files%2Fprediction-m
tests/unit/litellm_core_utils/test_cloud_storage_security.py:None
Routetest_is_mcp_discovery_request
pytest.mark.parametrize( "route,request_body,expected", [ ("/mcp-rest/tools/list", {}, True),
tests/unit/proxy/auth/test_auth_checks.py:None
Routetest_is_non_conversational_request_skips_only_embeddings_requests
pytest.mark.parametrize( ("call_type", "endpoint", "expected"), [ ("aembedding", None, True),
tests/unit/proxy/guardrails/test_content_utils.py:None
Routetest_is_null_finds_the_budget_left_uncapped
pytest.mark.covers("mgmt.budget.list_v1.happy_path")
tests/e2e/management/test_budget_customer_user_org_e2e.py:None
Routetest_is_port_in_use
patch("socket.socket")
tests/unit/proxy/test_proxy_cli.py:None
Routetest_is_pre_routing_rejection_is_decided_by_pipeline_stage_not_exception_type
pytest.mark.parametrize( ("exception", "request_data", "expected"), [ (_INVALID_REQUEST_400, _
tests/unit/proxy/hooks/test_proxy_track_cost_callback.py:None
Routetest_is_read_only_transaction_error_matches_sqlstate_25006
pytest.mark.parametrize( "error", [ DataError(data={"user_facing_error": {"message": READ_ONLY
tests/unit/proxy/db/test_exception_handler.py:None
Routetest_is_refused_for_a_non_admin_key
pytest.mark.covers("mgmt.budget.list_v1.admin_only")
tests/e2e/management/test_budget_customer_user_org_e2e.py:None
Routetest_is_response_lookup_not_found
pytest.mark.parametrize( ("status_code", "call_type", "expected"), [ (404, "aget_responses", T
tests/unit/router_utils/test_cooldown_handlers.py:None
Routetest_is_strategy_router_deployment
pytest.mark.parametrize( "model, expected", [ ("auto_router/router_1", True), ("auto_r
tests/unit/proxy/test_health_check_max_tokens.py:None
Routetest_is_unmanaged_gcs_batch_input_file_id
pytest.mark.parametrize( "input_file_id, expected", [ (INPUT_FILE, True), (None, False
tests/unit/llms/vertex_ai/batches/test_transformation.py:None
Routetest_is_user_proxy_admin
pytest.mark.parametrize( "user_obj, expected_result", [ (None, False), # Case 1: user_obj is
tests/unit/proxy/auth/test_user_api_key_auth.py:None
Routetest_item_mark_reaches_each_route_the_way_a_chat_message_mark_does
pytest.mark.parametrize( ("route", "shape", "keeps"), ( pytest.param("dashscope/qwen-plus", "s
tests/integration/providers/test_responses_bridge_message_cache_control_wire.py:None
Routetest_item_marks_reach_a_target_whose_chat_route_keeps_them
pytest.mark.parametrize( ("model", "custom_llm_provider"), [ ("databricks/databricks-claude-so
tests/unit/responses/litellm_completion_transformation/test_litellm_completion_responses.py:None
Routetest_item_marks_stay_off_a_target_without_cache_points
pytest.mark.parametrize( ("model", "custom_llm_provider"), [ ("gemini/gemini-2.5-flash", "gemi
tests/unit/responses/litellm_completion_transformation/test_litellm_completion_responses.py:None
Routetest_items_without_client_text_are_not_screened
pytest.mark.parametrize( "client_event", [ pytest.param( _item_create({"type": "me
tests/unit/litellm_core_utils/test_realtime_guardrails.py:None
Routetest_jev_budget_uses_effective_headers_and_every_deployment
pytest.mark.parametrize( ("mode", "default_header", "explicit_cap", "other_member", "expected_status"),
tests/unit/router_strategy/complexity_router/test_jev_classifier.py:None
Routetest_jev_dashboard_save_preserves_server_transport
pytest.mark.parametrize("endpoint", ["patch", "legacy"])
tests/unit/proxy/management_endpoints/test_model_management_endpoints.py:None
Routetest_jev_invalid_usage_never_reaches_spend_callbacks
pytest.mark.parametrize("field", ["input_tokens", "output_tokens"])
tests/unit/router_strategy/complexity_router/test_jev_classifier.py:None
Routetest_jev_test_routing_authorizes_paid_evaluation_before_contacting_typesafe
pytest.mark.parametrize("denial", ["key", "team", "budget", None])
tests/unit/proxy/management_endpoints/test_auto_router_endpoints.py:None
Routetest_jev_test_routing_enforces_key_budget_before_provider_invocation
pytest.mark.parametrize( "max_budget, spend, denied", ( pytest.param(0.0, 0.0, True, id="zero-
tests/unit/proxy/management_endpoints/test_auto_router_endpoints.py:None
Routetest_jev_test_routing_hard_blocks_exhausted_throttle_enabled_keys
pytest.mark.parametrize( "max_budget, spend, denied", ((0.0, 0.0, True), (1.0, 2.0, True), (1.0, 0.5,
tests/unit/proxy/management_endpoints/test_auto_router_endpoints.py:None
Routetest_jina_ai_img_embeddings_transforms_mixed_text_and_image_inputs
pytest.mark.parametrize( ("input_data", "expected_payload_input"), [ (["hello world", "foo bar
tests/unit/llms/jina_ai/embedding/test_jina_embedding_transformation.py:None
Routetest_job_scoped_operations_are_open_to_virtual_keys
pytest.mark.parametrize("operation", ["StartTranscriptionJob", "GetTranscriptionJob", "DeleteTranscriptionJob"
tests/unit/proxy/pass_through_endpoints/llm_provider_handlers/test_transcribe_passthrough_logging_handler.py:None
Routetest_jobs_started_by_others_are_not_reachable
pytest.mark.parametrize("operation", ["GetTranscriptionJob", "DeleteTranscriptionJob"])
tests/unit/proxy/pass_through_endpoints/test_llm_pass_through_endpoints.py:None
Routetest_join_api_base_always_appends_the_route_after_exactly_one_slash
pytest.mark.parametrize( ("api_base", "route", "expected"), [ ("https://gw.test/p/", "v1/messa
tests/unit/litellm_core_utils/test_url_utils.py:None
Routetest_join_paths_happy_path
pytest.mark.parametrize( "base, route, expected", [ ("https://proxy.example.com", "/v1/chat",
tests/unit/proxy/utils/helpers/test_url_helpers.py:None
Routetest_json_contains_answers_what_the_in_operator_answers
pytest.mark.parametrize( "value", [{"error": 1}, {"data": 1}, ["error"], "an error", "", _IterOnly(),
tests/unit/litellm_core_utils/test_core_helpers.py:None
Routetest_json_response_format
pytest.mark.parametrize( "case", _pick( "anthropic_sonnet45", "azure_o3mini",
tests/unit/llms/base_llm/chat/test_provider_chat_translation.py:None
Routetest_json_response_format_stream
pytest.mark.parametrize( "case", _pick( "anthropic_sonnet45", "azure_o3mini",
tests/unit/llms/base_llm/chat/test_provider_chat_translation.py:None
Routetest_json_response_nested_json_schema
pytest.mark.parametrize( "case", _pick( "anthropic_sonnet45", "azure_o3mini",
tests/unit/llms/base_llm/chat/test_provider_chat_translation.py:None
Routetest_json_response_nested_pydantic_obj
pytest.mark.parametrize( "case", _pick( "anthropic_sonnet45", "azure_o3mini",
tests/unit/llms/base_llm/chat/test_provider_chat_translation.py:None
Routetest_json_response_pydantic_obj
pytest.mark.parametrize( "case", _pick( "anthropic_sonnet45", "azure_o3mini",
tests/unit/llms/base_llm/chat/test_provider_chat_translation.py:None
Routetest_json_schema_batch_record_with_thinking_uploads_native_output_only_on_models_that_always_take_it
pytest.mark.parametrize( ("backend", "native_output"), [ ("us.anthropic.claude-sonnet-5-5", Fa
tests/integration/providers/test_bedrock_batch_files_wire.py:None
Routetest_json_schema_without_thinking_on_a_model_that_cannot_force_the_json_tool_gets_native_output
pytest.mark.parametrize("route", ["converse", "invoke"])
tests/integration/providers/test_bedrock_native_structured_output_wire.py:None
Routetest_json_tool_is_forced_only_when_the_model_will_not_think
pytest.mark.parametrize( ("model", "native_key", "model_info", "thinking_params", "forced"), [
tests/unit/llms/bedrock/chat/test_converse_transformation.py:None
Routetest_judge_call_falls_back_to_sdk_when_model_not_in_router
patch("litellm.proxy.guardrails.guardrail_hooks.llm_as_a_judge.litellm.acompletion", new_callable=AsyncMock)
tests/unit/proxy/guardrails/test_llm_as_a_judge.py:None
Routetest_judge_call_uses_sdk_when_no_router
patch("litellm.proxy.guardrails.guardrail_hooks.llm_as_a_judge.litellm.acompletion", new_callable=AsyncMock)
tests/unit/proxy/guardrails/test_llm_as_a_judge.py:None
Routetest_judge_resolves_router_lazily_per_call
patch("litellm.proxy.guardrails.guardrail_hooks.llm_as_a_judge.litellm.acompletion", new_callable=AsyncMock)
tests/unit/proxy/guardrails/test_llm_as_a_judge.py:None
Routetest_judge_routes_through_router_for_router_served_model
pytest.mark.parametrize( "model_list, router_kwargs, judge_model", [ ( [
tests/unit/proxy/guardrails/test_llm_as_a_judge.py:None
Routetest_jwt_auth_rejects_deactivated_user
pytest.mark.parametrize( "route", ["/mcp-rest/tools/list", "/mcp-rest/tools/call", "/v1/chat/completio
tests/unit/proxy/auth/test_user_api_key_auth_request_flow.py:None
Routetest_jwt_bearer_grant_refusals_keep_their_oauth_error_and_status
pytest.mark.parametrize( "error, status", [ ("invalid_client", 401), ("invalid_grant",
tests/unit/proxy/mcp_server/test_gateway_dcr_flow.py:None
Routetest_jwt_path_skips_user_model_budget_only_for_zero_spend_mcp_methods
pytest.mark.parametrize( "request_data, expect_user_model_budget_check", [ ({"jsonrpc": "2.0",
tests/unit/proxy/auth/test_user_api_key_auth.py:None
Routetest_jwt_refresh_allows_other_coroutines_to_run_before_it_finishes
pytest.mark.parametrize("input_type", ("request", "response"))
tests/unit/proxy/guardrails/guardrail_hooks/test_hiddenlayer.py:None
Routetest_jwt_refresh_exception_propagates_without_replacing_the_token
pytest.mark.parametrize("input_type", ("request", "response"))
tests/unit/proxy/guardrails/guardrail_hooks/test_hiddenlayer.py:None
Routetest_jwt_shaped_traffic_matches_team_and_user_jobs_but_no_key_job
pytest.mark.parametrize( "target,sampled", [ (("team", "team-eng"), True),
tests/unit/integrations/test_shadow_eval_logger.py:None
Routetest_jwt_team_claim_with_a_non_string_entry_still_resolves_the_string_team
pytest.mark.parametrize("route", ("/v1/chat/completions", "/v1/rag/query"))
tests/integration/authorization/test_rag_team_provider_credentials.py:None
Routetest_jwt_team_member_keeps_its_llm_routes
pytest.mark.parametrize("route", ("/v1/chat/completions", "/v1/messages", "/v1/responses"))
tests/integration/authorization/test_rag_team_provider_credentials.py:None
Routetest_jwt_team_member_reaches_its_llm_routes_through_the_sdks
pytest.mark.parametrize("route", ("/v1/chat/completions", "/v1/messages", "/v1/responses"))
tests/integration/authorization/test_rag_team_provider_credentials.py:None
Routetest_jwt_team_routes_grant_pass_through_only_for_explicit_paths
pytest.mark.parametrize( "route, team_allowed_routes, expected", [ ("/model-host/v1/extractor/
tests/unit/proxy/auth/test_route_checks.py:None
Routetest_jwt_team_routes_keep_litellm_models_off_native_routes_unless_v1_responses_is_allowed
pytest.mark.parametrize( ("team_allowed_routes", "through_litellm"), [ pytest.param(["/backend
tests/unit/proxy/pass_through_endpoints/test_codex_passthrough_endpoints.py:None
Routetest_jwt_user_model_budget_is_enforced_before_the_jwt_path_returns
pytest.mark.parametrize( "over_budget,expect_refusal", [(True, True), (False, False)], ids=["over_
tests/unit/proxy/auth/test_user_api_key_auth.py:None
Routetest_keepalive_timeout_flag
patch("uvicorn.run")
tests/unit/proxy/test_proxy_cli.py:None
Routetest_keeps_defaults_for_reusable_subagents
pytest.mark.parametrize( "messages,system,tools", [ ( MESSAGES,
tests/unit/integrations/test_anthropic_cache_control_hook.py:None
Routetest_keeps_deployments_whose_limit_admits_the_batch
pytest.mark.parametrize( ("input_value", "limit"), [ ("hello", 1), (["
tests/unit/router_utils/test_embedding_batch_size_check.py:None
Routetest_keeps_the_owner_only_mode_the_file_was_created_with
pytest.mark.skipif(os.geteuid() == 0, reason="root ignores file permissions")
tests/unit/litellm_core_utils/test_private_json.py:None
Routetest_key_attached_content_filter_blocks_banned_image_edit_prompt
meta( Subject( domain=Domain.GUARDRAILS, route=Route.IMAGES, provi
tests/e2e/guardrails/test_key_guardrail_image_edit_e2e.py:None
Routetest_key_block_unblock_authz_matrix
pytest.mark.parametrize("route", ["block", "unblock"])
tests/integration/management/test_key_block_unblock.py:None
Routetest_key_block_unblock_missing_key_returns_404
pytest.mark.parametrize("route", ["block", "unblock"])
tests/integration/management/test_key_block_unblock.py:None
Routetest_key_budget_at_boundary_blocks_provider_then_explicit_reset_restores
pytest.mark.covers("quota_management.budget.key.boundary_blocks_before_provider_and_reset_restores")
tests/integration/spend/test_cache_and_quota.py:None
Routetest_key_budget_reset_at_advances_after_window
pytest.mark.covers("quota_management.budget.key.resets_after_window")
tests/e2e/quota_management/budgets/test_budget_reset_advances_e2e.py:None
Routetest_key_delete_authz_matrix
pytest.mark.parametrize( "actor,target_shape,expected_status", [(a, t, s) for (_id, a, t, s) in _SCENA
tests/integration/management/test_key_delete.py:None
Routetest_key_delete_by_alias_writes_audit_row
pytest.mark.covers("mgmt.key.delete.audit_logged")
tests/e2e/management/test_management_e2e.py:None
Routetest_key_delete_by_key_writes_audit_row
pytest.mark.covers("mgmt.key.delete.audit_logged")
tests/e2e/management/test_management_e2e.py:None
Routetest_key_entry_without_a_spend_cap_does_not_lift_the_team_cap
pytest.mark.parametrize( "key_entry", [ {"time_period": "1d", "tpm_limit": 100}, {"tim
tests/unit/proxy/hooks/test_unit_test_max_model_budget_limiter.py:None
Routetest_key_generate_failure_stamps_server_span
pytest.mark.parametrize( "exception, expected_status", [ (make_fastapi_http_exception(400, "ne
tests/unit/integrations/open_telemetry/test_otel_admin_endpoints.py:None
Routetest_key_granted_a_toolset_lists_exactly_its_tools
meta( Subject( domain=Domain.MCP, route=Route.MCP, ) )
tests/e2e/mcp/test_mcp_toolset_enforcement_e2e.py:None
Routetest_key_info_authz_matrix
pytest.mark.parametrize( "actor,target_actor,expected_status", [(a, t, s) for (_id, a, t, s) in _SCENA
tests/integration/management/test_key_info.py:None
Routetest_key_list_sorts_across_pages_with_nulls_last
pytest.mark.parametrize( "field", ("expires", "last_active", "budget_reset_at", "total_spend", "tpm_limit"
tests/integration/management/test_key_list.py:None
Routetest_key_logging_entries_compare_excluded_services_by_parsed_value
pytest.mark.parametrize( ("stored", "incoming", "conflicts"), [ ("redis,postgres", "postgres,r
tests/unit/proxy/common_utils/test_callback_config_validation.py:None
Routetest_key_missing_from_the_key_tables_is_reported_with_the_one_user_its_daily_spend_names
pytest.mark.parametrize("route", ROUTES, ids=lambda route: route.path.strip("/").replace("/", "_"))
tests/integration/spend/test_daily_activity_key_owner.py:None
Routetest_key_model_rpm_override_keeps_team_model_tpm_limit
pytest.mark.parametrize( "key_limits, override_key_gets_through", [ ({"model_rpm_limit": {"tes
tests/unit/proxy/hooks/test_parallel_request_limiter_v3.py:None
Routetest_key_model_rpm_override_takes_precedence_over_team_model_rpm_limit
pytest.mark.parametrize( "key_limits", [ {"metadata": {"model_rpm_limit": {"test-model": 3}}},
tests/unit/proxy/hooks/test_parallel_request_limiter_v3.py:None
Routetest_key_regenerate_authz_matrix
pytest.mark.parametrize( "actor,target_shape,expected_status", [(a, t, s) for (_id, a, t, s) in _SCENA
tests/integration/management/test_key_regenerate.py:None
Routetest_key_regenerate_lets_project_team_member_move_own_key_into_project
pytest.mark.parametrize(("route", "role"), [("path", "user"), ("body", "admin")])
tests/integration/management/test_project_lifecycle.py:None
Routetest_key_regenerate_rejects_outsider_moving_own_key_into_foreign_team_project
pytest.mark.parametrize("route", ["path", "body"])
tests/integration/management/test_project_lifecycle.py:None
Routetest_key_regenerate_rejects_team_admin_moving_team_key_into_foreign_team_project
pytest.mark.parametrize("route", ["path", "body"])
tests/integration/management/test_project_lifecycle.py:None
Routetest_key_scoped_to_one_model_cannot_call_another_through_bedrock_passthrough_routes
pytest.mark.covers("authz.key_models.bedrock_passthrough_route_model_is_enforced")
tests/integration/authorization/test_bedrock_passthrough_model_access.py:None
Routetest_key_service_account_generate_authz_matrix
pytest.mark.parametrize( "actor,team_target,expected_status", [(a, t, s) for (_id, a, t, s) in _SCENAR
tests/integration/management/test_key_service_account_generate.py:None
Routetest_key_spend_blocks_at_cap
pytest.mark.covers("quota_management.budget.key.blocks_over_limit")
tests/e2e/quota_management/budgets/test_budget_reset_advances_e2e.py:None
Routetest_key_update_authz_matrix
pytest.mark.parametrize( "actor,target_shape,expected_status", [(a, t, s) for (_id, a, t, s) in _SCENA
tests/integration/management/test_key_update.py:None
Routetest_key_update_denied_does_not_touch_budget_counters
pytest.mark.parametrize( "actor,target_shape,expected_status", [(a, t, s) for (_id, a, t, s) in _DENIE
tests/integration/management/test_key_update.py:None
Routetest_key_update_writes_allowed_routes_only_when_they_change
pytest.mark.parametrize( ("incoming", "written"), [ (["llm_api_routes", "/key/spend/report"],
tests/unit/proxy/management_endpoints/test_key_management_endpoints.py:None
Routetest_key_with_budget_duration_schedules_reset_at_creation
meta( Subject( domain=Domain.SPEND_BUDGETS, route=Route.KEY_MANAGEMENT, ) )
tests/e2e/quota_management/budgets/test_budget_reset_advances_e2e.py:None
Routetest_keys_command_calls_the_server_stored_on_the_cli_context
pytest.mark.parametrize( ("args", "method", "path", "sent_body", "payload"), [ ( [
tests/unit/proxy/client/cli/test_keys_commands.py:None
Routetest_keys_command_without_cli_context_values_fails_before_any_request
pytest.mark.parametrize( "args", [ ["list"], ["generate", "--key-alias", "ci"],
tests/unit/proxy/client/cli/test_keys_commands.py:None
Routetest_kms_is_only_granted_through_the_routes_storage_service
pytest.mark.parametrize(("route", "via_service"), sorted(_KMS_VIA_SERVICE_BY_ROUTE.items()))
tests/unit/llms/bedrock/test_web_identity_session_policy.py:None
Routetest_kwargs_funnel_and_its_importers_load_first_in_fresh_process
pytest.mark.parametrize( "module", ["litellm.litellm_core_utils.get_litellm_params", "litellm.batches.
tests/unit/test_lazy_imports.py:None
Routetest_lands_owner_only_and_a_refused_stage_leaves_the_previous_file_untouched
pytest.mark.skipif(os.geteuid() == 0, reason="root ignores file permissions")
tests/unit/litellm_core_utils/test_private_json.py:None
Routetest_langfuse_client_count_decrements_on_eviction
patch("litellm.initialized_langfuse_clients", 5)
tests/unit/litellm_core_utils/specialty_caches/test_dynamic_logging_cache.py:None
Routetest_langfuse_trace_and_session_prefer_caller_metadata_over_w3c_headers
pytest.mark.parametrize( ("endpoint", "kind", "metadata_mode", "expected_trace", "expected_session", "expe
tests/integration/observability/test_langfuse_delivery.py:None
Routetest_langsmith_init_skips_periodic_flush_without_running_loop
patch.object(LangsmithLogger, "_start_periodic_flush_task", return_value=None)
tests/unit/integrations/test_langsmith_init.py:None
Routetest_langsmith_sampling_rate_decimal_env_var_ignored
patch.dict(os.environ, {"LANGSMITH_SAMPLING_RATE": "0.8"}, clear=False)
tests/unit/integrations/test_langsmith_init.py:None
Routetest_langsmith_sampling_rate_default_value
patch.dict(os.environ, {}, clear=True)
tests/unit/integrations/test_langsmith_init.py:None
← previousnext →3,201–3,300 of 5,595, ranked by callers