From 7c0cf3bcd0867b5420e6ad4f2ff6b2b25e73b022 Mon Sep 17 00:00:00 2001 From: Sage Moore Date: Thu, 19 Mar 2026 07:42:57 -0700 Subject: [PATCH] Cap the number of API servers to 1 when using Elastic EP. (#37466) Signed-off-by: Sage Moore --- vllm/entrypoints/cli/serve.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vllm/entrypoints/cli/serve.py b/vllm/entrypoints/cli/serve.py index 649bdb36f7..195b945bcb 100644 --- a/vllm/entrypoints/cli/serve.py +++ b/vllm/entrypoints/cli/serve.py @@ -108,6 +108,15 @@ class ServeSubcommand(CLISubcommand): args.api_server_count, ) + # Elastic EP currently only supports running with at most one API server. + if getattr(args, "enable_elastic_ep", False) and args.api_server_count > 1: + logger.warning( + "Elastic EP only supports running with with at most one API server. " + "Capping api_server_count from %d to 1.", + args.api_server_count, + ) + args.api_server_count = 1 + if args.api_server_count < 1: run_headless(args) elif args.api_server_count > 1: