← Back to Pull requests

fix(core): normalize options before sharded model dispatch #6145

Closed
unknown closed this pull request without merging on Nov 18, 2026 13:37 UTC
View on GitHub
unknown unknown commented on Nov 16, 2026 18:35 UTC
Author

In supervisor/worker mode, launches with n_worker > 1 and no replica_config dispatch before supervisor-owned Xavier options are processed. Explicit defaults such as enable_xavier=False and xavier_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=True with 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_worker to 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 an AsyncEngineArgs observation 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.py cover 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 (base 4c800139; the last commit was checked against edf6011f), xinference/core/tests/test_pd_launch.py passes 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 to edf6011f, the explicit-enable cases fail. On Python 3.12, the test modules that exercise the changed module, including the real-cluster xinference/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).

Diff: 378 lines (+283 / -95) across 4 files Reviewer: Jackmeson1 Review duration: 2581m
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
0.48
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 47.9% (MEDIUM) · Higher = larger blast radius
47.9%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 18.9% · Safe to merge
18.9%