Repository navigation
fix: refresh worker models every 20 seconds by default - #58
Conversation
| let handle = tokio::spawn(async move { | ||
| const LOAD_RESET_INTERVAL: u64 = 10; | ||
| const MODEL_REFRESH_INTERVAL: u64 = 5; | ||
| const MODEL_REFRESH_INTERVAL: u64 = 1; |
There was a problem hiding this comment.
🟠 High core/worker_registry.rs:477
Health checks are continuously delayed when multiple /v1/models requests stall, so failed workers can remain marked healthy and continue receiving traffic. With MODEL_REFRESH_INTERVAL set to 1, every health-check cycle performs sequential discovery requests, each potentially taking five seconds; restore the less frequent refresh interval (or decouple discovery from health checks).
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @src/core/worker_registry.rs around line 477:
Health checks are continuously delayed when multiple `/v1/models` requests stall, so failed workers can remain marked healthy and continue receiving traffic. With `MODEL_REFRESH_INTERVAL` set to `1`, every health-check cycle performs sequential discovery requests, each potentially taking five seconds; restore the less frequent refresh interval (or decouple discovery from health checks).
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — The PR changes production health-check and model-discovery cadence, causing every default health cycle to perform potentially slow sequential Not approved because:
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
Release the faster worker model refresh from #58. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Release the faster worker model refresh from #58. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
## Summary - Bump `vllm-router` from 0.2.1 to [0.2.2](https://github.com/PrimeIntellect-ai/router/releases/tag/v0.2.2) (amd64 and arm64 release wheels). - The new router picks up PrimeIntellect-ai/router#58. The default health-check interval drops from 60s to 20s, and every health-check cycle refreshes `/v1/models`. Workers that are still loading at startup no longer stay under `unknown` and miss model-filtered traffic for minutes. ## Verification - `uv lock` resolves with `vllm-router v0.2.1 -> v0.2.2`. - Installed router reports version `0.2.2` and `RouterArgs.health_check_interval_secs == 20`. - Ran 5 steps of `configs/basic/reverse-text/rl.toml` single-node on SLURM (H200) through the router: 5/5 steps, 0% rollout errors, no tracebacks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches the disaggregated inference routing dependency only, but the new router changes health-check timing and worker/model discovery behavior on the critical vLLM serving path. > > **Overview** > Upgrades the pinned **`vllm-router`** wheels from **0.2.1** to **0.2.2** for Linux **x86_64** and **aarch64** in `pyproject.toml`, with matching **`uv.lock`** updates (version, download URLs, and wheel hashes). > > Installs that use the **`disagg`** extra (and related GPU/disagg resolution paths) will pull the new router release instead of 0.2.1. No in-repo application code changes—only dependency resolution. > > The **0.2.2** router (PrimeIntellect-ai/router#58) shortens the default health-check interval (**60s → 20s**), refreshes **`/v1/models`** on each health cycle, and avoids workers staying **`unknown`** while still loading at startup (so model-filtered traffic is not skipped for long periods). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f8087ad. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Workers that are still loading during startup can be indexed under
unknownand receive no model-filtered traffic until model discovery runs again. Refresh/v1/modelson every runtime health-check cycle instead of every fifth cycle, and lower the default cycle interval from 60 to 20 seconds.The six-line change updates the Rust config, Rust CLI, Python binding and Python CLI defaults, the documented default, and the model refresh interval. Existing filtering to healthy workers and deduplication by DP base URL remain in place. Explicit interval overrides still work; unhealthy workers still need to meet the existing health recovery threshold before model discovery runs.
Validation:
git diff origin/main --checkpassed. Executed checks for the Python configuration default, CLI default, and an explicit CLI interval override; all passed. Rust build and tests were not run because this environment has no Rust toolchain.Note
Low Risk
Default timing and background polling only; explicit
health_check_interval_secsoverrides still apply and routing logic is unchanged aside from fresher model indexes.Overview
Speeds up worker model discovery so workers are not stuck under
unknownand excluded from model-filtered routing while they finish loading.Default runtime health-check interval is lowered from 60s to 20s across Rust config/CLI, Python
RouterArgs/docs, and PyO3 binding defaults. In the registry health checker,MODEL_REFRESH_INTERVALgoes from 5 to 1, so/v1/modelsrefresh runs on every health-check cycle instead of every fifth cycle (with healthy-worker filtering and DP base-URL dedup unchanged).Reviewed by Cursor Bugbot for commit 6bb5701. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Change default health-check interval from 60 to 20 seconds
Updates the default for
health_check_interval_secsfrom 60 to 20 across the Python dataclass, PyO3 constructor, RustHealthCheckConfigdefault, and CLI args. Also updates theRouterclass docs. The model-refresh interval insideWorkerRegistry.start_health_checkerchanges from 5 seconds to 1 second.📊 Macroscope summarized 6bb5701. 6 files reviewed, 1 issue evaluated, 0 issues filtered, 1 comment posted
🗂️ Filtered Issues