feat(router): bundle DeepSeek V4 tokenizer asset - #5377
Open
m199369309 wants to merge 9 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces an independent, token-aware router for DeepSeek-V4 on Xinference, including persistent SQLite storage for router configurations, an in-memory runtime registry, and RESTful endpoints for management and validation. Feedback on the changes highlights a potential resource leak in the chat completion proxy if non-HTTP exceptions occur before the client is closed, as well as a potential AttributeError in the supervisor's validation logic if process metadata is missing or null.
m199369309
force-pushed
the
feat/router-deepseek-tokenizer-asset
branch
4 times, most recently
from
August 18, 2026 18:08
92b6dfc to
7501a2b
Compare
- P1-1: stop executing asset Python in the Supervisor; validation is static (manifest, checksum, path safety, file hashes) and smoke tests are removed. - P1-2: Router workers measure the asset fingerprint and asset.json revision after real loading and report them through the heartbeat; the Supervisor compares against measured values, with TOCTOU checks. - P2: propagate asset capabilities into RouterConfig and enforce them on the request path (tools/thinking) and during rule validation.
The CI optional deps (diffusers -> huggingface-hub>=1.23) resolve click to 8.4.x, which removed CliRunner(mix_stderr=...) and captures stdout/stderr separately by default. The two failing cmdline tests assumed click <8.2 semantics: - test_cmdline_model_path_error: drop mix_stderr=False (unused by the test). - test_cmdline_of_custom_model: assert on result.output (combined streams on both click <8.2 mix_stderr default and click >=8.4 capture='sys'), since list_model_registrations writes its table to stderr.
m199369309
force-pushed
the
feat/router-deepseek-tokenizer-asset
branch
from
August 21, 2026 01:22
fcc05b9 to
1b9f58b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dependency
Depends on #5376
Depends on #5371
Please merge the prerequisite PRs first. This PR is intentionally stacked and targets
mainfor review.Validation
pytest -q xinference/core/tests/test_tokenizer_asset_registry.py xinference/router/tests/test_config.py xinference/router/tests/test_runtime.py(28 passed)Please review now if convenient, but merge only after the dependency PRs have landed.