Skip to content

fix(tui): pin anyrouter/auto in the inline model picker - #40

Merged
duyetbot merged 2 commits into
mainfrom
cursor/model-picker-anyrouter-auto-4f74
Sep 3, 2026
Merged

fix(tui): pin anyrouter/auto in the inline model picker#40
duyetbot merged 2 commits into
mainfrom
cursor/model-picker-anyrouter-auto-4f74

Conversation

@duyet

@duyet duyet commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Closes #37.

Rebased onto main after #39 (97d3370). Per-agent --agent bind/launch from #39 is kept. This PR still only pins anyrouter/auto in the picker (no most-used dump).

Summary

The inline model picker now treats anyrouter/auto as a first-class selectable preset. It no longer leads with or dumps a most-used / usage ranking as the picker contents.

  • Pinned id is anyrouter/auto (typeahead matches that label).
  • Remaining catalog ids (when lookup is on) are sorted by name, not usage.
  • anyr models --dump-tui prints one picker frame for tests and pipes.
  • anyr models use anyrouter/auto persists the preset without a catalog fetch.
  • anyr claude --model "stealth/ox-alpha[1m]" --yolo is unchanged (covered by dry-run tests).
  • --pick --agent uses the same picker (preset available without a catalog fetch).

Does not change pick-agent-then-settings chrome (#36) or the update spinner (#38).

Evidence

Isolated control-anyr run (ANYR_NO_CATALOG=1):

  • anyr models --dump-tui◆ anyrouter/auto only; no most used
  • anyr models use anyrouter/autoSaved default model anyrouter/auto
  • subsequent anyr claude --dry-run --yesANTHROPIC_MODEL=anyrouter/auto

cargo test --locked --lib --test cli: passed after rebase.

Checklist

  • Version stays on 0.1.x (do not introduce 0.2 / 1.0)
  • Do not auto-merge release-please PRs
Open in Web Open in Cursor 

@duyet
duyet marked this pull request as ready for review September 3, 2026 06:06
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

anyr size and startup

Startup is wall time for a cold anyr --version / anyr --help (median of 21 runs). Size is the stripped release binary, or the .wasm for the browser demo.

Size budget: anyr-linux-x86_64 must stay ≤ 4.0 MiB (4194304 bytes) stripped.

Asset Kind Size --version median --help median
anyr-darwin-arm64 native 2.7 MiB 2.68 ms 2.37 ms
anyr-darwin-x86_64 native 2.9 MiB 33.27 ms 30.75 ms
anyr-linux-arm64 native 2.7 MiB 0.77 ms 0.81 ms
anyr-linux-x86_64 native 3.0 MiB 0.74 ms 0.73 ms
anyr-windows-x86_64.exe native 2.5 MiB 7.3 ms 7.11 ms
anyr.wasm wasm 176.3 KiB

Budget check: ok

raw timings
[
  {
    "asset": "anyr-darwin-arm64",
    "kind": "native",
    "path": "/Users/runner/work/cli/cli/anyr-darwin-arm64",
    "bytes": 2867016,
    "size": "2.7 MiB",
    "version": "0.1.11 (built 2026-09-03 08:29:04)",
    "target": "aarch64-apple-darwin",
    "os": "macos-latest",
    "startup_version": {
      "n": 21,
      "min_ms": 2.55,
      "median_ms": 2.68,
      "p95_ms": 2.95,
      "mean_ms": 2.74
    },
    "startup_help": {
      "n": 21,
      "min_ms": 2.29,
      "median_ms": 2.37,
      "p95_ms": 2.45,
      "mean_ms": 2.38
    }
  },
  {
    "asset": "anyr-darwin-x86_64",
    "kind": "native",
    "path": "/Users/runner/work/cli/cli/anyr-darwin-x86_64",
    "bytes": 3077712,
    "size": "2.9 MiB",
    "version": "0.1.11 (built 2026-09-03 08:29:11)",
    "target": "x86_64-apple-darwin",
    "os": "macos-latest",
    "startup_version": {
      "n": 21,
      "min_ms": 27.56,
      "median_ms": 33.27,
      "p95_ms": 38.37,
      "mean_ms": 32.97
    },
    "startup_help": {
      "n": 21,
      "min_ms": 26.77,
      "median_ms": 30.75,
      "p95_ms": 33.81,
      "mean_ms": 30.58
    }
  },
  {
    "asset": "anyr-linux-arm64",
    "kind": "native",
    "path": "/home/runner/work/cli/cli/anyr-linux-arm64",
    "bytes": 2823208,
    "size": "2.7 MiB",
    "version": "0.1.11 (built 2026-09-03 08:28:53)",
    "target": "aarch64-unknown-linux-gnu",
    "os": "ubuntu-24.04-arm",
    "startup_version": {
      "n": 21,
      "min_ms": 0.7,
      "median_ms": 0.77,
      "p95_ms": 0.88,
      "mean_ms": 0.78
    },
    "startup_help": {
      "n": 21,
      "min_ms": 0.74,
      "median_ms": 0.81,
      "p95_ms": 0.88,
      "mean_ms": 0.81
    }
  },
  {
    "asset": "anyr-linux-x86_64",
    "kind": "native",
    "path": "/home/runner/work/cli/cli/anyr-linux-x86_64",
    "bytes": 3175936,
    "size": "3.0 MiB",
    "version": "0.1.11 (built 2026-09-03 08:29:02)",
    "target": "x86_64-unknown-linux-gnu",
    "os": "ubuntu-latest",
    "startup_version": {
      "n": 21,
      "min_ms": 0.72,
      "median_ms": 0.74,
      "p95_ms": 0.8,
      "mean_ms": 0.75
    },
    "startup_help": {
      "n": 21,
      "min_ms": 0.7,
      "median_ms": 0.73,
      "p95_ms": 0.83,
      "mean_ms": 0.75
    }
  },
  {
    "asset": "anyr-windows-x86_64.exe",
    "kind": "native",
    "path": "D:\\a\\cli\\cli\\anyr-windows-x86_64.exe",
    "bytes": 2630656,
    "size": "2.5 MiB",
    "version": "0.1.11 (built 2026-09-03T08:31:24Z)",
    "target": "x86_64-pc-windows-msvc",
    "os": "windows-latest",
    "startup_version": {
      "n": 21,
      "min_ms": 7.12,
      "median_ms": 7.3,
      "p95_ms": 7.79,
      "mean_ms": 7.35
    },
    "startup_help": {
      "n": 21,
      "min_ms": 6.94,
      "median_ms": 7.11,
      "p95_ms": 7.28,
      "mean_ms": 7.13
    }
  },
  {
    "asset": "anyr.wasm",
    "kind": "wasm",
    "path": "/home/runner/work/cli/cli/target/wasm-pkg/anyr_cli_bg.wasm",
    "bytes": 180483,
    "size": "176.3 KiB",
    "version": "wasm",
    "target": "wasm32-unknown-unknown",
    "os": ""
  }
]

cursoragent and others added 2 commits September 3, 2026 08:26
The model picker was filling from a usage-sorted catalog and labeling
auto as "most used", so anyrouter/auto could not be selected. Pin that
preset first, sort remaining catalog ids by name, and dump the picker
with --dump-tui.

Co-authored-by: Duyet Le <me@duyet.net>
Co-authored-by: duyetbot <bot@duyet.net>
Dump, models use, launch dry-run, and ox-alpha --yolo artifacts showing
the picker catalog is the preset, not a most-used ranking.

Co-authored-by: Duyet Le <me@duyet.net>
Co-authored-by: duyetbot <bot@duyet.net>
@cursor
cursor Bot force-pushed the cursor/model-picker-anyrouter-auto-4f74 branch from 08bdf79 to da92450 Compare September 3, 2026 08:26
@duyetbot
duyetbot merged commit 59b1f6a into main Sep 3, 2026
9 checks passed
@duyetbot
duyetbot deleted the cursor/model-picker-anyrouter-auto-4f74 branch September 3, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TUI model picker: select anyrouter/auto, do not dump most-used models

3 participants