Release Notes
Added
scripts/install.sh: installs model-router and mr on Linux or macOS from
the release download bucket, with SHA-256 verification, --version, and
--to. The R2 downloads workflow copies each release's archives to a
Cloudflare R2 bucket and uploads the installer there, since GitHub release
assets of the private repository need a token.
Security
serve --http: enforce the 64 KiB header cap while reading lines, cap long-lived event streams and wait_run requests at 24 of the 32 authenticated connection slots so quick calls (cancel_run, run_status) stay runnable, and verify project trust once per call.
- Cap config and benchmark reads at 2 MiB and provider model / Codex catalog reads at 16 MiB; harden project trust approvals, OS sandbox path resolution, protected-path validation, pre-ship secret scanning, and terminal escape cleaning on handoff and progress feeds.
Changed
- Replace
fs2 with direct libc::flock in src/storage.rs, replace ctrlc (and its dedicated signal thread and duplicate nix version) with async-signal-safe libc::sigaction handlers (SIGINT, SIGTERM, SIGHUP) in src/main.rs, and trim chrono default features to clock, serde, and std.
- Pool HTTP clients across providers, task imports, and webhooks; use persistent notification/reaper worker threads; parallelize
doctor harness checks and provider pricing refreshes; index pricing tables by model/family with case-insensitive lookup.
- Optimize engine, snapshot, ship, and storage paths: skip fsync on regenerable scratch artifacts, stream patch lines and git status/changed paths with bounded stderr capture, reduce prompt/history allocations, and harden graph/fan-out scheduling and state recovery.
- Improve TUI responsiveness and per-frame efficiency: conditional animation/elapsed timers, adaptive idle event polling (
250 ms), backgrounded saved-run sizing and worktree apply planning, viewport-windowed pickers and diff/file lists, coalesced wrapped textarea spans, and cached output search, diff stats, and completion briefs.
Fixed
- Detect TUI PTY hangup without a controlling terminal via zero-timeout
poll (POLLHUP/POLLERR/POLLNVAL), stopping active runs and restoring terminal modes across normal exit, error paths, and panics.
- Fix permanent
StatsCache loading locks when switching projects, stale one-frame output search status, multi-line Ask::ApplyWorktree dialog truncation, and overflow-prone UI/duration calculations.
- Harden process-group capture, interactive terminal-host teardown, and crash-recovery termination under signal and timeout races.
- Detect TUI terminal hangup on macOS, where
poll reports POLLHUP only when POLLIN is requested.
- On macOS, retry reading a process group member's run marker when
sysctl(KERN_PROCARGS2) fails briefly with EIO or EINVAL, so recovery and teardown no longer skip a leaderless group that is the run's own.
Install model-router 0.2.1
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/Tyru5/model-router/releases/download/v0.2.1/model-router-installer.sh | sh
Install prebuilt binaries via Homebrew
brew install model-router
Download model-router 0.2.1