MCPcopy Create free account

hub / github.com/BerriAI/litellm / endpoints

Endpoints5,595 in github.com/BerriAI/litellm

Routetest_refused_opening_is_replayed_on_the_bedrock_fallback
pytest.mark.parametrize("after", ["system_prompt", "user_input"], ids=["session-update-first", "text-first"])
tests/integration/providers/test_bedrock_nova_sonic_realtime_tool_calls.py:None
Routetest_refused_upstream_answers_a_connection_error
pytest.mark.parametrize("route", ROUTES, ids=ROUTE_IDS)
tests/integration/providers/test_assistants_route_errors_wire.py:None
Routetest_refuses_a_sort_field_and_a_parameter_it_does_not_support
pytest.mark.covers("mgmt.budget.list_v1.happy_path")
tests/e2e/management/test_budget_customer_user_org_e2e.py:None
Routetest_refuses_to_map_non_identity_fields
pytest.mark.parametrize( "privileged_field", [ # The GHSA-5c3m-qffq-4r9m primary privesc field
tests/unit/proxy/auth/test_oauth2_proxy_hook.py:None
Routetest_regenerate_rotates_to_a_working_new_key
meta( Subject( domain=Domain.MANAGEMENT, route=Route.KEY_MANAGEMENT,
tests/e2e/management/test_management_e2e.py:None
Routetest_regenerate_with_grace_period_keeps_old_key_until_revoked
meta( Subject( domain=Domain.MANAGEMENT, route=Route.KEY_MANAGEMENT,
tests/e2e/management/test_management_e2e.py:None
Routetest_register_model_keeps_custom_flat_prices_over_inherited_rate_variants
pytest.mark.parametrize( ("builtin_prices", "custom_prices", "usage", "expected_cost"), [ pyte
tests/unit/test_register_model_custom_pricing.py:None
Routetest_register_model_leaves_no_shadow_key_when_the_lookup_trips_once
pytest.mark.parametrize("route", ["", "converse/", "invoke/"])
tests/unit/test_register_model_custom_pricing.py:None
Routetest_register_model_over_a_builtin_row_bills_explicit_cache_hits
pytest.mark.parametrize( "registered_prices, billed_cache_read_rate", [ pytest.param({"input_c
tests/unit/test_utils.py:None
Routetest_register_persists
meta( Subject( domain=Domain.AGENTS_API, route=Route.A2A, ) )
tests/e2e/a2a/test_a2a_agent_e2e.py:None
Routetest_register_submits_pending_server
meta(Subject(domain=Domain.MCP, route=Route.MCP))
tests/e2e/management/test_config_misc_endpoints_e2e.py:None
Routetest_registered_inference_routes_have_an_explicit_managed_access_decision
pytest.mark.parametrize( "route", tuple( dict.fromkeys( LiteLLMRoutes.openai_route
tests/unit/proxy/agent_endpoints/auth/test_managed_authorization.py:None
Routetest_registered_speech_prices_distinguish_unset_from_zero
pytest.mark.parametrize( ("pricing", "expected_cost"), ( pytest.param({}, None, id="missing"),
tests/unit/test_cost_calculator.py:None
Routetest_registry_resolves_alias_targets
pytest.mark.parametrize(("alias", "target"), [("plain", "g"), ("visible", "g"), ("hidden", "g"), ("g", None)])
tests/unit/test_router/core/test_selection.py:None
Routetest_regression_db_agent_api_key_is_bearer_on_each_a2a_hop
pytest.mark.parametrize( ("method", "observed_method"), (("SendMessage", "GET"), ("SendMessage", "POST
tests/integration/compatibility/test_a2a_wire_versions.py:None
Routetest_regression_proxy_ollama_embedding_sends_deployment_credentials
pytest.mark.parametrize( ("route", "batched"), (("/v1/embeddings", False), ("/embeddings", True)), ids=("v
tests/integration/providers/test_ollama_embedding_wire.py:None
Routetest_regular_anthropic_tool_message_uses_url
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_regular_anthropic_uses_url_type_for_https
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_regular_models_still_strip_normally
pytest.mark.parametrize( "input_model,expected_model", [ ("openrouter/anthropic/cl
tests/unit/llms/openrouter/test_openrouter_provider_routing.py:None
Routetest_rejected_agent_call_is_logged_once_as_the_caller_without_dispatch
pytest.mark.parametrize(("registered", "status", "body", "target", "model"), _EXPECTED_REJECTIONS)
tests/unit/proxy/agent_endpoints/test_a2a_endpoints.py:None
Routetest_rejected_agent_call_response_survives_a_failing_failure_hook
pytest.mark.parametrize(("registered", "status", "body", "target", "model"), _EXPECTED_REJECTIONS)
tests/unit/proxy/agent_endpoints/test_a2a_endpoints.py:None
Routetest_rejects_a_missing_or_conflicting_identifier
pytest.mark.parametrize( "operation", [pytest.param(get, id="get"), pytest.param(delete, id="d
tests/unit/interactions/test_agents_main_and_utils.py:None
Routetest_rejects_incoherent_configuration
pytest.mark.parametrize( "patch,error_match", [ ({"classifier_llm_config": None},
tests/unit/router_strategy/test_complexity_router.py:None
Routetest_rejects_inputs_above_limit
pytest.mark.parametrize( ("input_value", "limit", "message_match"), [ (["a", "b", "c", "d"], 3
tests/unit/router_utils/test_embedding_batch_size_check.py:None
Routetest_rejects_invalid_or_inconsistent_verdicts
pytest.mark.parametrize( "payload,error_match", [ ( {
tests/unit/router_strategy/test_complexity_router.py:None
Routetest_rejects_modes_the_plugin_does_not_implement
pytest.mark.parametrize("mode", ["during_call", "post_call", "logging_only"])
tests/unit/proxy/guardrails/guardrail_hooks/test_conduct.py:None
Routetest_rejects_private_or_metadata_targets
pytest.mark.parametrize( "blocked_url", [ "http://169.254.169.254/latest/meta-data
tests/unit/proxy/auth/test_auth_utils.py:None
Routetest_remote_url_images_are_never_forwarded
pytest.mark.parametrize( "part", [ {"type": "image_url", "image_url": {"url": "htt
tests/unit/router_strategy/test_complexity_router.py:None
Routetest_removing_ptu_managed_pricing_is_rejected
pytest.mark.parametrize("field,activating", [ ("input_cost_per_token", False), ("cache_read_input_toke
tests/unit/proxy/management_endpoints/test_ptu_model_settings.py:None
Routetest_rename_rewrites_key_team_org_project_and_user_allowlists_and_evicts_their_caches
pytest.mark.parametrize("endpoint", ["patch", "legacy"])
tests/unit/proxy/management_endpoints/test_model_management_endpoints.py:None
Routetest_renamed_model_is_reachable_by_its_new_name_through_every_allowlist_that_named_it
pytest.mark.parametrize("rename_style", ("patch", "legacy_post"))
tests/integration/management/test_model_rename_propagation.py:None
Routetest_repeated_count_tokens_on_budgeted_key_does_not_reserve_budget_or_block_later_completion
pytest.mark.covers("quota_management.budget.key.count_tokens_reserves_nothing_so_completion_within_budget_succ
tests/integration/spend/test_cache_and_quota.py:None
Routetest_repeated_failing_request_answers_the_same_each_time
pytest.mark.parametrize("route", ROUTES, ids=ROUTE_IDS)
tests/integration/providers/test_assistants_route_errors_wire.py:None
Routetest_repeated_gemini_passthrough_calls_stay_served_while_key_spend_is_below_max_budget
pytest.mark.covers("spend.budget_reservation.gemini_passthrough_success_releases_reservation_from_spend_counte
tests/integration/spend/test_passthrough_budget_reservation.py:None
Routetest_repeated_token_counting_never_touches_a_tiny_budget
pytest.mark.parametrize(("route", "request_body"), COUNT_TOKENS_REQUESTS)
tests/unit/proxy/spend_tracking/test_budget_reservation.py:None
Routetest_replayed_reasoning_content_reaches_together
pytest.mark.covers("llm.chat_completions.together_ai.thinking.nonstream.replayed_reasoning_forwarded")
tests/e2e/llm_translation/test_together_ai_e2e.py:None
Routetest_replicas_starting_a_window_moments_apart_keep_each_others_spend
pytest.mark.parametrize("budget_model", ["claude-opus*", "claude-opus-4-8"])
tests/unit/proxy/hooks/test_model_max_budget_limiter.py:None
Routetest_request_body_truncation_logs_info_message
patch("litellm.proxy.spend_tracking.spend_tracking_utils.should_store_prompts_and_responses_in_spend_logs")
tests/unit/proxy/spend_tracking/test_spend_tracking_utils.py:None
Routetest_request_copy_failure_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_request_credential_reaches_only_the_provider
pytest.mark.parametrize(("rig", "slot_id", "route"), CASES, indirect=["rig"], scope="module")
tests/integration/security/test_request_path_slots.py:None
Routetest_request_default_fallbacks_and_retry_policy_reach_the_deployment_as_given
pytest.mark.parametrize( ("endpoint", "request_body"), [ ("acompletion", {"messages": MESSAGES
tests/unit/test_router/core/test_gaps_request_overrides.py:None
Routetest_request_detectors
pytest.mark.parametrize( ("detector", "kwargs", "expected"), ( (detectors.mock_response, {"moc
tests/unit/rust_bridge/test_detectors.py:None
Routetest_request_error_maps_to_auth_error
patch(f"{AUTH_MODULE}._get_http_client")
tests/unit/llms/gigachat/test_authenticator.py:None
Routetest_request_fallback_entries_at_the_limit_are_accepted
pytest.mark.parametrize( "entries", [ [{"gpt-4o": ["target-%d" % i for i in range(
tests/unit/proxy/test_litellm_pre_call_utils.py:None
Routetest_request_fallback_entries_over_the_limit_get_a_400
pytest.mark.parametrize( "entries", [ [{"gpt-4o": ["target-%d" % i for i in range(
tests/unit/proxy/test_litellm_pre_call_utils.py:None
Routetest_request_messages_not_resolved_for_unmapped_surfaces
pytest.mark.parametrize( "request_data", [ {"input": ["ssn 123-45-6789"], "litellm_metadata":
tests/unit/proxy/guardrails/guardrail_hooks/test_straiker.py:None
Routetest_request_messages_resolved_for_mapped_surfaces
pytest.mark.parametrize( ("request_data", "expected"), [ ( {"messages": [{"role":
tests/unit/proxy/guardrails/guardrail_hooks/test_straiker.py:None
Routetest_request_messages_without_a_body_key_count_as_empty_chunks
pytest.mark.parametrize( ("client_messages", "body_the_app_gets"), [ pytest.param(
tests/unit/proxy/middleware/test_request_body_decompression_middleware.py:None
Routetest_request_model_does_not_double_the_router_entry
pytest.mark.parametrize("router_entry_name", ["model_router", "model-router"])
tests/unit/llms/azure_ai/test_azure_ai_cost_calculator.py:None
Routetest_request_naming_an_unknown_guardrail_fails_closed
pytest.mark.covers( "guardrail.dispatch.pre_call.rejects_unknown_name", exercised_on=["chat_completion
tests/e2e/guardrails/test_guardrail_dispatch_e2e.py:None
Routetest_request_rejected_by_the_proxy_records_the_endpoint_call_type
pytest.mark.parametrize( ("request_data", "route", "endpoint_call_type", "dispatched_call_type"),
tests/unit/proxy/test_proxy_utils_model_creation_and_error_logging.py:None
Routetest_request_scan_sends_only_the_last_user_turn
pytest.mark.parametrize( ("inputs", "expected_content"), [ ( { "te
tests/unit/proxy/guardrails/guardrail_hooks/zscaler_ai_guard/test_zscaler_ai_guard.py:None
Routetest_request_size_limit_middleware_rejects_content_length_before_body_read
pytest.mark.parametrize(("method", "path", "root_path", "operator_mb", "route_mb"), [ ("POST", "/chat/comp
tests/unit/proxy/middleware/test_request_size_limit_middleware.py:None
Routetest_request_skips_budget_checks_for_non_spending_requests
pytest.mark.parametrize( "route, request_body, model, expected", [ ("/v1/models", None, None,
tests/unit/proxy/auth/test_auth_checks_object_access_and_lookup.py:None
Routetest_request_time_context_window_error_is_request_scoped
requires_semantic_router
tests/unit/proxy/mcp_server/test_semantic_tool_filter.py:None
Routetest_request_trace_must_still_identify_the_requested_route
pytest.mark.parametrize("route", ("/v1/responses", ""))
tests/e2e_harness/logging/test_span_selection.py:None
Routetest_request_without_max_tokens_reserves_model_max_output_when_otpm_allows
pytest.mark.parametrize( "model, model_max_output", [(MANTLE_OPUS, MANTLE_OPUS_MAX_OUTPUT), (U
tests/unit/test_router/test_io_token_rate_limits.py:None
Routetest_request_without_model_or_input_is_rejected_before_calling_openai
pytest.mark.parametrize( ("model", "input_value", "expected_message"), [ ("", "hello", "CountT
tests/unit/llms/openai/responses/count_tokens/test_handler.py:None
Routetest_requested_hook_without_its_checkpoint_fails_at_startup
pytest.mark.parametrize( "hook, checkpoints, missing", [ (GuardrailEventHooks.pre_call, {"post
tests/unit/proxy/guardrails/guardrail_hooks/test_ovalix.py:None
Routetest_requester_metadata_forwarded_to_openai
patch("litellm.main.openai_chat_completions.completion")
tests/unit/test_utils_get_optional_params.py:None
Routetest_requests_a_provider_cannot_serve_are_rejected_before_http
pytest.mark.parametrize( ("model", "request_kwargs", "message"), ( ( "openai/gpt-6
tests/unit/decisions/test_main.py:None
Routetest_requests_billed_before_their_length_is_known_answer_400_even_with_drop_params
pytest.mark.parametrize( ("body", "drop", "message"), [ ({"seconds": "-1"}, False, "Smart dura
tests/integration/providers/test_dashscope_video_wire.py:None
Routetest_requests_new_token_and_caches
patch(f"{AUTH_MODULE}._request_token_sync")
tests/unit/llms/gigachat/test_authenticator.py:None
Routetest_requests_new_token_when_cache_expired
patch(f"{AUTH_MODULE}._request_token_sync")
tests/unit/llms/gigachat/test_authenticator.py:None
Routetest_requests_use_selected_subscription
pytest.mark.parametrize("through_router", [False, True])
tests/unit/llms/chatgpt/chat/test_chatgpt_chat_transformation.py:None
Routetest_require_managed_files_list_rejects_a_model_the_key_cannot_use
pytest.mark.parametrize( ("params", "headers"), [({"target_model_names": "gemini-2.0-flash"}, {}), ({}
tests/unit/proxy/openai_files_endpoint/test_files_endpoint.py:None
Routetest_require_managed_files_lists_the_callers_files_on_the_named_provider_or_model
pytest.mark.parametrize( ("path", "params", "headers", "expected_ids"), [ ("/openai/v1/files",
tests/unit/proxy/openai_files_endpoint/test_files_endpoint.py:None
Routetest_require_managed_files_lists_the_callers_files_wherever_the_router_put_them
pytest.mark.parametrize( ("path", "params", "headers", "expected_ids"), [ ( "/v1/f
tests/unit/proxy/openai_files_endpoint/test_files_endpoint.py:None
Routetest_require_managed_files_rejects_a_list_it_cannot_scope
pytest.mark.parametrize( ("path", "params"), [ ("/antropic/v1/files", {}), ("/openai/v
tests/unit/proxy/openai_files_endpoint/test_files_endpoint.py:None
Routetest_require_managed_files_rejects_raw_provider_file_id
pytest.mark.parametrize( "http_method, url, patched_litellm_call", [ ("get", "/v1/files/file-v
tests/unit/proxy/openai_files_endpoint/test_files_endpoint.py:None
Routetest_required_mapping_skips_unbilled_routes
pytest.mark.parametrize( ("route", "body"), [ ("/utils/token_counter", {"messages": [{"role":
tests/integration/spend/test_baggage_tag_mappings.py:None
Routetest_required_present_body_param_accepts_explicit_null
pytest.mark.parametrize( ("route_type", "data"), ( pytest.param( "anthropic_messag
tests/unit/proxy/test_route_llm_request.py:None
Routetest_required_present_body_param_ignores_non_mapping_router_defaults
pytest.mark.parametrize( "llm_router", [ pytest.param(MagicMock(), id="magicmock-router"),
tests/unit/proxy/test_route_llm_request.py:None
Routetest_required_present_body_param_ignores_router_wide_default_when_dispatch_skips_router
pytest.mark.parametrize( "route_type, data, param", [ ("asearch", {"model": "search-model"}, "
tests/unit/proxy/test_route_llm_request.py:None
Routetest_required_present_body_param_uses_router_wide_default
pytest.mark.parametrize( "route_type, data, param, default", [ ("anthropic_messages", {"model"
tests/unit/proxy/test_route_llm_request.py:None
Routetest_required_present_body_param_with_none_router_wide_default_still_raises
pytest.mark.parametrize( "route_type, data, param", [ ("anthropic_messages", {"model": "claude
tests/unit/proxy/test_route_llm_request.py:None
Routetest_rerank_metadata_ignores_unrelated_and_invalid_responses
pytest.mark.parametrize( "response", [ {"meta": {"tokens": {"input_tokens": 42}}}, {"r
tests/unit/litellm_core_utils/test_litellm_logging.py:None
Routetest_rerank_metadata_reaches_standard_and_spend_logs
pytest.mark.parametrize( ("meta", "expected"), [ ({"tokens": {"input_tokens": 7, "output_token
tests/unit/litellm_core_utils/test_litellm_logging.py:None
Routetest_rerank_output_is_the_ranked_indices_and_scores
meta( Subject( domain=Domain.OBSERVABILITY, route=Route.RERANK, pr
tests/e2e/logging/test_otel_v2_langfuse_generation_output_e2e.py:None
Routetest_rerank_scores_top_n
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.RERANK,
tests/e2e/llm_translation/test_rerank_e2e.py:None
Routetest_rerank_usage_reconciles_project_split_token_quota
pytest.mark.parametrize( ("response_obj", "expected"), [ ( RerankResponse(meta={"t
tests/unit/proxy/hooks/test_tpm_concurrent.py:None
Routetest_reset_config_field_restores_type_default
pytest.mark.parametrize( "field_name, expected_default", [ ("enable_anthropic_prompt_caching",
tests/unit/proxy/test_proxy_server_endpoints_and_startup.py:None
Routetest_reset_spend_zeroes_recorded_spend_and_lifts_the_budget_block
meta( Subject( domain=Domain.SPEND_BUDGETS, route=Route.KEY_MANAGEMENT,
tests/e2e/management/test_key_management_e2e.py:None
Routetest_reset_sweep_skips_ticks_while_another_pod_holds_the_lease_and_resumes_after_release
pytest.mark.covers("spend.budget_reset.one_pod_sweeps_per_tick")
tests/integration/spend/test_reset_budget_leader_election.py:None
Routetest_reset_team_member_budget_fn_detaches_member_when_team_has_no_usable_default
pytest.mark.parametrize( "team_obj, default_row", [ (LiteLLM_TeamTable(team_id="team-1"), None
tests/unit/proxy/management_endpoints/test_team_endpoints.py:None
Routetest_resolve_api_base
pytest.mark.parametrize( "input_api_base, env_api_base, expected_api_base", [ ( "h
tests/unit/llms/llamafile/chat/test_llamafile_chat_transformation.py:None
Routetest_resolve_api_key
pytest.mark.parametrize( "input_api_key, env_api_key, expected_api_key", [ ("user-provided-key
tests/unit/llms/llamafile/chat/test_llamafile_chat_transformation.py:None
Routetest_resolve_fireworks_resource_name
pytest.mark.parametrize( "model, expected", [ ("routers/glm-latest", "accounts/fireworks/route
tests/unit/llms/fireworks_ai/test_fireworks_ai_common_utils.py:None
Routetest_resolve_self_serve_budget_policy
pytest.mark.parametrize( ("settings", "expected"), [ ({}, "disabled"), ({"self_serve_b
tests/unit/proxy/management_endpoints/test_key_budget_change.py:None
Routetest_resolve_team_all_proxy_sentinel_resolves_dynamically
patch( "litellm.proxy.mcp_server.auth.user_api_key_auth_mcp.MCPRequestHandler.get_mcp_servers_from_access_
tests/unit/proxy/management_helpers/test_object_permission_utils.py:None
Routetest_resolve_team_allowed_mcp_servers_dict_tool_permissions
patch( "litellm.proxy.mcp_server.auth.user_api_key_auth_mcp.MCPRequestHandler.get_mcp_servers_from_access_
tests/unit/proxy/management_helpers/test_object_permission_utils.py:None
Routetest_resolve_team_allowed_mcp_servers_rejects_stored_tool_permissions_that_are_not_an_object
patch( "litellm.proxy.mcp_server.auth.user_api_key_auth_mcp.MCPRequestHandler.get_mcp_servers_from_access_
tests/unit/proxy/management_helpers/test_object_permission_utils.py:None
Routetest_resolve_team_allowed_mcp_servers_string_tool_permissions
patch( "litellm.proxy.mcp_server.auth.user_api_key_auth_mcp.MCPRequestHandler.get_mcp_servers_from_access_
tests/unit/proxy/management_helpers/test_object_permission_utils.py:None
Routetest_resolve_upstream_resource_tristate_and_canonicalization
pytest.mark.parametrize( "url, configured, expected", [ ("https://mcp.example.com/mcp", None,
tests/unit/proxy/mcp_server/test_discoverable_endpoints.py:None
Routetest_resolves_provider_bound_input
pytest.mark.parametrize( ("top_level", "extra_body", "expected"), [ ("ok", None, "ok"),
tests/unit/router_utils/test_embedding_batch_size_check.py:None
Routetest_resolves_served_model_aliases_in_order
pytest.mark.parametrize( "model, model_alias_map, key_aliases, model_group_alias, expected", [
tests/unit/router_utils/test_router_utils_common_utils.py:None
Routetest_response_close_preserves_cancellation_and_original_errors
patch("litellm.mcp_client.client.ClientSession")
tests/unit/mcp_client/test_mcp_client.py:None
Routetest_response_cost_calculator_custom_pricing_ignores_upstream_response_cost_header
pytest.mark.parametrize( ("input_cost_per_token", "output_cost_per_token", "expected_cost"), ((0.0, 0.
tests/unit/test_cost_calculator.py:None
Routetest_response_format_json_schema_shapes_the_reply
pytest.mark.covers("llm.chat_completions.together_ai.structured_output.nonstream.works")
tests/e2e/llm_translation/test_together_ai_e2e.py:None
Routetest_response_format_type_text_with_tool_calls_no_tool_choice
pytest.mark.parametrize( "case", _pick( "anthropic_sonnet45", "azure_o3mini",
tests/unit/llms/base_llm/chat/test_provider_chat_translation.py:None
← previousnext →4,201–4,300 of 5,595, ranked by callers