MCPcopy Create free account

hub / github.com/BerriAI/litellm / endpoints

Endpoints5,595 in github.com/BerriAI/litellm

Routetest_classifier_failure_falls_open_to_the_picker_default
pytest.mark.parametrize( ("classifier", "router_kwargs", "picker", "expected"), [ ({}, {"compl
tests/unit/router_strategy/switchyard_router/test_switchyard_router.py:None
Routetest_classifier_source_is_masked_and_separate_from_provider_input
pytest.mark.parametrize( "source_body", [ {"model": "router", "messages": [{"role"
tests/unit/router_strategy/test_complexity_router.py:None
Routetest_classify_billable
pytest.mark.parametrize( "path,expected", [ ("/v1/chat/completions", (BillableCategory.LLM, "/
tests/unit/proxy/middleware/test_billable_request_metrics_middleware.py:None
Routetest_classify_code_generation
pytest.mark.parametrize( "text", [ "Write a Python function that reverses a linked list",
tests/unit/router_strategy/adaptive_router/test_classifier.py:None
Routetest_classify_decisions
pytest.mark.parametrize( "category,changed,expected", [ ("mcp-dependencies", ["pyproject.toml"
tests/unit/test_circleci_path_filter.py:None
Routetest_classify_key_budget_change
pytest.mark.parametrize( ("update", "stored", "expected"), [ (UpdateKeyRequest(key="sk-1", key
tests/unit/proxy/management_endpoints/test_key_budget_change.py:None
Routetest_classify_strategy_router_model
pytest.mark.parametrize( "model,expected", [ ("anthropic/claude-sonnet-5", None), ("co
tests/unit/router_strategy/test_auto_router_model_naming.py:None
Routetest_classify_technical_design
pytest.mark.parametrize( "text", [ "Design a microservice architecture for an event-driven sys
tests/unit/router_strategy/adaptive_router/test_classifier.py:None
Routetest_classify_writing
pytest.mark.parametrize( "text", [ "Draft an email to my team announcing the launch",
tests/unit/router_strategy/adaptive_router/test_classifier.py:None
Routetest_claude_4_6_thinking_budget_tokens_on_messages_is_forwarded_instead_of_rewritten_to_adaptive
pytest.mark.covers("providers.anthropic_messages.claude_4_6_legacy_thinking_budget_reaches_the_wire_unchanged"
tests/integration/messages_endpoint/providers/anthropic/test_anthropic_legacy_thinking_budget_wire.py:None
Routetest_claude_calling_tool_search_comes_back_as_a_client_tool_search_call
pytest.mark.parametrize("tool_input", [{"query": "calendar create", "limit": 1}, {"query": "calendar create"}]
tests/unit/responses/litellm_completion_transformation/test_anthropic_responses_bridge.py:None
Routetest_claude_code_cost_counts_anthropic_cached_prompt_tokens
pytest.mark.parametrize("route", ["gateway stream", "gateway json", "sdk json"])
tests/unit/harness/test_endpoint.py:None
Routetest_claude_code_gateway_routes_open_to_signed_in_cli_users
pytest.mark.parametrize("route", _CLAUDE_CODE_GATEWAY_ROUTES)
tests/unit/proxy/auth/test_route_checks.py:None
Routetest_claude_code_marketplace_routes_open_to_internal_users
pytest.mark.parametrize( "route", [ "/claude-code/marketplace.json", "/claude-code/plu
tests/unit/proxy/auth/test_route_checks.py:None
Routetest_claude_count_rejects_a_lone_responses_tool_without_calling_bedrock
pytest.mark.parametrize( "tool", ( {"type": "mcp", "server_label": "wiki", "server_url": "http
tests/unit/llms/bedrock/count_tokens/test_bedrock_token_counter.py:None
Routetest_claude_finds_a_deferred_tool_through_codex_tool_search_and_calls_it
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.RESPONSES,
tests/e2e/llm_translation/test_responses_codex_tool_search_e2e.py:None
Routetest_claude_routes_without_the_mcp_connector_drop_a_hosted_mcp_tool_under_drop_params
pytest.mark.parametrize(("config_class", "route"), _ROUTES_WITHOUT_THE_MCP_CONNECTOR)
tests/unit/llms/anthropic/chat/test_anthropic_chat_transformation.py:None
Routetest_claude_routes_without_the_mcp_connector_send_no_tools_when_drop_params_drops_every_one
pytest.mark.parametrize(("config_class", "route"), _ROUTES_WITHOUT_THE_MCP_CONNECTOR)
tests/unit/llms/anthropic/chat/test_anthropic_chat_transformation.py:None
Routetest_claude_tokenizer_api_failure
patch("litellm.utils.tokenizer_dispatch.anthropic")
tests/unit/litellm_core_utils/test_token_counter.py:None
Routetest_claude_view_never_reinterprets_explicit_names
pytest.mark.parametrize("layer", ["literal", "global", "router", "key", "hierarchical", "unclaimed"])
tests/unit/proxy/auth/test_user_api_key_auth_request_flow.py:None
Routetest_claude_view_normalizes_before_model_access
pytest.mark.parametrize( "route", ["/v1/messages", "/messages", "/v1/chat/completions", "/chat/completions
tests/unit/proxy/auth/test_user_api_key_auth_request_flow.py:None
Routetest_cleanup_error_after_success_is_swallowed
patch("litellm.mcp_client.client.ClientSession")
tests/unit/mcp_client/test_mcp_client.py:None
Routetest_cleanup_preserves_process_exit
patch("litellm.mcp_client.client.ClientSession")
tests/unit/mcp_client/test_mcp_client.py:None
Routetest_clear_tool_inputs_reads_boolean_strings_and_numbers_like_the_api
pytest.mark.parametrize(("clear_tool_inputs", "cleared"), [("yes", True), ("true", True), (1, True), ("no", Fa
tests/unit/llms/anthropic/messages/context_management/test_clear_tool_uses.py:None
Routetest_clearing_the_description_with_null_reads_back_null
meta( Subject( domain=Domain.MCP, route=Route.MCP, ) )
tests/e2e/management/test_mcp_lifecycle_e2e.py:None
Routetest_clef_gets_png_jpeg_and_webp_images_without_media_type_parameters
pytest.mark.parametrize("route", ("/v1/systemone", "/v1/decisions"))
tests/integration/providers/test_cloudflare_clef_images_wire.py:None
Routetest_cli_session_token_without_org_id_charges_and_caps_the_team_organization
pytest.mark.covers("quota_management.organization_budget.cli_session_token_without_org_id_charges_team_organiz
tests/integration/spend/test_org_budget_cli_session_token.py:None
Routetest_cli_sso_complete_records_the_team_chosen_in_the_browser
pytest.mark.parametrize( ("posted_team_id", "chosen_team_id", "stored_teams"), [("team-claude"
tests/unit/proxy/management_endpoints/test_ui_sso.py:None
Routetest_client_error_details_reads_every_error_shape
pytest.mark.parametrize( ("error", "expected_status", "expected_message"), [ ( Cli
tests/unit/llms/sagemaker/test_sagemaker_common_utils.py:None
Routetest_client_login_cannot_be_redirected_to_another_host
pytest.mark.parametrize( "target", ["https://example.com/v1", "http://chatgpt.com/backend-api/codex", "htt
tests/unit/llms/chatgpt/chat/test_chatgpt_chat_transformation.py:None
Routetest_client_max_completion_tokens_returns_completion
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.CHAT_COMPLETIONS,
tests/e2e/llm_translation/test_bedrock_mantle_output_limit_e2e.py:None
Routetest_client_max_tokens_returns_completion
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.CHAT_COMPLETIONS,
tests/e2e/llm_translation/test_bedrock_mantle_output_limit_e2e.py:None
Routetest_client_owned_history_bypasses_compaction
pytest.mark.parametrize("owned", [ {"previous_response_id": "resp_parent"}, {"conversation": "conv_parent"
tests/unit/router_strategy/complexity_router/test_context_compaction.py:None
Routetest_client_secret_mint_refuses_blocked_or_exhausted_key
pytest.mark.parametrize( ("refusal", "expected_status", "expected_type"), [("blocked", 401, "auth_erro
tests/integration/authorization/test_realtime_client_secret_access.py:None
Routetest_client_secret_missing_auth_is_denied
meta(Subject(domain=Domain.PROXY_AUTH, route=Route.REALTIME))
tests/e2e/llm_translation/test_realtime_http_e2e.py:None
Routetest_client_secrets_forward_every_session_value_the_caller_set
pytest.mark.parametrize( ("body", "session_path", "expected"), ( ( {
tests/unit/proxy/realtime_endpoints/test_realtime_webrtc_endpoints.py:None
Routetest_client_secrets_mint_a_secret_for_the_azure_deployment_model
pytest.mark.parametrize( ("path", "body", "upstream_model_path", "expected_model"), ( (
tests/unit/proxy/realtime_endpoints/test_realtime_webrtc_endpoints.py:None
Routetest_client_sent_target_order_never_moves_a_request_off_order_one
pytest.mark.parametrize( "target_order", [ pytest.param(2, id="int"), pytest.param("2"
tests/integration/routing/test_fallback_hop_foreign_encrypted_reasoning.py:None
Routetest_client_supplied_judge_origin_does_not_bypass_enforcing_hooks
pytest.mark.parametrize( "event_type", [GuardrailEventHooks.pre_call, GuardrailEventHooks.during_call, Gua
tests/unit/proxy/guardrails/test_llm_as_a_judge.py:None
Routetest_clips_for_a_model_without_media_support_are_refused_before_http
pytest.mark.parametrize( "model", ( "cloudflare/clef", "cloudflare/clef-flash",
tests/unit/decisions/test_main.py:None
Routetest_codex_additional_tools_input_item_reaches_mantle_as_top_level_tools
pytest.mark.covers("providers.bedrock_mantle.codex_additional_tools_input_item_is_hoisted_to_top_level_tools")
tests/integration/providers/test_bedrock_mantle_codex_input_wire.py:None
Routetest_codex_additional_tools_item_reaches_each_provider_in_a_shape_it_accepts
pytest.mark.parametrize( ("model", "expected_input", "expected_tool_names"), [ pytest.param(
tests/unit/proxy/pass_through_endpoints/test_codex_passthrough_endpoints.py:None
Routetest_codex_agent_message_compaction_and_local_shell_items_are_rewritten_for_mantle
pytest.mark.covers("providers.bedrock_mantle.codex_history_items_reach_the_wire_as_supported_input_items")
tests/integration/providers/test_bedrock_mantle_responses_wire.py:None
Routetest_coerce_response_obj_decodes_a_json_object_body
pytest.mark.parametrize( ("text", "expected"), [ ('{"id": "msg_1", "usage": {"input_tokens": 3
tests/unit/integrations/arize/test_arize_utils.py:None
Routetest_cohere_chat_returns_content
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.CHAT_COMPLETIONS,
tests/e2e/llm_translation/test_chat_completions_regression_e2e.py:None
Routetest_cohere_embed_job_passthrough_logs_the_plain_passthrough_row
pytest.mark.parametrize( ("url_route", "body"), [ ("https://api.cohere.com/v1/embed-jobs", {"j
tests/unit/proxy/pass_through_endpoints/llm_provider_handlers/test_cohere_passthrough_logging_handler.py:None
Routetest_cohere_embed_passthrough_cost_tracking
patch("litellm.completion_cost")
tests/unit/proxy/pass_through_endpoints/llm_provider_handlers/test_cohere_passthrough_logging_handler.py:None
Routetest_cohere_embed_passthrough_is_costed_from_billed_units
pytest.mark.parametrize( ("url_route", "body", "input_tokens", "image_tokens"), [ ("https://ap
tests/unit/proxy/pass_through_endpoints/llm_provider_handlers/test_cohere_passthrough_logging_handler.py:None
Routetest_cohere_embed_v4_image_tokens_are_billed_apart_from_input_tokens
pytest.mark.parametrize(("input_tokens", "image_tokens"), [(0, 6), (3, 6)])
tests/unit/llms/cohere/embed/test_transformation.py:None
Routetest_cohere_embed_v4_input_types
pytest.mark.parametrize("input_type", ["search_document", "search_query", "classification", "clustering"])
tests/unit/llms/cohere/embed/test_transformation.py:None
Routetest_cohere_embedding_usage_comes_from_billed_units
pytest.mark.parametrize( ("meta", "expected_counts", "expected_details"), [ ({"billed_units":
tests/unit/llms/cohere/embed/test_transformation.py:None
Routetest_cohere_embedding_usage_counts_input_tokens_when_billed_units_are_absent
pytest.mark.parametrize( "payload", [ {"embeddings": {"float": FLOAT_VECTORS}}, {"embe
tests/unit/llms/cohere/embed/test_transformation.py:None
Routetest_cohere_embeddings_returns_vector
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.EMBEDDINGS,
tests/e2e/llm_translation/test_embeddings_endpoint_e2e.py:None
Routetest_cohere_image_embeddings_report_image_tokens
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.EMBEDDINGS,
tests/e2e/llm_translation/test_embeddings_endpoint_e2e.py:None
Routetest_cohere_rerank_selects_v1_or_v2_from_client_fields_and_sends_exact_body
pytest.mark.parametrize( ("client_fields", "api_base_suffix", "expected_body", "expected_route"), [
tests/integration/providers/test_rerank_latency_headers_wire.py:None
Routetest_cohere_tokenizer_api_failure
patch("litellm.utils.tokenizer_dispatch.from_pretrained")
tests/unit/litellm_core_utils/test_token_counter.py:None
Routetest_cohere_v1_sdk_object_documents_reach_cohere_unchanged_on_both_api_versions
pytest.mark.parametrize( ("client_fields", "expected_route"), [ pytest.param({}, "/v2/rerank",
tests/integration/providers/test_rerank_latency_headers_wire.py:None
Routetest_cold_counter_reseed_keeps_counter_equal_to_db_spend
pytest.mark.covers("quota_management.budget.spend_counter.reseed_matches_db")
tests/e2e/quota_management/budgets/test_spend_counter_reseed_e2e.py:None
Routetest_combined_modes_preserve_blocking_and_directional_observation
pytest.mark.parametrize( ("row_id", "scope", "modes", "expected_directions", "expected_statuses", "expecte
tests/integration/observability/test_logging_only_scope_runtime.py:None
Routetest_commit_msg_accepts_conventional_subjects
pytest.mark.parametrize( "subject", [ "feat(router): add weighted round-robin strategy",
tests/unit/test_git_hooks.py:None
Routetest_commit_msg_passes_git_generated_messages
pytest.mark.parametrize( "subject", [ "Merge branch 'main' into feature/foo", 'Revert
tests/unit/test_git_hooks.py:None
Routetest_commit_msg_rejects_invalid_subjects
pytest.mark.parametrize( "subject", [ "add stuff", # no type
tests/unit/test_git_hooks.py:None
Routetest_commit_spend_updates_iterates_in_sorted_order
pytest.mark.parametrize( "bucket_name,input_dict,table_attr,method_name,where_key,expected_order", [
tests/unit/proxy/db/test_db_spend_update_writer.py:None
Routetest_committed_retry_budget_for_request_is_the_budget_a_retry_stamped
pytest.mark.parametrize( "kwargs,expected", [ pytest.param({"litellm_metadata": {"attempted_re
tests/unit/router_utils/test_fallback_event_handlers.py:None
Routetest_common_checks_metadata_route_keeps_key_tags_out_of_provider_metadata
pytest.mark.parametrize( "route", [ "/bedrock/model/us.anthropic.claude-sonnet-4-6/invoke",
tests/unit/proxy/auth/test_auth_checks_object_access_and_lookup.py:None
Routetest_common_processing_pre_call_logic_applies_priority_header_only_where_the_router_schedules
pytest.mark.parametrize( ("path", "route_type", "has_router", "priority_header", "body_priority", "exp
tests/unit/proxy/test_common_request_processing.py:None
Routetest_common_processing_pre_call_logic_refreshes_proxy_server_request_body_after_guardrails
pytest.mark.parametrize( "route_type,input_key,system_key,token_key", [ ("acomplet
tests/unit/proxy/test_common_request_processing.py:None
Routetest_compactifai_malformed_response_body_raises_the_error_of_the_failing_lookup
pytest.mark.parametrize( ("body", "json_mode", "error", "message"), [ ([], None, TypeError, r"
tests/unit/llms/compactifai/test_compactifai.py:None
Routetest_compaction_item_reaches_each_route_in_the_shape_it_reads
pytest.mark.parametrize("route", _ROUTES)
tests/integration/providers/test_responses_compaction_items_wire.py:None
Routetest_complete_gdc_prefers_gdc_api_base_over_global
patch("litellm.main.base_llm_http_handler.completion")
tests/unit/llms/gdc/chat/test_gdc_chat_transformation.py:None
Routetest_complete_gdc_resolves_key_and_base
patch("litellm.main.base_llm_http_handler.completion")
tests/unit/llms/gdc/chat/test_gdc_chat_transformation.py:None
Routetest_completed_batch_downloads_output_and_books_cost
meta( Subject( domain=Domain.LLM_TRANSLATION, route=Route.BATCHES,
tests/e2e/batches/test_batches_e2e.py:None
Routetest_completed_call_keeps_its_charge_when_post_call_processing_fails
pytest.mark.parametrize("failure", [RuntimeError("post-call failed"), asyncio.CancelledError(), "cancel_scope"
tests/unit/proxy/spend_tracking/test_cost_finalization.py:None
Routetest_completed_event_without_usage_counts_tool_input_deltas
pytest.mark.parametrize( "tool_delta_event_type", ["response.custom_tool_call_input.delta", "response.
tests/unit/responses/test_streaming_iterator.py:None
Routetest_completed_file_change_lists_each_change
pytest.mark.parametrize( ("changes", "output"), [ ([{"path": "a.txt", "kind": "add"}, {"path":
tests/unit/llms/codex/harness/test_transformation.py:None
Routetest_completed_with_lagging_output_file_left_for_next_cycle
pytest.mark.parametrize( "request_counts", [ MagicMock(completed=7, failed=0, tota
tests/unit/proxy/common_utils/test_check_batch_cost.py:None
Routetest_completion_adds_the_beta_matching_the_computer_tool_version
pytest.mark.parametrize( ("tool_type", "expected_beta"), [ ("computer_20241022", "computer-use
tests/unit/llms/anthropic/chat/test_anthropic_chat_transformation.py:None
Routetest_completion_bare_model_with_together_api_base_uses_together_config
pytest.mark.parametrize("api_base", ["https://api.together.ai/v1", "https://api.together.xyz/v1"])
tests/unit/llms/together_ai/chat/test_together_ai_chat_transformation.py:None
Routetest_completion_cost
pytest.mark.parametrize( "case", _pick( "anthropic_sonnet45", "azure_o3mini",
tests/unit/llms/base_llm/chat/test_provider_chat_translation.py:None
Routetest_completion_cost_defaults_to_zero_duration
patch("litellm.cost_calculator.openai_cost_per_second")
tests/unit/llms/openai/transcriptions/test_transcription_duration_hidden.py:None
Routetest_completion_cost_falls_back_to_response_duration
patch("litellm.cost_calculator.openai_cost_per_second")
tests/unit/llms/openai/transcriptions/test_transcription_duration_hidden.py:None
Routetest_completion_cost_prefers_measured_duration_over_provider_usage_duration
patch( # test-quality-ok: isolates duration selection from the model pricing table "litellm.cost_calc
tests/unit/llms/openai/transcriptions/test_transcription_duration_hidden.py:None
Routetest_completion_cost_uses_hidden_params_duration
patch("litellm.cost_calculator.openai_cost_per_second")
tests/unit/llms/openai/transcriptions/test_transcription_duration_hidden.py:None
Routetest_completion_cost_uses_only_the_request_tiers_long_context_rates
pytest.mark.parametrize( ("service_tier", "prompt_tokens", "input_rate", "output_rate"), ( pyt
tests/unit/litellm_core_utils/llm_cost_calc/test_utils.py:None
Routetest_completion_datarobot
patch.dict(os.environ, {}, clear=True)
tests/unit/llms/datarobot/test_datarobot.py:None
Routetest_completion_datarobot_with_deployment
patch.dict( os.environ, { "DATAROBOT_ENDPOINT": "https://app.datarobot.com/api/v2/deployments/
tests/unit/llms/datarobot/test_datarobot.py:None
Routetest_completion_deployment_not_mutated
pytest.mark.usefixtures("_vcr_outcome_gate_router_unit", "setup_and_teardown_router_unit")
tests/unit/test_router/test_router.py:None
Routetest_completion_github_copilot_mock_response
patch("litellm.llms.github_copilot.authenticator.Authenticator.get_api_key")
tests/unit/llms/github_copilot/test_github_copilot_transformation.py:None
Routetest_completion_non_streaming
patch("litellm.llms.custom_httpx.http_handler.get_httpx_client")
tests/unit/llms/azure_ai/claude/test_azure_anthropic_handler.py:None
Routetest_completion_on_unmapped_model_posts_converse_unless_its_id_names_an_invoke_provider
pytest.mark.parametrize( ("model", "model_path", "response_json"), [ ( "bedrock/us
tests/unit/llms/bedrock/test_bedrock_common_utils.py:None
Routetest_completion_reaches_its_deployment_whichever_earlier_deployment_is_deleted
pytest.mark.parametrize("deleted", [0, _TARGET - 1], ids=["first", "next-to-target"])
tests/integration/sdk/test_router_concurrent_deployment_delete_sdk.py:None
Routetest_completion_streaming
patch("litellm.llms.anthropic.chat.handler.make_sync_call")
tests/unit/llms/azure_ai/claude/test_azure_anthropic_handler.py:None
Routetest_completion_strips_an_unanswered_claude_tool_search_call_only_for_routes_that_reject_it
pytest.mark.parametrize( ("model", "route_kwargs", "url_pattern", "reply", "called_names", "sent_names"),
tests/unit/test_main.py:None
Routetest_completion_uses_azure_anthropic_config
patch("litellm.utils.ProviderConfigManager")
tests/unit/llms/azure_ai/claude/test_azure_anthropic_handler.py:None
Routetest_completion_with_tools_routes_to_responses_api
patch("litellm.completion_extras.responses_api_bridge.completion")
tests/unit/test_xai_responses_auto_routing.py:None
Routetest_completions_output_is_the_completion_text
meta( Subject( domain=Domain.OBSERVABILITY, route=Route.COMPLETIONS,
tests/e2e/logging/test_otel_v2_langfuse_generation_output_e2e.py:None
Routetest_complexity_router_decision_headers_never_falls_back_from_internal_metadata
pytest.mark.parametrize( "litellm_decision, metadata_decision, expected", [ ( {"ro
tests/unit/router_utils/test_add_retry_fallback_headers.py:None
Routetest_complexity_router_decision_headers_omits_absent_or_invalid_fields
pytest.mark.parametrize( "decision, expected", [ ( {"router_type": "complexity", "
tests/unit/router_utils/test_add_retry_fallback_headers.py:None
Routetest_complexity_router_registers_affinity_callback_for_deployment_pin
pytest.mark.parametrize( "complexity_router_config,expect_callback", [ ({"tiers": {"SIMPLE": "
tests/unit/test_router/test_router.py:None
Routetest_compliance_routes_open_to_non_admin_roles
pytest.mark.parametrize( "route", ["/compliance/eu-ai-act", "/compliance/gdpr"], )
tests/unit/proxy/auth/test_route_checks.py:None
← previousnext →2,101–2,200 of 5,595, ranked by callers