Repository navigation
[Bugfix][Router] Keep P/D model labels when dynamic config reloads the router - #1129
Conversation
…e router DynamicConfigWatcher.reconfigure_routing_logic rebuilt the router without prefill_model_labels / decode_model_labels, although DynamicRouterConfig carries them and the service discovery reconfigure already passes them. After any reload, disaggregated_prefill_orchestrated returned 503 for every request and disaggregated_prefill raised TypeError. The watcher's first pass usually sees the file as changed, so this also hit right at startup. Fixes vllm-project#1128 Assisted-by: Claude Code claude-opus-5-5 Signed-off-by: MinJun Choi <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request updates the dynamic configuration watcher to pass parsed prefill and decode model labels when reconfiguring the routing logic. It also introduces a new test suite to verify that these labels are correctly retained during reconfiguration. There are no review comments to address, and no further feedback is provided.
chrikrah
left a comment
There was a problem hiding this comment.
@theminjunchoi approving at e033fc4. Both new cases fail with dynamic_config.py reverted to 4e076e8 and pass with the change, and initialize_routing_logic reads the two labels with kwargs.get, so the other routing logics do not see them.
My own #1094 edits from_args in the same file. With both applied on e033fc4, its test file and yours give 4 passed.
non-blocking, out of scope here: the same reload still drops kv_aware_threshold, loadaware_beta, prefix_min_match_length, the lmcache_* settings and max_instance_failover_reroute_attempts, because DynamicRouterConfig has no fields for them. The last one drops from 3 to 0 in the probe below.
$ PYTHONPATH=src python -m pytest src/tests/test_dynamic_config.py -q -p no:cacheprovider # tree at e033fc4, CPython 3.12
2 passed in 1.01s
$ # same command, src/vllm_router/dynamic_config.py from 4e076e8, test kept
E AssertionError: assert None == ['prefill-a', 'prefill-b']
E AssertionError: assert [] == ['prefill-a', 'prefill-b']
FAILED src/tests/test_dynamic_config.py::test_reconfigure_routing_logic_keeps_prefill_decode_labels[disaggregated_prefill]
FAILED src/tests/test_dynamic_config.py::test_reconfigure_routing_logic_keeps_prefill_decode_labels[disaggregated_prefill_orchestrated]
$ # tree at e033fc4 plus the #1094 diff (git diff ebbb862 0944774 | patch -p1, applies clean)
$ PYTHONPATH=src python -m pytest src/tests/test_dynamic_config.py src/tests/test_dynamic_config_from_args.py -q -p no:cacheprovider
4 passed, 1 warning in 1.04s
$ # probe, tree at e033fc4: initialize_routing_logic("roundrobin", max_instance_failover_reroute_attempts=3),
$ # then DynamicConfigWatcher.reconfigure_routing_logic with a roundrobin DynamicRouterConfig
$ PYTHONPATH=src python probe_reload.py
startup: 3
after reload: 0
# not run: the end-to-end repro from #1128 with two fake backends
@ruizhang0101, could you take a look? It closes #1128 and adds two keyword arguments to one call.
|
Hi @ruizhang0101, this one has an approval from @chrikrah and CI is green. Could you take a look when you have a chance? Happy to make any changes if needed. Thanks! |
|
Hi @ruizhang0101, thanks for enabling auto-merge! It looks like it's stuck on the Gatekeeper check. That job failed while Multiple-Models was failing, and it didn't run again after you re-ran Multiple-Models, which passed. Would you mind re-running the "All Checks Passed" job when you have a moment? Thank you! |
* [Bugfix][Router] Read vllm:kv_cache_usage_perc for KV cache usage (vllm-project#1118) Signed-off-by: Muhammad Ibrahim <[email protected]> * [Doc] Add Simplified Chinese translation (README.zh.md) (vllm-project#1136) Signed-off-by: YE <[email protected]> * [CI/Build] Run helm unittest in CI and fix two broken tests (vllm-project#1131) Signed-off-by: zjjkee <[email protected]> * [Bugfix][Router] Key request stats by dispatch, not by X-Request-Id (vllm-project#1115) Signed-off-by: David-Wu1119 <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Rui Zhang <[email protected]> * [Bugfix][Router] Use least-inflight for PrefixAware below-threshold fallback (vllm-project#1089) Signed-off-by: Dundy Pasupuleti <[email protected]> * [Bugfix][Router] Keep P/D model labels when dynamic config reloads the router (vllm-project#1129) Signed-off-by: MinJun Choi <[email protected]> * [Bugfix] Match KEDA scalers to enabled model deployments (vllm-project#1142) Signed-off-by: bojiang-li <[email protected]> * [Router] added pooling route (vllm-project#1112) Signed-off-by: [email protected] <[email protected]> Co-authored-by: [email protected] <[email protected]> Co-authored-by: Rui Zhang <[email protected]> * [CI] Drop host docker prune from runner-cleanup workflow (vllm-project#1174) Signed-off-by: Rui Zhang <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> * [Feat][Router] Add /v1/systemone and /v1/decisions routes (vllm-project#1173) Signed-off-by: Shern Shiou Tan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> * [CI/Build] Stop k8s routing tests when the engine pods never become ready (vllm-project#1134) Signed-off-by: MinJun Choi <[email protected]> * [Bugfix][Router] Upgrade aiohttp and vllm (0.33.0) to resolve router image CVEs (vllm-project#1185) Signed-off-by: Shern Shiou Tan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> * Bump chart version to 0.1.14 (vllm-project#1190) Signed-off-by: Rui Zhang <[email protected]> --------- Signed-off-by: Muhammad Ibrahim <[email protected]> Signed-off-by: YE <[email protected]> Signed-off-by: zjjkee <[email protected]> Signed-off-by: David-Wu1119 <[email protected]> Signed-off-by: Dundy Pasupuleti <[email protected]> Signed-off-by: MinJun Choi <[email protected]> Signed-off-by: bojiang-li <[email protected]> Signed-off-by: [email protected] <[email protected]> Signed-off-by: Rui Zhang <[email protected]> Signed-off-by: Shern Shiou Tan <[email protected]> Signed-off-by: MinJun Choi <[email protected]> Signed-off-by: Rui Zhang <[email protected]> Signed-off-by: Bernardo Donadio <[email protected]> Co-authored-by: Muhammad Ibrahim <[email protected]> Co-authored-by: YE <[email protected]> Co-authored-by: Jingke zou <[email protected]> Co-authored-by: Yanze (David) Wu <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Rui Zhang <[email protected]> Co-authored-by: Dundy Pasupuleti <[email protected]> Co-authored-by: MinJun Choi <[email protected]> Co-authored-by: Bojiang Li <[email protected]> Co-authored-by: MaelvanDijk <[email protected]> Co-authored-by: [email protected] <[email protected]> Co-authored-by: Shern Shiou Tan <[email protected]>
DynamicConfigWatcher.reconfigure_routing_logicrebuilds the router on every reload but never passesprefill_model_labels/decode_model_labels.DynamicRouterConfighas both fields and the service discovery reconfigure already uses them, so only the router loses them. After a reload,disaggregated_prefill_orchestratedreturns 503 for every request anddisaggregated_prefillraisesTypeError. The watcher's first pass usually treats the file as changed, so this shows up right at startup too.This passes the two labels, parsed the same way as the service discovery reconfigure.
src/tests/test_dynamic_config.pycovers both P/D routing logics. It fails on main (None/[]labels) and passes with this change.src/tests: 266 passed. pre-commit passes on the changed files.This is separate from #1094, which fixes
from_args. With #1094 alone the 503 still happens.FIX #1128
-swhen doinggit commit[Bugfix],[Feat], and[CI].