Skip to content

feat(router): add Agent-based Router orchestration - #5379

Open
m199369309 wants to merge 8 commits into
xorbitsai:mainfrom
m199369309:feat/router-agent-orchestration
Open

feat(router): add Agent-based Router orchestration#5379
m199369309 wants to merge 8 commits into
xorbitsai:mainfrom
m199369309:feat/router-agent-orchestration

Conversation

@m199369309

@m199369309 m199369309 commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add Supervisor-managed Token Router nodes, deployments, assignments, and reconciliation
  • add the standalone xinference-router-agent service with runtime process and tokenizer asset lifecycle management
  • expose Agent/orchestration APIs, lifecycle state, desired/observed generations, and runtime health metadata
  • add Router-specific structured logging and process resource metrics
  • add focused API, core, and runtime tests

Dependency

Depends on #5376
Depends on #5377

This PR intentionally targets main; maintainers can merge it after the dependencies above are merged.

Validation

  • pre-commit run --files <all changed files>
  • focused orchestration/asset/agent/API suite: 41 passed
  • expanded focused suite reached 186 passed, 1 skipped; the process was interrupted after the repository's known async API teardown hang
  • post-format targeted suite reached 58 passed; the process was interrupted after the same teardown hang

Please review now if convenient, but merge only after the dependency PRs have landed.

@XprobeBot XprobeBot added this to the v3.x milestone Aug 18, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces an independent, token-aware router for DeepSeek-V4 on Xinference, including a Supervisor orchestration controller, a desired-state scheduler, a runtime registry, and an Agent service for managing local router processes. It also adds example systemd service configurations, documentation, and comprehensive unit tests. The review feedback highlights several critical robustness improvements, such as preventing connection leaks in the chat completion proxy, ensuring process termination during Agent shutdown even if status reporting fails, and adding defensive guards against null values in capabilities and message tokenization.

Comment thread xinference/api/restful_api.py Outdated
Comment thread xinference/router/agent/process_manager.py Outdated
Comment thread xinference/core/router_scheduler.py Outdated
Comment thread xinference/router/tokenizer.py
Comment thread xinference/core/router_orchestration.py Outdated
@m199369309
m199369309 force-pushed the feat/router-agent-orchestration branch from 237e7dc to 44275a3 Compare August 21, 2026 17:00

@qinxuye qinxuye left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants