Skip to content

Releases

0.3.0 - 2026-11-24

Choose a tag to compare

@github-actions github-actions released this 24 Nov 02:59

Release Notes

Added

  • TUI tour: on the first launch, a panel above the status line walks from
    the Harnesses page through stages, the task, and starting a run to its
    completion, naming the next key for each step and run state. F1 shows or
    hides it; <config dir>/tour.json records it finished or hidden so it
    does not reopen. Earlier users (recent projects, no tour.json) get a
    one-time status line about F1 instead. See docs/tui.md#tour.

  • Delegation: a stage with [workflows.stages.delegation] gives its agent
    the router's MCP tools (delegate_task, task_status, task_wait,
    task_send, task_cancel, task_apply, run_*, schedule_*) through
    mr __mcp-bridge and a per-turn Unix socket and token. Tasks run on named
    [delegates.*] or allowlisted harness/model/provider targets, in their own
    OS sandbox (shared read-only or worktree), never above the parent's
    privilege ceiling. Finished tasks wake the parent with a follow-up turn.
    Worktree tasks return sealed patches the parent applies with task_apply.
    Parents: Claude Code, Codex, OpenCode, and custom adapters with
    mcp_config_args; interactive stages too. Delegates need
    model-router trust. See docs/delegation.md.

  • Agent-launched runs (run_launch) are driven by the TUI or serve; the
    CLI leaves them pending for model-router resume.

  • Schedules: schedule_task writes .model-router/schedules.json; a
    schedule fires only after mr schedules approve ID. mr schedules list|approve|pause|enable|delete|tick; serve fires due schedules and
    accepts POST /schedules/<id>/trigger. approve --digest D (and the TUI
    confirm dialog) refuse a schedule changed after it was shown; list --json
    includes digest.

  • Reports, previews, history, and the Runs page show tasks, wake turns, and
    their cost.

  • Global and project config layering: loading <project>/.model-router.toml
    layers <config dir>/config.toml's [providers.*], [adapters.*],
    [delegates.*], and [pricing.*] underneath project entries (project keys
    win on collision). Global entries stay trusted while project-defined and
    shadowing entries require model-router trust; saving a project config omits
    unmodified global entries, and saving the global config.toml keeps them.

  • Built-in pricing table entries for gpt-6, gpt-6-astra, and gpt-6.2-sol
    in src/cost/prices.toml.

  • Prompt context_files (Vec<String> on workflows and stages, up to 32
    repo-relative paths or globs and 32 KiB total, symlink-safe, UTF-8 text only,
    never reading .git or .model-router) and tunable handoff budgets
    (handoff_budget_bytes default 14000, handoff_each_bytes default 5000,
    validated in 1024..=200000), shown in preview and handoffs.

  • Transient stage retries ([workflows.retry] and [workflows.stages.retry]
    with max_attempts 0..=5, base_delay_seconds 1..=600,
    max_delay_seconds from the base to 3600) that
    retry unattended transient provider or network errors (HTTP
    429/502/503/504/529, rate limits, overloaded, connection reset/timeout) on
    the same harness and model with interruptible capped exponential backoff.
    Fan-out candidates retry in a fresh worktree; a stage retry on a
    delegating stage is a config error. Policy checks cover edits left by failed
    attempts, and a retried run writes one run_end metric.

  • Trust-gated lifecycle hooks ([workflows.hooks] and
    [workflows.stages.hooks] with before_stage, after_stage, before_ship,
    on_failure), executed as argument vectors in their own process group with
    MODEL_ROUTER_HOOK and stage context environment variables, and included in
    project trust and run approval digests. timeout_seconds is 1..=3600.
    Stage hooks run once around a fan-out round (candidates start from the
    files before_stage prepared), and edits from after_stage
    and on_failure hooks are captured in the stage's changes.

  • Declarative diff policies ([[workflows.policies]] with
    action = "block" | "advise", non-backtracking pattern, paths,
    message) that block prohibited added lines at stage end, fan-out candidate
    post-processing and selection, apply, and ship (failing closed), or
    inject path/diff advisories into review prompts. Whole added lines are
    scanned; candidates are scanned as text diffs (binary-looking files read as
    text, non-ASCII and quoted paths decoded).

  • Conditional stage execution (when_changed repo-relative globs on stages,
    up to 32, skipping unmatched stages in Git repositories; a fan-out judge with
    candidates waiting never skips) and multi-review quorum gating
    (review_quorum on workflows).

  • Live mid-stream budget enforcement for unattended streaming stages with
    on_exceed = "stop", terminating the harness process group as soon as
    streamed usage exceeds stage or run USD/token caps. Caps count every live
    worker (parallel stages, fan-out candidates, delegating parents and their
    tasks), an exceeded run cap stops workers in every stage, a stopped worker
    keeps the usage it streamed, and a run whose recorded spend is over a stop
    cap when its last stage finishes ends Blocked.

  • model-router schedules add CLI (--workflow, --task/--task-file,
    --every/--at/--cron/--webhook, --tz, trust-gated --approve), plus
    5-field cron expressions (cron; day-of-month OR day-of-week when both are
    set) and timezone support (tz: "local", "UTC", or "±HH:MM") across
    the CLI and schedule_task MCP tool. A tz-only schedule_task edit
    updates an at or cron trigger and is refused for every and webhooks.

  • model-router doctor checks for [harness_versions] pins (--strict fails
    on drift), [providers.*] API key variable presence, and offline harness
    auth-readiness hints without reading secret contents or making network
    requests; command.json records detected harness_version.

  • model-router cost --all-projects to aggregate cost history across recent
    projects, and --metrics-file <PATH> / MODEL_ROUTER_METRICS_FILE for
    lock-serialized append-only JSONL operational event export (run_start,
    run_end, attempt_start, attempt_end) with no task text, prompts, or
    secrets.

  • model-router serve: add fork_run, apply_run (default
    check_only: true), get_handoffs, get_cost, get_stats, and
    list_schedules tools over both MCP and HTTP; add unauthenticated
    GET /health liveness endpoint on serve --http; advertise MCP resources
    on serve --mcp and serve model-router://runs/<run_id>/review and
    .../diff via resources/list and bounded, symlink-safe resources/read.

  • TUI Workflow settings editor (W / Space w W), expanded Stage editor (e:
    billing, stage budget, require_router_checks, sandbox_writable,
    sandbox_network, sandbox_fallback, delegation), and Runs page parity:
    fork from a stage checkpoint (K), preview and confirm ad-hoc ship (S),
    inspect handoff budgets and truncation warnings (H), view status
    transitions timeline (l), raise token budget caps (B), inspect delegated
    tasks and their handoffs/sealed patches or cancel a single task (g), and
    manage/approve project schedules (u).

