litellm/tests/integration/sdk
Mateo Wang 3ccc619792
fix(router): make the constructor stub work for mypy and guard it in CI (#50354)
* fix(router): make the constructor stub work for mypy and guard it in CI

Use a plain ParamSpec so mypy reads the stub, drop the dead _host parameter
the Rust core already refused, type check a valid and an unknown argument in
tests/e2e_harness, and run that type check when litellm Python files change.

* fix(typing): read type variables as type variables in mypy and guard the Router stub in lint

* fix(typing): count only the probe errors in the Router stub guard and flag Final type variables everywhere

* fix(lint): run the Router stub guard and e2e type check from make check

make check now runs check_router_constructor_stub.py when litellm/router.py
or uv.lock changes, and the e2e basedpyright step on pyproject.toml, uv.lock,
pyrightconfig.json, and litellm-proxy-extras Python, matching CI. CI's e2e
type check also fires on litellm-proxy-extras Python, which tests/e2e/perf
imports. LIT010 treats TypeAliasType like a type variable, since mypy also
rejects a Final type alias.

* fix(lint): guard the Router stub through the litellm export and keep TypeAliasType bare in LIT010 docs

* test: type the new LIT010 type variable tests
2026-11-22 21:25:00 +00:00
..
_model_cost_sdk_child.py refactor(model-cost): move the cost map inputs, fetch and register_model overlay into Rust (#50501) 2026-11-10 02:37:35 +00:00
conftest.py
test_aiohttp_session_rebuild_wire.py
test_anthropic_common_utils_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_anthropic_json_tool_cut_stream_sync_sdk.py fix(bedrock)!: keep Claude's thinking when response_format json_schema is set (#49696) 2026-11-05 04:07:11 +00:00
test_anthropic_messages_bridge_mid_stream_failure_sdk.py
test_azure_common_utils_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_azure_prompt_shield_tuple_messages.py
test_bedrock_converse_redacted_thinking_router_sdk.py
test_bedrock_converse_stream_sync_decoder_wire.py
test_bedrock_model_discovery_sdk.py
test_bedrock_native_guardrail_shared_metadata_sdk.py
test_bedrock_native_output_fallback_sdk.py
test_bedrock_native_output_register_model_sdk.py refactor(rust_bridge): route every Rust-to-Python call through host modules (#50822) 2026-11-11 01:57:54 +00:00
test_cache_control_census_pydantic_messages_sdk.py
test_caching_redis_sdk.py
test_callback_logging_cache.py
test_configuration_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_context_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_customer_model_policy_fallback_wire.py feat(customer-portal): complete hierarchy management (#51521) 2026-11-13 17:58:34 +00:00
test_databricks_json_schema_refs_sdk.py
test_device_code_login_guard_sdk.py test(copilot): align login guards with direct access tokens (#50285) 2026-11-05 15:38:33 -08:00
test_docker_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_drop_params_env_var_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_dual_cache_redis.py feat(redis): serve the router's session pins from a native store (#50870) 2026-11-13 03:22:28 +00:00
test_dynamic_queue_redis.py feat(router): coordinate congestion queues through Redis (#52367) 2026-11-17 19:29:39 -08:00
test_dynamic_queue_routing_redis.py feat(router): queue congested provider requests by priority (#51892) 2026-11-17 21:26:21 -08:00
test_eager_tiktoken_load_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_exa_search_envelope_sdk.py
test_gemini_long_decode_sync_sdk.py
test_gemini_tts_speech_logging_sdk.py
test_generic_api_callback.py
test_google_genai_adapter_stream_usage_sdk.py
test_http2_wire.py test(http2): drain client traffic after sending GOAWAY (#50972) 2026-11-10 18:31:57 +00:00
test_http_handler_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_huggingface_tokenizer_downloads_sdk.py
test_idle_upstream_reconnect_sdk.py
test_interception_converted_stream_options_sdk.py
test_jwt_signing_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_langfuse_otel_trace_fields_sdk.py
test_langfuse_redaction_sdk.py
test_lazy_imports_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_litellm_cli_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_local_sandbox_sdk.py
test_long_decode_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_model_cost_fetch_sdk.py fix(cost-map): restore backward compatibility after the Rust loader move (#51545) 2026-11-14 08:12:17 +09:00
test_model_cost_sdk.py refactor(model-cost): move the cost map inputs, fetch and register_model overlay into Rust (#50501) 2026-11-10 02:37:35 +00:00
test_ocr_matrix_sdk.py
test_ollama_embedding_wire.py
test_openai_realtime_http_ca_bundle_wire.py feat(realtime)!: support latest OpenAI audio models (#35600) 2026-11-03 07:27:52 +00:00
test_openai_sdk_client_sessions_wire.py fix(router): make the constructor stub work for mypy and guard it in CI (#50354) 2026-11-22 21:25:00 +00:00
test_owned_redis_ports.py
test_prometheus_copilot_session_auth_failure_sdk.py
test_provider_budget_redis.py
test_provider_error_and_extra_body_families_wire.py
test_raw_response_retention_sdk.py fix(logging): stop keeping a full response copy nobody reads (#52524) 2026-11-18 11:51:01 -08:00
test_redis_breaker_metrics_multiprocess_sdk.py
test_redis_cluster_iam_auth.py
test_redis_service_metrics.py
test_response_cache_sync_sdk.py
test_responses_bridge_stream_errors_sdk.py
test_responses_bridge_sync_reasoning_sdk.py
test_responses_bridge_tool_search_sdk.py
test_router_behavior_wire.py
test_router_budget_limiter_wire.py
test_router_concurrent_deployment_delete_sdk.py test(router): hold the concurrent upsert where its build reads the list back (#51878) 2026-11-14 23:57:30 +00:00
test_router_cooldown_fallback_sdk.py refactor(router): route the router family through RoutingContext and close the outside surface (#49118) 2026-10-30 19:18:54 -07:00
test_router_fuzz_regressions_rust_only_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_router_host_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_router_include_fallback_errors_wire.py test(router): expect no fallback errors header for non-bool include_fallback_errors (#50259) 2026-11-05 15:34:08 -08:00
test_router_lowest_latency_wire.py
test_router_redis_tls_url.py
test_router_session_pins_redis.py feat(redis): serve the router's session pins from a native store (#50870) 2026-11-13 03:22:28 +00:00
test_router_silent_model_shadow_sdk.py fix(logging): mark mirrored silent_model calls with is_silent_experiment in spend logs (#48888) 2026-10-29 05:12:50 -07:00
test_router_sync_stream_fallback_wire.py
test_router_tool_call_stream_fallback_budget_wire.py
test_router_unsupported_params_fallback_wire.py fix(router): honor fallback opt-out for 413 and 422 bad requests (#52195) 2026-11-16 21:51:23 -08:00
test_sagemaker_embedding_sdk.py
test_slack_daily_report_redis.py
test_speech_stream_sdk_wire.py feat(tts)!: stream audio from the provider as it arrives on /v1/audio/speech (#46222) 2026-11-17 15:03:12 +00:00
test_stream_error_api_base_sdk.py
test_stream_open_error_provider_headers_sdk.py
test_streaming_handler_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_sync_stream_connection_release_wire.py
test_text_completion_stream_rebuild_sdk.py
test_token_counter_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_tokenizer_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_tool_loop_responses_history_replay_sdk.py fix(responses): replay the original Responses item order, phase, and boundaries on the next chat turn (#48912) 2026-10-29 00:56:02 -07:00
test_tool_loop_server_tool_replay_sdk.py
test_topaz_image_variation_trailing_slash_sdk.py
test_unset_effort_tool_bridge_wire.py fix(responses): keep unset-effort gpt-5.4/5.5 tool calls on chat completions (#50968) 2026-11-10 18:33:27 +00:00
test_usage_based_routing_sdk_redis_reads.py test(integration): repair tests that merged changes left stale (#50782) 2026-11-10 01:08:35 +00:00
test_usage_routing_counter_ttl.py
test_vertex_batch_row_line_errors_sdk.py
test_vertex_gemini_image_batch_cost_sdk.py
test_vertex_gemini_stream_timeout_wire.py
test_vertex_partner_count_tokens_sdk.py