MCPcopy Create free account

hub / github.com/BerriAI/litellm / endpoints

Endpoints5,595 in github.com/BerriAI/litellm

Routetest_calculate_usage_nulls
pytest.mark.parametrize( "usage_object,expected_usage", [ [ { "cac
tests/unit/llms/anthropic/chat/test_anthropic_chat_transformation.py:None
Routetest_call_tool
patch.object(mcp_client_module, "streamable_http_client")
tests/unit/proxy/mcp_server/test_mcp_client_unit.py:None
Routetest_call_tool_denied_without_permission
meta( Subject( domain=Domain.MCP, route=Route.MCP, ) )
tests/e2e/mcp/test_mcp_key_access_e2e.py:None
Routetest_callbacks_and_the_spend_row_log_a_new_id_per_read_never_the_one_the_client_holds
pytest.mark.parametrize("call_type", ["aget_responses", "acancel_responses"])
tests/unit/test_responses_id_security.py:None
Routetest_caller_cannot_spoof_a_priority_group_to_bypass_fallback_gates
pytest.mark.parametrize("check_kind", ["access", "budget"])
tests/unit/router_strategy/test_router_routing_groups.py:None
Routetest_caller_host_header_never_reaches_the_validated_destination
pytest.mark.parametrize("call", ["http_post", "http_get"])
tests/unit/proxy/guardrails/test_custom_code_security.py:None
Routetest_caller_requested_stream_usage_has_no_choices_even_with_a_client_sent_injection_flag
pytest.mark.parametrize( ("route_prefix", "sends", "extra_body"), [pytest.param("/v1", 2, {}, id="chat
tests/integration/streaming/test_stream_contracts.py:None
Routetest_callers_own_output_limit_wins_over_the_env_budget
pytest.mark.parametrize( ("endpoint", "limit", "sent"), [ pytest.param("chat", {"max_tokens":
tests/integration/providers/test_gemini_default_output_budget_wire.py:None
Routetest_callers_without_a_member_budget_skip_the_limiter
pytest.mark.parametrize( "auth", [ UserAPIKeyAuth(user_id="member-1", team_id="team-1"),
tests/unit/llms/anthropic/messages/test_caller_model_checks.py:None
Routetest_calls_without_auth_is_denied
meta(Subject(domain=Domain.PROXY_AUTH, route=Route.REALTIME))
tests/e2e/llm_translation/test_realtime_http_e2e.py:None
Routetest_can_user_call_unified_file_id
pytest.mark.parametrize( "call_type", ["afile_content", "afile_delete", "afile_retrieve"] )
tests/unit/enterprise/proxy/hooks/test_managed_files.py:None
Routetest_cancel_background_streaming_response_by_streamed_id
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.RESPONSES,
tests/e2e/llm_translation/test_responses_retrieve_e2e.py:None
Routetest_canonical_provider_file_id_collapses_every_spelling_to_the_stored_id
pytest.mark.parametrize( ("file_id", "canonical"), ( ("batch-out1", "batch-out1"), ("f
tests/unit/proxy/openai_files_endpoint/test_files_common_utils.py:None
Routetest_capability_errors_before_start
pytest.mark.parametrize( "kwargs", [ {"permissions": "edit"}, {"output": Answer},
tests/unit/harness/test_runtime.py:None
Routetest_capability_flag_stays_on_the_deployment_that_set_it
pytest.mark.parametrize( "flag", [ "supports_regex_lookaround", "supports_assistant_pr
tests/unit/test_router_model_cost_isolation.py:None
Routetest_capture_rate_reports_or_names_the_missing_billing_key
meta( Subject( domain=Domain.SPEND_BUDGETS, route=Route.SPEND_REPORTING, ) )
tests/e2e/quota_management/spend_tracking/test_spend_routes.py:None
Routetest_captures_instructions_from_initialize
patch("litellm.mcp_client.client.ClientSession")
tests/unit/mcp_client/test_mcp_client.py:None
Routetest_carried_objects_match_what_the_getters_would_have_produced
pytest.mark.parametrize("metadata_max_budget", [300.0, None], ids=["metadata has max_budget", "filled from obj
tests/unit/integrations/test_prometheus_carried_budget_state.py:None
Routetest_catalog_changed_openapi_handler_never_dispatches
pytest.mark.parametrize("dispatch", ["managed", "local"])
tests/unit/proxy/mcp_server/test_mcp_server_manager.py:None
Routetest_catalog_counts_are_batched_for_the_page
pytest.mark.parametrize("route", (f"{HUB}?limit=1", "/claude-code/plugins"))
tests/unit/proxy/discovery_endpoints/test_skill_hub_endpoints.py:None
Routetest_catalog_helpers_preserve_context_results_and_failure_policy
pytest.mark.parametrize( "method", ["prompts/list", "prompts/get", "resources/list", "resources/templates/
tests/unit/proxy/mcp_server/test_operations.py:None
Routetest_catalog_observes_writer_changes_while_read_replica_lags
pytest.mark.parametrize("change", ["update", "delete"])
tests/unit/proxy/mcp_server/test_mcp_server_manager.py:None
Routetest_catalog_operation_retains_routes_only_for_same_configured_target
pytest.mark.parametrize("change", ["discovery", "update", "delete"])
tests/unit/proxy/mcp_server/test_mcp_server_manager.py:None
Routetest_catalog_rejects_configuration_switch_before_client_creation
pytest.mark.parametrize("change", ["edit", "delete"])
tests/unit/proxy/mcp_server/test_mcp_server_manager.py:None
Routetest_catalog_reload_does_not_restore_replaced_config_credentials_or_routes
pytest.mark.parametrize("change", ["credentials", "delete"])
tests/unit/proxy/mcp_server/test_mcp_server_manager.py:None
Routetest_catalog_reload_keeps_new_route_owner_over_earlier_route
pytest.mark.parametrize("change", ["concurrent", "staged", "deleted", "staged_after_delete", "staged_with_conc
tests/unit/proxy/mcp_server/test_mcp_server_manager.py:None
Routetest_catalog_reload_retains_routes_discovered_for_a_late_server
pytest.mark.parametrize("change", ["same", "changed", "deleted"])
tests/unit/proxy/mcp_server/test_mcp_server_manager.py:None
Routetest_ceiling_fits_the_sts_plaintext_limit
pytest.mark.parametrize(("route", "caller_and_actions"), sorted(_CALLER_ROUTE_ACTIONS.items()))
tests/unit/llms/bedrock/test_web_identity_session_policy.py:None
Routetest_ceiling_grants_no_service_the_route_does_not_call
pytest.mark.parametrize(("route", "caller_and_actions"), sorted(_CALLER_ROUTE_ACTIONS.items()))
tests/unit/llms/bedrock/test_web_identity_session_policy.py:None
Routetest_centralized_common_checks_enforces_the_end_users_model_max_budget
pytest.mark.parametrize( ("make_token", "make_end_user", "gpt_4o_spend", "model", "route", "must_raise"),
tests/unit/proxy/auth/test_user_api_key_auth_request_flow.py:None
Routetest_centralized_common_checks_enforces_the_end_users_model_max_budget_without_a_proxy_default
pytest.mark.parametrize( ("make_token", "make_end_user"), [ pytest.param( _virtual
tests/unit/proxy/auth/test_user_api_key_auth_request_flow.py:None
Routetest_centralized_common_checks_inherits_org_identity
pytest.mark.parametrize( "key_org_id,team_id,team_org_id,existing_alias,existing_rpm,lookup_mode,allow_db_
tests/unit/proxy/auth/test_user_api_key_auth_request_flow.py:None
Routetest_centralized_common_checks_routes_header_tags_to_litellm_metadata
pytest.mark.parametrize( "route", [ "/bedrock/model/us.anthropic.claude-sonnet-4-6/invoke",
tests/unit/proxy/auth/test_user_api_key_auth_request_flow.py:None
Routetest_centralized_common_checks_skips_default_member_budget_lookup_errors_on_exempt_routes
pytest.mark.parametrize( ("route", "path", "must_raise"), [ pytest.param("/v1/models", "/v1/mo
tests/unit/proxy/auth/test_user_api_key_auth_request_flow.py:None
Routetest_charges_wait_for_a_concurrent_writer_instead_of_deadlocking
pytest.mark.parametrize( ("first", "rest"), [(_roster_first, _roster_rest), (_access_group_first, _acc
tests/integration/database/test_spend_lock_order.py:None
Routetest_chat_blocks_category
meta( Subject( domain=Domain.GUARDRAILS, route=Route.CHAT_COMPLETIONS,
tests/e2e/guardrails/test_openai_moderation_category_matrix_e2e.py:None
Routetest_chat_bridge_forwards_defer_loading_so_tool_search_has_a_deferred_tool
pytest.mark.parametrize( "deferred_tool", [ {"type": "function", "function": _defer_function("
tests/integration/providers/test_responses_bridge_tool_search_wire.py:None
Routetest_chat_completion
mock_patch_acompletion()
tests/unit/proxy/test_proxy_server.py:None
Routetest_chat_completion_azure
mock_patch_acompletion()
tests/unit/proxy/test_proxy_server.py:None
Routetest_chat_completion_forward_headers
mock_patch_acompletion()
tests/unit/proxy/test_proxy_server.py:None
Routetest_chat_completion_forward_llm_provider_auth_headers
mock_patch_acompletion()
tests/unit/proxy/test_proxy_server.py:None
Routetest_chat_completion_optional_params
mock_patch_acompletion()
tests/unit/proxy/test_proxy_server.py:None
Routetest_chat_completion_request_with_redaction
pytest.mark.parametrize( "route, body", [ ( "/v1/chat/completions", {
tests/unit/proxy/test_proxy_reject_logging.py:None
Routetest_chat_completion_returns_prediction_usage
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.CHAT_COMPLETIONS,
tests/e2e/llm_translation/test_chat_completion_prediction_e2e.py:None
Routetest_chat_completion_returns_reasoning
pytest.mark.parametrize("route_name, model, required_env", CHAT_ROUTES)
tests/e2e/llm_translation/test_reasoning_effort_e2e.py:None
Routetest_chat_completion_tools_to_responses_tools_keeps_eager_input_streaming
pytest.mark.parametrize("eager_input_streaming", [True, False])
tests/unit/responses/litellm_completion_transformation/test_litellm_completion_responses.py:None
Routetest_chat_completion_writes_nonzero_spend_row
meta( Subject( domain=Domain.SPEND_BUDGETS, route=Route.CHAT_COMPLETIONS, provider
tests/e2e/quota_management/spend_tracking/test_spend_tracking_e2e.py:None
Routetest_chat_completions_emits_one_log_event
meta( Subject( domain=Domain.OBSERVABILITY, route=Route.CHAT_COMPLETIONS,
tests/e2e/logging/test_datadog_log_e2e.py:None
Routetest_chat_completions_exports_complete_trace
meta( Subject( domain=Domain.OBSERVABILITY, route=Route.CHAT_COMPLETIONS,
tests/e2e/logging/test_otel_trace_e2e.py:None
Routetest_chat_completions_failure_stamps_server_span
pytest.mark.parametrize( "exception, expected_status", [ (make_fastapi_http_exception(400, "ba
tests/unit/integrations/open_telemetry/test_otel_unified_endpoints.py:None
Routetest_chat_completions_send_a_flagged_deployment_the_control_request
pytest.mark.parametrize( ("family", "flag"), [ ("openai", {"supports_vision": True}),
tests/integration/routing/test_model_capability_flags.py:None
Routetest_chat_completions_still_blocked_when_llm_api_disabled
patch.object(EnterpriseRouteChecks, "is_llm_api_route_disabled")
tests/unit/enterprise/proxy/auth/test_route_checks.py:None
Routetest_chat_completions_stream_emits_one_log_event
meta( Subject( domain=Domain.OBSERVABILITY, route=Route.CHAT_COMPLETIONS,
tests/e2e/logging/test_datadog_log_e2e.py:None
Routetest_chat_completions_stream_exports_complete_trace
meta( Subject( domain=Domain.OBSERVABILITY, route=Route.CHAT_COMPLETIONS,
tests/e2e/logging/test_otel_trace_e2e.py:None
Routetest_chat_completions_stream_records_real_ttft
meta( Subject( domain=Domain.OBSERVABILITY, route=Route.CHAT_COMPLETIONS,
tests/e2e/logging/test_otel_trace_e2e.py:None
Routetest_chat_completions_through_the_responses_bridge_follow_drop_params
pytest.mark.parametrize( ("model", "forwarded"), [ (_RESPONSES_MODEL, [("tool_search", "server
tests/integration/providers/test_openai_responses_tool_search_wire.py:None
Routetest_chat_followup_reuses_the_model_the_caller_requested
pytest.mark.parametrize( "requested_model,handler_model,custom_llm_provider", [ ("openrouter/o
tests/unit/integrations/websearch_interception/test_websearch_chat_completion.py:None
Routetest_chat_max_tokens_reaches_the_codex_backend_no_lower_than_its_minimum
pytest.mark.parametrize( ("max_tokens", "expected_max_output_tokens"), [(300, 300), (OPENAI_RESPONSES_
tests/unit/llms/chatgpt/responses/test_chatgpt_responses_transformation.py:None
Routetest_chat_over_responses_deployment_returns_length_when_output_tokens_run_out
pytest.mark.covers("other.provider_wire.responses_bridge.max_output_tokens_incomplete_maps_to_length")
tests/integration/providers/test_responses_bridge_incomplete.py:None
Routetest_chat_per_second_pricing_is_charged_once_and_not_forwarded
pytest.mark.parametrize( ("pricing_case", "pricing"), PER_SECOND_CONFIGURATIONS, ids=("new_field",
tests/integration/pricing/test_per_second_pricing.py:None
Routetest_chat_restriction_does_not_block_other_operations
pytest.mark.parametrize("call_type", ["aembedding", "aspeech", "_arealtime", "aget_responses"])
tests/unit/router_utils/test_endpoint_eligibility.py:None
Routetest_chat_returns_real_completion
pytest.mark.parametrize(("model", "route"), CHAT_MODELS)
tests/e2e/llm_translation/test_chat_completions_regression_e2e.py:None
Routetest_chat_row_keeps_only_the_latest_user_prompt_and_the_response
pytest.mark.parametrize( ("latest", "expected_turns"), [ pytest.param( {
tests/integration/spend/test_spend_log_latest_turn.py:None
Routetest_chat_sent_to_an_embedding_only_deployment_id_or_backend_name_is_rejected_before_the_upstream
pytest.mark.parametrize("route", _ADDRESSED_ROUTES)
tests/integration/routing/test_non_chat_model_endpoint_gate.py:None
Routetest_chat_shaped_route_rejects_an_embedding_only_model_before_the_upstream
pytest.mark.parametrize("route", tuple(_ROUTES))
tests/integration/routing/test_non_chat_model_endpoint_gate.py:None
Routetest_chat_stream_is_sse_and_ends_with_done
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.CHAT_COMPLETIONS,
tests/e2e/llm_translation/test_chat_stream_contract_e2e.py:None
Routetest_chat_template_kwargs_reach_together
pytest.mark.covers("llm.chat_completions.together_ai.thinking.nonstream.template_kwargs_forwarded")
tests/e2e/llm_translation/test_together_ai_e2e.py:None
Routetest_chat_thinking_drops_unknown_keys_only_under_drop_params
pytest.mark.parametrize( ( "custom_llm_provider", "model", "requested_thinking",
tests/unit/llms/anthropic/test_anthropic_common_utils.py:None
Routetest_chat_transform_request_answers_400_naming_a_non_string_role_or_tool_call_id
pytest.mark.parametrize( ("messages", "field_path", "type_name"), [ pytest.param(
tests/unit/llms/anthropic/chat/test_anthropic_chat_transformation.py:None
Routetest_chat_transform_request_never_blames_a_dropped_tool_answer_id_for_another_failure
pytest.mark.parametrize( ("later_turn", "real_cause"), [ pytest.param( [{"role": "
tests/unit/llms/anthropic/chat/test_anthropic_chat_transformation.py:None
Routetest_chatgpt_model_configuration_reaches_role_authorization
pytest.mark.parametrize("route", ["/model/new", "/model/update", "/model/account-a/update", "/health/test_conn
tests/unit/proxy/auth/test_auth_utils.py:None
Routetest_chatgpt_responses_endpoint_url
patch("litellm.llms.chatgpt.responses.transformation.Authenticator")
tests/unit/llms/chatgpt/responses/test_chatgpt_responses_transformation.py:None
Routetest_check_and_create_cache_create_new_cache
patch("litellm.llms.vertex_ai.context_caching.vertex_ai_context_caching.separate_cached_messages")
tests/unit/llms/vertex_ai/context_caching/test_vertex_ai_context_caching.py:None
Routetest_check_and_create_cache_distinct_tool_choices_use_distinct_keys
patch("litellm.llms.vertex_ai.context_caching.vertex_ai_context_caching.separate_cached_messages")
tests/unit/llms/vertex_ai/context_caching/test_vertex_ai_context_caching.py:None
Routetest_check_and_create_cache_existing_cache_found
patch("litellm.llms.vertex_ai.context_caching.vertex_ai_context_caching.separate_cached_messages")
tests/unit/llms/vertex_ai/context_caching/test_vertex_ai_context_caching.py:None
Routetest_check_and_create_cache_http_error
patch("litellm.llms.vertex_ai.context_caching.vertex_ai_context_caching.separate_cached_messages")
tests/unit/llms/vertex_ai/context_caching/test_vertex_ai_context_caching.py:None
Routetest_check_and_create_cache_no_cached_messages
patch("litellm.llms.vertex_ai.context_caching.vertex_ai_context_caching.separate_cached_messages")
tests/unit/llms/vertex_ai/context_caching/test_vertex_ai_context_caching.py:None
Routetest_check_and_create_cache_omits_tool_config_when_tool_choice_unset
patch("litellm.llms.vertex_ai.context_caching.vertex_ai_context_caching.separate_cached_messages")
tests/unit/llms/vertex_ai/context_caching/test_vertex_ai_context_caching.py:None
Routetest_check_and_create_cache_records_creation_tokens_for_billing
patch.object(ContextCachingEndpoints, "check_cache", return_value=None)
tests/unit/llms/vertex_ai/context_caching/test_vertex_ai_context_caching.py:None
Routetest_check_and_create_cache_records_no_creation_tokens_when_cache_exists
patch.object(ContextCachingEndpoints, "check_cache", return_value="cachedContents/existing")
tests/unit/llms/vertex_ai/context_caching/test_vertex_ai_context_caching.py:None
Routetest_check_and_create_cache_skips_when_below_min_tokens
patch("litellm.llms.vertex_ai.context_caching.vertex_ai_context_caching.separate_cached_messages")
tests/unit/llms/vertex_ai/context_caching/test_vertex_ai_context_caching.py:None
Routetest_check_and_create_cache_tool_choice_function_pin
patch("litellm.llms.vertex_ai.context_caching.vertex_ai_context_caching.separate_cached_messages")
tests/unit/llms/vertex_ai/context_caching/test_vertex_ai_context_caching.py:None
Routetest_check_and_create_cache_tool_choice_in_request_body
patch("litellm.llms.vertex_ai.context_caching.vertex_ai_context_caching.separate_cached_messages")
tests/unit/llms/vertex_ai/context_caching/test_vertex_ai_context_caching.py:None
Routetest_check_and_create_cache_tool_choice_typed_constructor
patch("litellm.llms.vertex_ai.context_caching.vertex_ai_context_caching.separate_cached_messages")
tests/unit/llms/vertex_ai/context_caching/test_vertex_ai_context_caching.py:None
Routetest_check_and_create_cache_with_cached_content
patch("litellm.llms.vertex_ai.context_caching.vertex_ai_context_caching.separate_cached_messages")
tests/unit/llms/vertex_ai/context_caching/test_vertex_ai_context_caching.py:None
Routetest_check_cache_pagination_finds_cache_on_second_page
patch.object(ContextCachingEndpoints, "_get_token_and_url_context_caching")
tests/unit/llms/vertex_ai/context_caching/test_vertex_ai_context_caching.py:None
Routetest_check_cache_pagination_max_pages_limit
patch.object(ContextCachingEndpoints, "_get_token_and_url_context_caching")
tests/unit/llms/vertex_ai/context_caching/test_vertex_ai_context_caching.py:None
Routetest_check_cache_pagination_multiple_pages
patch.object(ContextCachingEndpoints, "_get_token_and_url_context_caching")
tests/unit/llms/vertex_ai/context_caching/test_vertex_ai_context_caching.py:None
Routetest_check_cache_pagination_stops_when_no_next_token
patch.object(ContextCachingEndpoints, "_get_token_and_url_context_caching")
tests/unit/llms/vertex_ai/context_caching/test_vertex_ai_context_caching.py:None
Routetest_check_end_user_budget
pytest.mark.parametrize("customer_spend, customer_budget", [(0, 10), (10, 0)])
tests/unit/proxy/auth/test_auth_checks.py:None
Routetest_check_org_key_limits_aggregate
pytest.mark.parametrize( "org_budget,body_extras,expected_status,detail_substring", [(b, c, d, e) for
tests/integration/management/test_key_budget_limits.py:None
Routetest_check_org_team_limits_budget_enforced
pytest.mark.parametrize( "org_budget,body_extras,expected_status", [(b, c, d) for (_id, b, c, d) in _O
tests/integration/management/test_team_budget_limits.py:None
Routetest_check_org_team_limits_budget_enforced_on_update
pytest.mark.parametrize( "org_budget,body_extras,expected_status", [(b, c, d) for (_id, b, c, d) in _O
tests/integration/management/test_team_budget_limits.py:None
Routetest_check_user_model_budget
pytest.mark.parametrize( "user_id,user_model_max_budget,expected_calls", [ ("u-1", {"gpt-4": {
tests/unit/proxy/auth/test_user_api_key_auth.py:None
Routetest_chunk_processor_bills_partial_google_usage_on_mid_stream_exception
pytest.mark.parametrize( "endpoint_type, url_route", [ (EndpointType.GEMINI, "/gemini/v1beta/m
tests/unit/proxy/pass_through_endpoints/test_streaming_handler_interrupt.py:None
Routetest_chunk_processor_claims_the_budget_reservation_before_handing_it_to_the_cost_callback
pytest.mark.parametrize( "deferred_dispatch_armed", [False, True], ids=["enqueued-at-end-of-stream
tests/unit/proxy/pass_through_endpoints/test_streaming_handler_interrupt.py:None
Routetest_chunk_processor_yields_raw_bytes
pytest.mark.parametrize( "endpoint_type,url_route", [ ( EndpointType.VERTEX_AI,
tests/unit/proxy/pass_through_endpoints/test_success_handler.py:None
Routetest_chunked_upload_overflow_stops_fastapi_and_auth_multipart_parsing
pytest.mark.parametrize(("method", "path", "route"), [ ("POST", "/claude-code/plugins/upload", "/claude-co
tests/unit/proxy/middleware/test_request_size_limit_middleware.py:None
Routetest_circuit_breaker_opens_when_method_swallows_redis_failure
pytest.mark.parametrize( "call_method", [ pytest.param(lambda c: c.async_get_cache("lit4930"),
tests/unit/caching/test_redis_cache.py:None
Routetest_classifier_audit_is_not_added_to_other_calls
pytest.mark.parametrize("call_type,origin", [("completion", None), ("aembedding", "autorouter_classifier")])
tests/unit/litellm_core_utils/test_litellm_logging.py:None
← previousnext →2,001–2,100 of 5,595, ranked by callers