litellm/tests/test_litellm/proxy
tin-berri df73c623b2
feat(router): limit heuristic_v2 auto-routers to one without the auto_router license feature (#39468)
Without the auto_router feature in the signed enterprise license a proxy may hold
one complexity router with classifier_type heuristic_v2 across config.yaml and the
DB; with it the limit is lifted. The ceiling is derived once from LicenseCheck and
handed to the Router, which refuses the extra router at registration. config.yaml
over the limit refuses to start, and /model/new, /model/update and
PATCH /model/{id}/update refuse the write with a 403 before touching the DB.
Expiry follows the existing max_users/max_teams pattern: judged when the
license is verified, not on every call, and a verify that rejects the license
(expired or unreadable) leaves no signed payload behind. The rollback after a
failed upsert re-admits state that was already serving, so it is exempt from the
ceiling: an edit that fails, including one refused by a ceiling that has since
tightened, leaves the router serving its previous configuration.
A write that leaves a row on heuristic_v2 under a limited license runs in one
transaction that takes a Postgres advisory lock before counting the DB rows plus
this proxy's config.yaml routers, so concurrent writes on any pod cannot both
claim the sole slot and no surplus row is ever persisted.
Only the row insert runs under that lock: the team model bookkeeping, which
needs a second pool connection, runs after the transaction has committed.
PATCH /model/{id}/update follows the same order as create: the row is written
through the slot first and the team's model list is updated only afterwards, so
a refused write leaves the team as it was.
The slot transaction bypasses the repository's publish-on-write, so it
publishes the config change once after commit, as delete_team_models does.
2026-09-03 13:39:58 -07:00
..
_experimental/mcp_server fix(mcp): scope allow-all servers to virtual keys (#39531) 2026-09-03 10:32:03 -07:00
a2a fix(a2a): reject malformed protocolVersion suffixes while keeping semver prereleases 2026-07-21 13:24:58 -07:00
agent_endpoints test(agents): make the make_public regression tests fail without the fix 2026-09-03 05:21:42 -07:00
analytics_endpoints feat(ui): add error-code drilldown for failed requests on caching page 2026-08-24 15:45:45 -07:00
anthropic_endpoints fix(proxy): handle CRLF and CR SSE frame terminators and flush held tail in anthropic stream restamper 2026-09-01 12:16:27 -07:00
auth feat(router): limit heuristic_v2 auto-routers to one without the auto_router license feature (#39468) 2026-09-03 13:39:58 -07:00
batches_endpoints test: add regression coverage for twelve closed issues (#37974) 2026-08-22 22:24:05 +00:00
client feat(cli): enable Claude Code gateway model discovery by default in lite claude (#39445) 2026-09-03 08:38:25 -07:00
common_utils Merge branch 'litellm_window_spend_schema' into litellm_window_spend_writer 2026-08-29 16:23:45 -07:00
config_resolvers feat(proxy): add SAML 2.0 SSO for the admin UI (#31429) 2026-07-24 12:51:28 -07:00
credential_endpoints Merge branch 'litellm_internal_staging' into fix-credential-endpoints-raise-not-return 2026-09-03 05:36:50 -07:00
db fix(proxy/db): translate libpq sslrootcert and verify-* into Prisma's strict TLS params (#39563) 2026-09-03 10:27:46 -07:00
discovery_endpoints feat(auth): enforce configurable password policy and SSO-only login (#39381) 2026-09-02 14:28:13 -07:00
enterprise_billing feat(proxy): push-based OTLP billable-request metering for enterprise deployments (#31592) 2026-07-15 12:12:52 -07:00
experimental/mcp_server test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
fine_tuning_endpoints test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
google_endpoints test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
guardrails Merge pull request #38808 from BerriAI/litellm_headroom_ccr_streaming_responses 2026-09-03 13:13:18 -07:00
health_endpoints fix(health): honor allow_requests_on_db_unavailable in readiness probe (#37640) 2026-08-29 10:17:12 -07:00
hooks refactor(proxy): bound the budget window seed by time instead of request ids 2026-08-29 17:13:26 -07:00
image_endpoints test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
list_api feat(proxy): add paginated GET /public/v1/model_hub (#38636) 2026-08-28 10:02:59 -07:00
logging_endpoints feat(proxy): add POST /v1/callbacks/logs to replay logging payloads through callbacks (#31134) 2026-06-24 15:25:10 -07:00
management_endpoints feat(router): limit heuristic_v2 auto-routers to one without the auto_router license feature (#39468) 2026-09-03 13:39:58 -07:00
management_helpers fix: 1.99.0-rc2 UI bug batch (empty org on key create, session pagination, access group rename/delete) (#39436) 2026-09-03 08:58:48 -07:00
memory fix(memory): return 404 when the memory row vanishes before delete 2026-08-25 16:20:17 -07:00
middleware feat(proxy): add Amazon Comprehend Medical passthrough provider 2026-08-17 15:44:06 -07:00
ocr_endpoints fix(ocr): validate body req_format in the proxy endpoint and run its tests in CI 2026-08-17 18:29:35 +00:00
openai_files_endpoint fix(security): restrict and validate file uploads at /v1/files and /upload/logo (#39379) 2026-09-02 14:27:46 -07:00
pass_through_endpoints Merge pull request #39597 from BerriAI/litellm_lit6642_vertex_count_tokens_anthropic_beta 2026-09-03 13:13:11 -07:00
policy_engine fix(policy_engine): restore request guardrails list after pipeline allow 2026-08-31 16:38:44 -07:00
prompts fix(prompts): propagate prompt deletes to every worker and pod 2026-08-26 18:01:08 -07:00
proxy_server feat(router): limit heuristic_v2 auto-routers to one without the auto_router license feature (#39468) 2026-09-03 13:39:58 -07:00
public_endpoints feat(ui): add 1M context auto-router preset (#39490) 2026-09-02 22:33:14 -07:00
rag_endpoints fix(vector_stores): block caller-supplied embedding selection params on query surfaces 2026-09-01 13:29:25 -07:00
realtime_endpoints test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
rerank_endpoints fix(rerank): emit latency and cost headers on /rerank (#35419) 2026-08-25 15:54:25 -07:00
response_api_endpoints fix(count_tokens): preserve image inputs when counting Responses API tokens 2026-08-31 12:43:17 -07:00
shutdown
spend_tracking Merge pull request #39598 from BerriAI/litellm_lit_4929_session_token_aggregation 2026-09-03 12:57:27 -07:00
test_configs
types_utils fix(proxy): resolve router_settings.plugins dotted paths and load plugins from installed packages (#33644) 2026-07-17 11:23:18 -07:00
ui_crud_endpoints feat(mcp): semantic tool search for the native MCP Gateway (#39404) 2026-09-02 15:09:44 -07:00
utils fix(proxy): deliver budget alerts on webhook-only alerting and accept ALERTING_WEBHOOK_URL (#38441) 2026-08-31 09:22:36 -07:00
vector_store_endpoints fix(vector_stores): only list vector stores the caller was granted (#39612) 2026-09-03 13:17:48 -07:00
vector_store_files_endpoints test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
video_endpoints fix(videos): forward uploaded source file on /v1/videos/edits to the provider 2026-08-24 15:34:21 -07:00
__init__.py
conftest.py test(proxy): keep a leaked llm_router out of the next test in the worker 2026-08-20 23:19:17 -07:00
test__types.py test(proxy): pin the request-validation contracts in proxy/_types.py 2026-08-25 23:29:26 -07:00
test_aiohttp_cleanup_closed.py
test_aiohttp_session_recovery.py
test_api_key_masking_in_errors.py
test_audio_speech_prometheus_hooks.py fix(proxy): match /v1/audio/speech content-type to the returned audio format 2026-08-29 13:44:43 -07:00
test_batch_expiry.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_batch_metadata_none_fix.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_batch_retrieve_bedrock.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_batch_x_litellm_model_encoding.py test(proxy): give the x-litellm-model fallback test deterministic openai env creds 2026-08-17 12:42:57 -07:00
test_blocked_response_usage.py fix(responses_api): map bridged chat usage on guardrail-blocked replies 2026-08-14 17:04:27 -07:00
test_budget_reservation.py fix(budget): reject known estimates over remaining budget under fail_closed_budget_enforcement (#39214) 2026-09-01 16:13:26 -07:00
test_caching_routes.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_chat_completion_metadata.py
test_claude_code_marketplace.py test: run the 30 test files stranded in the second mirror (#37595) 2026-08-20 10:59:43 -07:00
test_common_request_processing.py fix(proxy): stop leaking internal exception details to clients (#39380) 2026-09-02 17:32:00 -07:00
test_component_allowlists.py feat(proxy): authenticate to Azure Postgres with Microsoft Entra ID tokens 2026-08-20 11:50:16 -07:00
test_conftest.py test(proxy): stop monkeypatch.undo re-planting fixture-mocked prisma_client 2026-08-13 20:11:06 -07:00
test_cors_config.py
test_custom_proxy.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_dynamic_mcp_route.py fix(proxy): serve aggregate MCP endpoint on bare /mcp instead of 307-redirecting (#34845) 2026-08-14 17:04:32 -07:00
test_empty_model_list.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_enforce_user_param.py test: require a match= on broad pytest.raises, and drop duplicate parametrize cases (#37769) 2026-08-20 20:24:49 -07:00
test_fallback_management_endpoints.py
test_fastapi_offline_routes.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_filter_models_by_team_access_group.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_health_check_functions.py feat(health): opt-in model-group allowlist for background health checks and health-check routing (#38539) 2026-08-27 12:25:56 -07:00
test_health_check_max_tokens.py fix(proxy): derive auto-router health from its underlying models (#38174) 2026-08-26 16:41:54 -07:00
test_init_litellm_callbacks.py test: run the 30 test files stranded in the second mirror (#37595) 2026-08-20 10:59:43 -07:00
test_langfuse_passthrough_security.py
test_lazy_openapi_snapshot.py refactor(proxy): type the snapshot fragments and wrap a long test line 2026-08-26 14:39:51 -07:00
test_litellm_pre_call_utils.py fix(spend_tracking): add missing_session_id: omit to leave SpendLogs.session_id null without a client session (#39458) 2026-09-03 11:57:56 -07:00
test_max_budget_env_var.py
test_mcp_asgi_response.py
test_model_based_routing_files_batches.py
test_model_deprecations_endpoint.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_model_dump_with_preserved_fields.py
test_model_id_header_propagation.py feat(proxy): add x-litellm-model-name response header with deployment model string (#33698) 2026-07-17 20:29:42 -07:00
test_model_info_default_limits.py
test_model_level_guardrails.py fix(proxy): apply key/team router_settings.model_group_alias (#35486) 2026-08-03 22:09:47 +00:00
test_model_list_healthy_only.py feat(proxy): hide unhealthy models from model listings, opt-in 2026-08-26 00:13:52 -07:00
test_modify_response_streaming_passthrough.py fix(proxy): use e.request_data for logging_obj in ModifyResponseException streaming passthrough (#30800) 2026-06-18 23:29:08 -07:00
test_openai_ws_passthrough_routes.py fix(proxy): close websocket cleanly when OpenAI credentials are missing 2026-08-16 14:40:37 -07:00
test_openapi_schema_validation.py
test_plugin_routes.py feat: litellm plugin architecture v2 (#30688) 2026-06-20 20:37:22 -07:00
test_pricing_field_strip.py fix(proxy): fold litellm_metadata into metadata on chat routes so tag routing sees merged tags 2026-08-29 00:42:43 -07:00
test_prisma_engine_watchdog.py test: run the 30 test files stranded in the second mirror (#37595) 2026-08-20 10:59:43 -07:00
test_prisma_migration.py fix(proxy): keep a failed prisma generate from failing the migration entrypoint (#37947) 2026-08-22 11:45:19 -07:00
test_prometheus_cleanup.py
test_provider_url_destination_guard.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_proxy_cli.py fix(proxy/db): translate libpq sslrootcert and verify-* into Prisma's strict TLS params (#39563) 2026-09-03 10:27:46 -07:00
test_proxy_logging_hook_detection.py fix(guardrails): match deferred stream dispatch shape per stream owner and defer passthrough logging until guardrail eos 2026-08-29 02:23:12 -07:00
test_proxy_server.py fix(proxy): mark session/SSO/SAML cookies Secure behind a TLS-terminating reverse proxy (#39391) 2026-09-02 16:42:29 -07:00
test_proxy_types.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_proxy_utils.py fix(proxy): expose configured model mode 2026-09-03 12:40:22 -07:00
test_pyroscope.py
test_read_model_list.py feat: add minimal rust router + axum ai-gateway calling router.realtime (2/2) (#31135) 2026-06-23 19:16:34 -07:00
test_redis_auth_cache_flag.py fix(proxy): share per-model budget counters across replicas through the spend counter cache (#39375) 2026-09-02 12:40:59 -07:00
test_response_model_sanitization.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_route_a2a_models.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_route_llm_request.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_sensitive_route_auth.py
test_shared_health_check.py fix(proxy): derive auto-router health from its underlying models (#38174) 2026-08-26 16:41:54 -07:00
test_spend_log_cleanup.py test: require a match= on broad pytest.raises, and drop duplicate parametrize cases (#37769) 2026-08-20 20:24:49 -07:00
test_swagger_chat_completions.py
test_team_member_update.py
test_team_org_move.py test: require a match= on broad pytest.raises, and drop duplicate parametrize cases (#37769) 2026-08-20 20:24:49 -07:00
test_tools_allowlist_enforcement.py fix(anthropic): close hybrid tool-name allowlist gap and keep native tools through guardrails 2026-08-26 20:37:11 -07:00
test_update_llm_router_resilience.py feat(complexity_router): custom classifier plugins via classifier_type 'custom' (#37249) 2026-08-18 14:09:19 -07:00