Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/vllm_router/dynamic_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ def reconfigure_service_discovery(self, config: DynamicRouterConfig):
ServiceDiscoveryType.STATIC,
urls=parse_static_urls(config.static_backends),
models=parse_comma_separated_args(config.static_models),
app=self.app

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The config.static_aliases from DynamicRouterConfig is not being passed to reconfigure_service_discovery. This means that model aliases will not be updated during a dynamic reconfiguration, which is a bug.

Pass the parsed aliases to reconfigure_service_discovery.

Suggested change
app=self.app
app=self.app,
aliases=(
parse_static_aliases(config.static_aliases)
if config.static_aliases
else None
),

)
elif config.service_discovery == "k8s":
reconfigure_service_discovery(
Expand Down
12 changes: 6 additions & 6 deletions src/vllm_router/service_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,12 @@ def __init__(
app,
urls: List[str],
models: List[str],
aliases: List[str] | None,
model_labels: List[str] | None,
model_types: List[str] | None,
static_backend_health_checks: bool,
prefill_model_labels: List[str] | None,
decode_model_labels: List[str] | None,
aliases: List[str] | None=None,
model_labels: List[str] | None=None,
model_types: List[str] | None=None,
static_backend_health_checks: bool=False,
prefill_model_labels: List[str] | None=None,
decode_model_labels: List[str] | None=None,
):
self.app = app
assert len(urls) == len(models), "URLs and models should have the same length"
Expand Down