Skip to content

0.3.0 - 2026-11-24

Latest

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
    candidates and count in budgets, report, and cost.
  • Follow-up turns that resume a harness session (handoff repair, delegation
    wake turns, delegated task follow-ups) count only their own spend, in the
    live budget monitor and in recorded usage. Codex reports the session's
    token totals and Claude Code 2.1.277+ (by detected version) its session
    cost, which the router added to what the session had already spent.
  • cost --since, the MCP get_cost tool, and schedule --every refuse
    non-ASCII and out-of-range durations (7日, 99999999999999999w,
    100000000d) instead of panicking. --every takes at most 10 years, and a
    hand-edited interval past the date range has no due time.
  • Ctrl+C ends commands that do not watch for cancellation (trust, apply,
    ship, doctor, and others) instead of being ignored. Once ship is
    confirmed, Ctrl+C ends only its Git or gh command, and it reports what
    was already done; a confirmed apply finishes and ignores Ctrl+C. Ctrl+C at a run or resume prompt saves
    and stops at once instead of cancelling the next stage.
  • every and cron schedules fire once after downtime, at the latest
    missed occurrence, instead of once per missed occurrence. A cron schedule
    finds it by searching back from now in widening windows.
  • serve: a confirm_stage or retry_stage that fails to load a run no
    longer leaves the run tied to the caller's project, which made later calls
    for it fail with "belongs to project". A webhook trigger whose run fails to
    start answers 500 with that error instead of a 409.
  • A stage sandbox = "by-role" looser than the workflow's sandbox_default
    needs model-router trust, like any other sandbox downgrade.
  • Delegation run tools: run_list with status reports has_more for the
    filtered list, run_read pages a log with invalid UTF-8 without skipping
    bytes, and a run record with no stages is an error instead of a panic.
  • TUI: a delegated task's handoff and patch open files in the task's
    worktree (or its run's checkout), not the focused run's. While a folder
    loads, the folder picker ignores moves and Enter, and ← goes up from the
    folder being loaded. Output search no longer caches matches from stale
    lines, which could misplace highlights or panic.
  • schedules tick counts a failed occurrence once.

Install model-router 0.3.0

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/Tyru5/model-router/releases/download/v0.3.0/model-router-installer.sh | sh

Install prebuilt binaries via Homebrew

brew install model-router

Download model-router 0.3.0

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