feat(monitoring): add Token Router observability - #5381
Open
m199369309 wants to merge 29 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive Token Router feature for DeepSeek-V4 in Xinference, including orchestration, scheduling, and deployment management on the Supervisor, along with independent Router Agent and Runtime services. It also adds localized Grafana dashboards, Prometheus alert rules, Filebeat logging configurations, and extensive unit tests. Feedback on the changes highlights a high-severity issue in _proxy_token_router_chat_completion where the asynchronous HTTP client could leak its connection pool if an exception other than httpx.HTTPError (such as asyncio.CancelledError) is raised during client.send before the response stream takes ownership.
m199369309
force-pushed
the
feat/token-router-monitoring
branch
3 times, most recently
from
August 18, 2026 18:08
2a7fa83 to
ccf9dff
Compare
…deepseek-tokenizer-asset # Conflicts: # xinference/core/supervisor.py
…agent-orchestration # Conflicts: # xinference/api/tests/test_token_router_api.py # xinference/core/supervisor.py # xinference/router/app.py
…agent-orchestration
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
Scope
This PR is intentionally limited to Token Router observability. It does not include the separate generic model-replica lifecycle, placement, recovery, or model-load dashboard changes from the local customization history.
Dependencies
Depends on #5375
Depends on #5379
Please review now if convenient, but merge only after the dependency PRs have landed.
Validation
pytestfocused monitoring/router/API suite: 42 passednpm cinpm run lint(existing repository warnings only)npm run buildpre-commit run --files <all changed files>compileallfor changed runtime, API, metrics, and test modulesA broader combined async test invocation reproduced the repository's existing asyncio teardown hang after its completed tests had passed; the focused changed-code suite above completes successfully.