Changed

  • The repository is public under the MIT license. Install with the
    model-router-installer.sh attached to each GitHub release, or
    cargo install --git https://github.com/Tyru5/model-router --locked.
    The landing page links the source, releases, changelog, and issues.
  • model-router doctor --json prints an object,
    {"harnesses": [...], "providers": [{name, api_key_env, status}]}, instead
    of a bare array of harness reports.
  • Built-in starter workflow and stage/workflow presets now leave stage model
    blank ("") where gpt-6-astra was previously hardcoded, so stages inherit
    each harness's native default model out of the box.

Removed

  • The R2 download mirror: scripts/install.sh, the R2 downloads
    workflow, and https://model-router.tiru5.me/install.sh. GitHub release
    assets no longer need a token, so the release installer replaces them.

Security

  • Sandboxed stages can no longer make the router run commands outside the
    sandbox through Git. A workspace-write stage could write .git/config
    (an fsmonitor or filter command), add a hook, or swap in its own .git,
    and the router's unsandboxed git add -A after the stage would run it.
    Git config, config.worktree, and hooks are now read-only in every
    sandbox mode, the .git directory (or a linked worktree's .git file and
    commondir) cannot be replaced, a stage refuses to start when a Git config
    file or include target it could write would be read, a workspace-write
    stage refuses to start while its Git config or hooks entry is a symbolic
    link it could replace, and the router's own Git commands disable fsmonitor
    and hooks.
  • Ship's Git commands pass -c core.fsmonitor=false -c core.hooksPath=/dev/null like the router's other Git commands, and gh
    gets the same through GIT_CONFIG_PARAMETERS, so the Git commands it runs
    do too. A stage could write the hooks directory a repo's
    core.hooksPath names (husky's .husky/_, say), and ship then ran those
    hooks outside the sandbox while planning. Your own hooks, pre-push
    included, no longer run on ship.

Fixed

  • Handoff repair saves the run before its follow-up starts, so run.json no
    longer names the finished harness's process group while the follow-up
    runs (a crash then could leave a stale group recorded).
  • Budgets now count fan-out candidate spend. cost::stage_totals summed only
    a stage's own attempts, so run and stage caps never saw candidate spend, and
    model-router cost left candidates out of its history. A repair rewind past
    a fan-out stage also dropped the round's candidates from run.json, and
    their spend with them; they are now kept as the stage's discarded
    c...
Read more

0.2.1 - 2026-11-21

Choose a tag to compare

@github-actions github-actions released this 21 Nov 22:51

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

File Platform Checksum
model-router-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
model-router-x86_64-apple-darwin.tar.xz Intel macOS checksum
model-router-aarch64-unknown-linux-musl.tar.xz ARM64 MUSL Linux checksum
model-router-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum