fix(core): normalize options before sharded model dispatch #6145
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 378 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.355
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #6145"
general
weight: 0.35
Jackmeson1
In supervisor/worker mode, launches with
n_worker > 1and noreplica_configdispatch before supervisor-owned Xavier options are processed. Explicit defaults such asenable_xavier=Falseandxavier_cache_backend="native"therefore reach workers as model configuration, unlike omitted options.Consume these options before dispatch using the existing cache, transport and GPU-budget validators. Keep single-worker setup and actor allocation in place.
| Configuration | Before | After |
| --- | --- | --- |
| Omitted options versus explicit disabled/native/default-transport options | Different worker configuration | Identical sharded dispatch arguments |
| Bare
enable_xavier=Truewith vLLM, SGLang or MLX | Dispatched with the flag but without Xavier setup | Rejected before dispatch: Xavier requires one worker per replica || NIXL through either transport keyword without P/D roles | Dispatched | Rejected before dispatch |
| Nonempty native backend configuration or cache budgets without active Xavier, including a zero GPU budget | Dispatched | Rejected before dispatch |
| Plain TRT-LLM sharding | Dispatched before its existing one-worker restriction | Rejected before dispatch |
Explicit replica configurations, including P/D and mixed-engine groups, are already rejected before this branch. LMCache sharding and explicit weight caching are also already blocked. Local deployment reduces
n_workerto one. The option cleanup also applies to Transformers and llama.cpp without adding engine support.A CPU replay of captured worker options through a single-worker
VLLMModel.load()observed six extra supervisor options at anAsyncEngineArgsobservation stub on base; explicit-default and omitted arguments matched after normalization. The replay omits shard metadata. Native sharded-engine failure remains unverified.Nine cases in
xinference/core/tests/test_pd_launch.pycover default equivalence and rejection before dispatch for unsupported options. The explicit Xavier regression covers vLLM, SGLang and MLX using real supervisor dispatch with mocked workers and asserts zero worker RPCs. Existing LMCache and P/D coverage remains in place.VALIDATION: On Ubuntu 24.04.5 at
ef0e1723(base4c800139; the last commit was checked againstedf6011f),xinference/core/tests/test_pd_launch.pypasses 233/233 on Python 3.12.3 with Transformers 5.23.0, on Python 3.12.3 with the Transformers 4.57.6 CI pin, and on Python 3.10.22; with the production file reverted toedf6011f, the explicit-enable cases fail. On Python 3.12, the test modules that exercise the changed module, including the real-clusterxinference/core/tests/test_restful_api.py, give 2011 passed, 7 failed and 24 skipped; no test fails there that does not also fail on the previous head in that environment. Pre-commit (isort, mypy, codespell) passes on the changed files, and mypy over all 1180 source files reports no issues.AI disclosure: this was prepared with AI assistance (Claude Opus 5.5 and Claude Sonnet 5.5).