MCPcopy Create free account

hub / github.com/BerriAI/litellm / endpoints

Endpoints5,595 in github.com/BerriAI/litellm

Routetest_compression_patch_preserves_omissions_and_explicit_choices
pytest.mark.parametrize( "compression_patch, expected", [ ( {},
tests/unit/proxy/management_endpoints/test_model_management_endpoints.py:None
Routetest_computer_tool_returns_computer_tool_call
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.CHAT_COMPLETIONS,
tests/e2e/llm_translation/test_anthropic_completion_e2e.py:None
Routetest_concurrent_cold_start_builds_routelayer_once
requires_semantic_router
tests/unit/router_strategy/test_complexity_router.py:None
Routetest_concurrent_failure_and_success_callbacks_settle_a_reservation_once_v3
pytest.mark.parametrize("failure_path", ["failure_event", "post_call_failure_hook"])
tests/unit/proxy/hooks/test_parallel_request_limiter_v3.py:None
Routetest_concurrent_success_callbacks_release_parallel_slot_once_when_redis_fails
pytest.mark.parametrize("release_from", ["post_call", "stream_cleanup"])
tests/unit/proxy/hooks/test_parallel_request_limiter_v3.py:None
Routetest_config_deployment_api_key_reaches_only_the_provider
pytest.mark.timeout(240) # full S1/S2 walk: every table and ~400 GET routes as two callers
tests/integration/security/test_config_deployment_key.py:None
Routetest_config_model_without_credentials_uses_the_env_key_and_base
pytest.mark.parametrize( ("target", "call_type"), (("/v1/chat/completions", "acompletion"), ("/v1/resp
tests/integration/providers/test_coralbricks_provider_env_wire.py:None
Routetest_config_order_decides_who_wins_the_shared_breakpoint_budget
pytest.mark.parametrize( "points,instructions,system_marked,marked_messages", [ pytest.param([
tests/unit/responses/test_responses_api_request_body.py:None
Routetest_config_tool_policy_overlap_warns_without_changing_lists
pytest.mark.parametrize( "allowed_entry,denied_entry,expect_warning", [ ("read_sta
tests/unit/proxy/mcp_server/test_mcp_server_manager.py:None
Routetest_config_update_persists_router_setting_to_get
pytest.mark.covers("mgmt.router_settings.update.happy_path")
tests/e2e/management/test_config_misc_endpoints_e2e.py:None
Routetest_config_update_rejects_config_owned_keys_and_accepts_the_same_value
pytest.mark.parametrize( ("section", "store_attr", "yaml_values", "changed_values"), [ ("gener
tests/unit/proxy/proxy_server/test_routes_config.py:None
Routetest_configurable_clientside_parameters
pytest.mark.parametrize( "allowed_param, input_value, should_return_true", [ ("api_base", {"ap
tests/unit/proxy/auth/test_auth_utils.py:None
Routetest_configured_names_outrank_generated_ids_even_when_hidden_from_listing
pytest.mark.parametrize("layer", ["literal", "global", "router", "key", "team", "wildcard"])
tests/unit/proxy/common_utils/test_model_listing_utils.py:None
Routetest_configuring_a_deployment_may_name_a_federated_credential
pytest.mark.parametrize( "route", [ "/model/new", "/model/update", "/model/del
tests/unit/proxy/auth/test_auth_utils.py:None
Routetest_configuring_a_deployment_still_cannot_carry_federation_fields_inline
pytest.mark.parametrize("route", ["/model/new", "/model/f38d7ce5-7966-42f2-bd06-67ea74aeb76b/update"])
tests/unit/proxy/auth/test_auth_utils.py:None
Routetest_connect_error_on_write_reconnects_and_commits
pytest.mark.parametrize( "phase, table_name, reason", [ ("reset_budget_for_litellm_keys", "key
tests/unit/proxy/common_utils/test_reset_budget_job.py:None
Routetest_connection
router.post("/test/connection", dependencies=[Depends(user_api_key_auth)])
litellm/proxy/mcp_server/rest_endpoints.py:None
Routetest_connection_error_retry_forwards_content
pytest.mark.parametrize("method", ["post", "put", "patch", "delete"])
tests/unit/llms/custom_httpx/test_http_handler.py:None
Routetest_connection_error_retry_sends_current_wif_token
pytest.mark.parametrize("method", ["post", "put", "patch", "delete"])
tests/unit/llms/custom_httpx/test_http_handler.py:None
Routetest_constrained_python_rule_still_projects_for_a_later_rust_rule
pytest.mark.parametrize( "constrained", ( RouteRule(Route.MESSAGES, Rollout.PYTHON_ONLY, provi
tests/test_litellm_rust/test_dispatch.py:None
Routetest_construct_database_url_from_env_vars
patch.dict(os.environ, {}, clear=True)
tests/unit/proxy/test_proxy_cli.py:None
Routetest_construct_target_url_versionless_project_route_gets_api_version
pytest.mark.parametrize( ("requested_route", "expected_url"), [ ( "/projects/test-
tests/unit/llms/vertex_ai/test_vertex_ai_common_utils.py:None
Routetest_container_create_full_flow
patch("litellm.llms.custom_httpx.llm_http_handler.HTTPHandler")
tests/unit/containers/test_container_integration.py:None
Routetest_container_delete_full_flow
patch("litellm.llms.custom_httpx.llm_http_handler.HTTPHandler")
tests/unit/containers/test_container_integration.py:None
Routetest_container_file_lifecycle_through_the_gateway
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.CONTAINERS,
tests/e2e/llm_translation/test_containers_e2e.py:None
Routetest_container_list_full_flow
patch("litellm.llms.custom_httpx.llm_http_handler.HTTPHandler")
tests/unit/containers/test_container_integration.py:None
Routetest_container_retrieve_full_flow
patch("litellm.llms.custom_httpx.llm_http_handler.HTTPHandler")
tests/unit/containers/test_container_integration.py:None
Routetest_containers_routes_are_llm_api_routes
pytest.mark.parametrize( "route", [ "/containers", "/v1/containers", "/contain
tests/unit/proxy/auth/test_route_checks.py:None
Routetest_content_filter_blocks_banned_keyword_in_tool_args
meta( Subject( domain=Domain.GUARDRAILS, route=Route.MCP, ) )
tests/e2e/mcp/test_mcp_guardrail_e2e.py:None
Routetest_content_list_handling
pytest.mark.parametrize( "case", _pick( "bedrock_converse_gptoss", "bedrock_invoke_nov
tests/unit/llms/base_llm/chat/test_provider_chat_translation.py:None
Routetest_content_policy_routes_to_fallback
pytest.mark.covers("reliability.fallback.content_policy.routes_to_fallback")
tests/e2e/router/test_reliability_fallbacks_e2e.py:None
Routetest_context_stream_fallback_obeys_all_output_receipts
pytest.mark.parametrize( "wrapped,has_output,generated_content,disqualifying,recoverable", ( (
tests/unit/test_router/test_router_fallbacks.py:None
Routetest_context_window_routes_to_fallback
pytest.mark.covers("reliability.fallback.context_window.routes_to_fallback")
tests/e2e/router/test_reliability_fallbacks_e2e.py:None
Routetest_continuations_resume_on_another_replica_and_reject_changed_operations
pytest.mark.parametrize("changed_target", [False, True])
tests/integration/mcp/test_interactions.py:None
Routetest_continue_on_input_failure_observes_flagged_input_and_response
pytest.mark.parametrize( ("row_id", "scope", "include_scope", "continue_flag", "expected_directions"),
tests/integration/observability/test_logging_only_scope_runtime.py:None
Routetest_continue_on_input_failure_recovers_from_raising_input_scan
pytest.mark.parametrize( ("row_id", "continue_flag", "expected_directions", "expected_statuses"), (
tests/integration/observability/test_logging_only_scope_runtime.py:None
Routetest_control_upstream_success_answers_200_with_the_upstream_body
pytest.mark.parametrize("route", ROUTES, ids=ROUTE_IDS)
tests/integration/providers/test_assistants_route_errors_wire.py:None
Routetest_converse_empty_messages_returns_client_error
pytest.mark.covers("llm.bedrock_native.bedrock_converse.input_validation.nonstream.works")
tests/e2e/llm_translation/test_bedrock_native_e2e.py:None
Routetest_converse_invalid_model_returns_error
pytest.mark.covers("llm.bedrock_native.bedrock_converse.input_validation.nonstream.works")
tests/e2e/llm_translation/test_bedrock_native_e2e.py:None
Routetest_converse_json_schema_stream_sends_claude_prose_only_when_claude_skips_the_json_tool
pytest.mark.parametrize( ("tool_block", "stop_reason", "expected_content", "expected_tools", "expected_fin
tests/unit/llms/bedrock/chat/test_invoke_handler.py:None
Routetest_converse_missing_messages_returns_error
pytest.mark.covers("llm.bedrock_native.bedrock_converse.input_validation.nonstream.works")
tests/e2e/llm_translation/test_bedrock_native_e2e.py:None
Routetest_converse_output_format_returns_schema_json_text
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.MESSAGES,
tests/e2e/llm_translation/test_messages_bedrock_e2e.py:None
Routetest_converse_returns_assistant
meta( Subject( domain=Domain.PASSTHROUGH, route=Route.PASSTHROUGH,
tests/e2e/llm_translation/test_bedrock_native_e2e.py:None
Routetest_converse_stream_ends_on_finish_reason_chunk
pytest.mark.parametrize( "events, expected_finish_reason", [ pytest.param( (
tests/unit/llms/bedrock/chat/test_invoke_handler.py:None
Routetest_converse_stream_returns_chunks
meta( Subject( domain=Domain.PASSTHROUGH, route=Route.PASSTHROUGH,
tests/e2e/llm_translation/test_bedrock_native_e2e.py:None
Routetest_converse_tool_result_of_only_tool_references_is_accepted
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.MESSAGES,
tests/e2e/llm_translation/test_messages_bedrock_e2e.py:None
Routetest_convert_cached_responses_result_parameterized
pytest.mark.parametrize( "call_type, cached_result, expected_type", [ ( CallTypes.
tests/unit/caching/test_caching_handler.py:None
Routetest_convert_response_output_structured_output_keeps_first_message_item
pytest.mark.parametrize( "structured_output, expected_content", [ (True, '{"city":"Paris"}'),
tests/unit/completion_extras/litellm_responses_transformation/test_completion_extras_litellm_responses_transformation_transformation.py:None
Routetest_convert_skill_to_anthropic_tool_builds_the_messages_api_tool
pytest.mark.parametrize( ("skill", "expected"), [ pytest.param( LiteLLM_SkillsTabl
tests/unit/llms/litellm_proxy/skills/test_prompt_injection.py:None
Routetest_convert_to_anthropic_tool_result_with_force_base64
patch("litellm.litellm_core_utils.prompt_templates.factory.convert_url_to_base64")
tests/unit/llms/vertex_ai/vertex_ai_partner_models/anthropic/test_vertex_ai_anthropic_image_url_handling.py:None
Routetest_convert_to_anthropic_tool_result_without_force_base64
patch("litellm.litellm_core_utils.prompt_templates.factory.convert_url_to_base64")
tests/unit/llms/vertex_ai/vertex_ai_partner_models/anthropic/test_vertex_ai_anthropic_image_url_handling.py:None
Routetest_convert_tool_response_to_message_unwraps_only_an_unambiguous_schema_envelope
pytest.mark.parametrize( "schema, tool_input, expected_content", [ pytest.param( _
tests/unit/llms/anthropic/chat/test_anthropic_chat_transformation.py:None
Routetest_convert_tool_response_with_url_image
pytest.mark.parametrize("content_type,nested", [("input_image", True), ("image_url", False), ("input_file", Tr
tests/unit/llms/vertex_ai/gemini/test_vertex_ai_gemini_transformation.py:None
Routetest_cooldown_rate_limit
patch("litellm.router_utils.cooldown_handlers.get_deployment_successes_for_current_minute")
tests/unit/router_utils/test_cooldown_handlers.py:None
Routetest_cooldown_time_comes_from_deployment_then_retry_after_then_router
pytest.mark.parametrize( ("arguments", "params", "failure", "expected_seconds"), [ ({}, {}, fr
tests/unit/test_router/core/test_retries_cooldowns.py:None
Routetest_coordination_failure_labels_unreachable_hosts_named_like_tls_markers
pytest.mark.parametrize( ("database_url", "message", "host"), [ ( "postgresql://u:
tests/unit/litellm_proxy_extras/test_litellm_proxy_extras_utils.py:None
Routetest_cost_calculation_does_not_duplicate_provider_prefix
patch("litellm.completion_cost")
tests/unit/proxy/pass_through_endpoints/llm_provider_handlers/test_anthropic_passthrough_logging_handler.py:None
Routetest_cost_calculation_resolves_unknown_model_from_litellm_params
patch("litellm.completion_cost")
tests/unit/proxy/pass_through_endpoints/llm_provider_handlers/test_anthropic_passthrough_logging_handler.py:None
Routetest_cost_calculation_resolves_unknown_model_from_model_group
patch("litellm.completion_cost")
tests/unit/proxy/pass_through_endpoints/llm_provider_handlers/test_anthropic_passthrough_logging_handler.py:None
Routetest_cost_calculation_skips_unknown_litellm_params_model_for_model_group
patch("litellm.completion_cost")
tests/unit/proxy/pass_through_endpoints/llm_provider_handlers/test_anthropic_passthrough_logging_handler.py:None
Routetest_cost_calculation_with_azure_ai_custom_llm_provider
patch("litellm.completion_cost")
tests/unit/proxy/pass_through_endpoints/llm_provider_handlers/test_anthropic_passthrough_logging_handler.py:None
Routetest_cost_calculation_without_custom_llm_provider
patch("litellm.completion_cost")
tests/unit/proxy/pass_through_endpoints/llm_provider_handlers/test_anthropic_passthrough_logging_handler.py:None
Routetest_cost_header_and_spend_row_match_the_registry_price
pytest.mark.covers("llm.chat_completions.together_ai.basic.nonstream.cost_logged")
tests/e2e/llm_translation/test_together_ai_e2e.py:None
Routetest_cost_per_token_per_second_pricing
pytest.mark.parametrize("custom_llm_provider", ["together_ai", "openai", "anthropic", "bedrock", "azure"])
tests/unit/test_cost_calculator.py:None
Routetest_cost_per_token_resolves_per_second_rate_precedence
pytest.mark.parametrize( ("pricing_fields", "expected_rate"), [ ({"cost_per_second": 0.02}, 0.
tests/unit/test_cost_calculator.py:None
Routetest_count_comes_from_the_provider_and_matches_billed_input
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.COUNT_TOKENS,
tests/e2e/llm_translation/test_count_tokens_source_e2e.py:None
Routetest_count_context_counts_the_integer_enums_inference_sends
pytest.mark.parametrize("ids", (range(3), range(10**12, 10**12 + 200)), ids=("small-enum", "past-enum-budget")
tests/unit/llms/vertex_ai/count_tokens/test_context.py:None
Routetest_count_is_the_kimi_k3_chat_template_render_of_the_bedrock_request
pytest.mark.parametrize( ("messages", "tools", "rendered"), [ pytest.param( [{"rol
tests/unit/llms/bedrock/count_tokens/test_bedrock_kimi_k3.py:None
Routetest_count_keeps_the_provider_400_instead_of_estimating
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.COUNT_TOKENS,
tests/e2e/llm_translation/test_count_tokens_source_e2e.py:None
Routetest_count_logs_one_line_with_the_callers_call_id_model_and_count
pytest.mark.parametrize( "path", ["/v1/responses/input_tokens", "/responses/input_tokens", "/openai/v1
tests/unit/proxy/response_api_endpoints/test_endpoints.py:None
Routetest_count_matches_billed_input_tokens_for_a_model_bedrock_runtime_cannot_count
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.COUNT_TOKENS,
tests/e2e/llm_translation/test_messages_count_tokens_bedrock_e2e.py:None
Routetest_count_names_the_model_info_count_model
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.COUNT_TOKENS,
tests/e2e/llm_translation/test_count_tokens_source_e2e.py:None
Routetest_count_payload_that_is_not_an_object_becomes_an_error_response_naming_the_failed_lookup
pytest.mark.parametrize( "payload", [[*({"input_tokens": position} for position in range(403)), "429"]
tests/unit/llms/azure_ai/anthropic/count_tokens/test_token_counter.py:None
Routetest_count_payload_that_is_not_an_object_becomes_an_error_response_naming_the_failed_lookup
pytest.mark.parametrize( "payload", [[*({"input_tokens": position} for position in range(403)), "429"]
tests/unit/llms/openai/responses/count_tokens/test_token_counter.py:None
Routetest_count_reports_upstream_input_tokens_and_keeps_the_raw_payload
pytest.mark.parametrize( ("payload", "expected_total"), [ ({"input_tokens": 15}, 15),
tests/unit/llms/azure_ai/anthropic/count_tokens/test_token_counter.py:None
Routetest_count_reports_upstream_input_tokens_and_keeps_the_raw_payload
pytest.mark.parametrize( ("payload", "expected_total"), [ ({"input_tokens": 15}, 15),
tests/unit/llms/openai/responses/count_tokens/test_token_counter.py:None
Routetest_count_routes_count_exactly_the_pins_the_pin_cache_holds
pytest.mark.parametrize("route", sorted(_COUNT_ROUTES))
tests/integration/routing/test_prompt_cache_pin_memory_routes.py:None
Routetest_count_tokens_answers_400_for_malformed_tools_without_counting
pytest.mark.parametrize( ("model", "tools"), [ ("claude-sonnet", 5), ("claude-sonnet",
tests/unit/proxy/anthropic_endpoints/test_endpoints.py:None
Routetest_count_tokens_answers_an_anthropic_400_and_keeps_the_connection
pytest.mark.parametrize( "fields", [ {"tools": 5}, {"tools": ""}, {"tools": "x
tests/integration/providers/test_malformed_tools_wire.py:None
Routetest_count_tokens_anthropic
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.COUNT_TOKENS, providers=
tests/e2e/claude_code/count_tokens/test_anthropic.py:None
Routetest_count_tokens_azure
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.COUNT_TOKENS, providers=
tests/e2e/claude_code/count_tokens/test_azure.py:None
Routetest_count_tokens_bedrock_converse
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.COUNT_TOKENS, providers=
tests/e2e/claude_code/count_tokens/test_bedrock_converse.py:None
Routetest_count_tokens_bedrock_invoke
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.COUNT_TOKENS, providers=
tests/e2e/claude_code/count_tokens/test_bedrock_invoke.py:None
Routetest_count_tokens_counts_locally_on_adapter_routes
pytest.mark.parametrize("route_name", _ADAPTER_ROUTES)
tests/integration/providers/test_google_genai_vertex_routes_wire.py:None
Routetest_count_tokens_follows_the_opt_out_of_the_deployment_proxy_settings_send_to
pytest.mark.parametrize("case", get_args(_RoutedCase))
tests/integration/providers/test_vertex_gemini_count_tokens_wire.py:None
Routetest_count_tokens_reads_the_opt_out_of_the_deployment_its_litellm_model_name_routes_to
pytest.mark.parametrize( ("requested", "wildcards", "files_kept"), ( ("dropping", (), (True, T
tests/integration/providers/test_vertex_gemini_count_tokens_wire.py:None
Routetest_count_tokens_rejects_unconvertible_tools_without_request
pytest.mark.parametrize( "tools", ( [{"name": "noop", "input_schema": {"type": "object", "prop
tests/integration/providers/test_vertex_gemini_count_tokens_wire.py:None
Routetest_count_tokens_vertex_ai
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.COUNT_TOKENS, providers=
tests/e2e/claude_code/count_tokens/test_vertex_ai.py:None
Routetest_count_tokens_without_a_count_api_counts_a_non_string_tool_result_text_under_drop_params
pytest.mark.parametrize("model", ("mistral-tool-result", "model-not-in-the-router"))
tests/unit/proxy/test_proxy_token_counter.py:None
Routetest_counter_forwards_context_management_with_the_beta_inference_sends
pytest.mark.parametrize( ("context_management", "forwarded", "sent_beta", "unsent_beta"), ( py
tests/unit/llms/anthropic/test_anthropic_count_tokens_transformation.py:None
Routetest_counter_rejects_input_chat_translation_would_leave_out_without_calling_anthropic
pytest.mark.parametrize( ("messages", "tools"), ( pytest.param( [
tests/unit/llms/anthropic/test_anthropic_count_tokens_transformation.py:None
Routetest_counter_sends_anthropic_shaped_and_messages_api_requests_as_sent
pytest.mark.parametrize( ("messages", "tool", "messages_format"), ( (_ANTHROPIC_TOOL_USE, {"na
tests/unit/llms/anthropic/test_anthropic_count_tokens_transformation.py:None
Routetest_counter_sends_chat_tool_use_in_the_shape_chat_inference_sends
pytest.mark.parametrize( "tool", ( {"type": "function", "name": "get_weather", "description":
tests/unit/llms/anthropic/test_anthropic_count_tokens_transformation.py:None
Routetest_counter_sends_the_tools_chat_inference_makes_from_tool_search_and_namespace
pytest.mark.parametrize( "tools", ( pytest.param([{"type": "tool_search"}], id="tool-search-al
tests/unit/llms/anthropic/test_anthropic_count_tokens_transformation.py:None
Routetest_create_500_when_no_db
patch("litellm.proxy.proxy_server.prisma_client", None)
tests/unit/proxy/management_endpoints/test_workflow_management_endpoints.py:None
Routetest_create__missing_required_param_is_400
pytest.mark.parametrize( "body, missing_param", [ ({"endpoint": "/v1/chat/completions", "compl
tests/unit/proxy/batches_endpoints/test_endpoints.py:None
Routetest_create__raw_file_with_executed_model_is_forwarded_unless_the_server_lacks_a_files_api
pytest.mark.parametrize( "upstream_answer", [httpx.Response(200, json={"object": "list", "data": []}),
tests/unit/proxy/batches_endpoints/test_endpoints.py:None
Routetest_create__registers_ownership_for_creator
pytest.mark.parametrize( "body", [ {"input_file_id": AZURE_FILE_ID}, {"input_file_id":
tests/unit/proxy/batches_endpoints/test_endpoints.py:None
Routetest_create_and_retrieve_routes_match
pytest.mark.parametrize( "route", [ "/v1/responses", "/responses",
tests/unit/test_responses_id_security.py:None
Routetest_create_batch_missing_input_file_id_returns_error
pytest.mark.covers("llm.batches.openai.input_validation.nonstream.works")
tests/e2e/llm_translation/test_files_batches_contract_e2e.py:None
← previousnext →2,201–2,300 of 5,595, ranked by callers