Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .cursor/skills/verify-anyr/artifacts/model-picker/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Proof: model-picker

Feature: `model-picker`
Entry points driven: `anyr models --dump-tui`, `anyr models use anyrouter/auto`, `anyr claude --dry-run --yes --model stealth/ox-alpha[1m] --yolo`, `anyr claude --dry-run --yes` after pinning auto, `anyr menu --dump-tui`
Harness: `.cursor/skills/verify-anyr/control-anyr` (`launch`, `doctor`, `cli`, `cleanup`)
Binary: `target/debug/anyr` from this checkout (`0.1.11`)
Isolated home: `/tmp/anyr-verify-20260903-060433-6302/home` (removed by cleanup)

## Commands

```bash
.cursor/skills/verify-anyr/control-anyr launch
.cursor/skills/verify-anyr/control-anyr doctor
.cursor/skills/verify-anyr/control-anyr cli --out artifacts/model-picker/dump.txt -- models --dump-tui
.cursor/skills/verify-anyr/control-anyr cli --out artifacts/model-picker/use-auto.txt -- models use anyrouter/auto
.cursor/skills/verify-anyr/control-anyr cli --out artifacts/model-picker/launch-auto.txt -- claude --dry-run --yes --key sk-ar-v1-fixture-key-0001
.cursor/skills/verify-anyr/control-anyr cli --out artifacts/model-picker/ox-alpha-yolo.txt -- claude --dry-run --yes --key sk-ar-v1-fixture-key-0001 --model 'stealth/ox-alpha[1m]' --yolo
.cursor/skills/verify-anyr/control-anyr cli --out artifacts/model-picker/menu-after.txt -- menu --dump-tui
.cursor/skills/verify-anyr/control-anyr cleanup
```

## Results

| Artifact | Exit | Observable |
| --- | --- | --- |
| `dump.txt` | 0 | picker frame with `◆ anyrouter/auto`; no `most used`; no usage-ranked catalog dump |
| `use-auto.txt` | 0 | `Saved default model anyrouter/auto` |
| `launch-auto.txt` | 0 | `ANTHROPIC_MODEL=anyrouter/auto`; `command:`; key redacted |
| `ox-alpha-yolo.txt` | 0 | `ANTHROPIC_MODEL=stealth/ox-alpha[1m]` and `"--dangerously-skip-permissions"` |
| `menu-after.txt` | 0 | `model anyrouter/auto` on the launcher; no `most used` |

Complementary suite: `models_dump_tui_pins_anyrouter_auto_without_usage_dump`, `models_use_anyrouter_auto_persists_without_network`, `claude_yolo_with_ox_alpha_1m_still_works`, `picker_catalog_tests::*` passed.

No `anyr claude` without `--dry-run`. No paid tokens.

## Cleanup

`control-anyr cleanup` removed the isolated workdir and left this `artifacts/model-picker/` tree in place.
5 changes: 5 additions & 0 deletions .cursor/skills/verify-anyr/artifacts/model-picker/dump.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
▲ Default model
search:
────────────────────────────────────────────────
◆ anyrouter/auto
type to search ↑↓ move ↵ select esc cancel
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
19 changes: 19 additions & 0 deletions .cursor/skills/verify-anyr/artifacts/model-picker/launch-auto.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
command: claude
args: []
env:
ANTHROPIC_AUTH_TOKEN=sk-ar-...0001
ANTHROPIC_BASE_URL=https://anyrouter.dev/api
ANTHROPIC_DEFAULT_FABLE_MODEL=anthropic/claude-fable-5
ANTHROPIC_DEFAULT_FABLE_MODEL_DESCRIPTION=Fable alias + fallback
ANTHROPIC_DEFAULT_HAIKU_MODEL=anthropic/claude-haiku-4.5
ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION=Background & subagents
ANTHROPIC_DEFAULT_OPUS_MODEL=anthropic/claude-opus-4.6
ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION=Opus alias
ANTHROPIC_DEFAULT_SONNET_MODEL=anthropic/claude-sonnet-4.6
ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION=Sonnet alias
ANTHROPIC_MODEL=anyrouter/auto
ANYROUTER_MODEL_MODE=auto
ANYROUTER_PINNED_PRESET=@preset/coding-stack
API_TIMEOUT_MS=3000000
CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1
CLAUDE_CODE_SUBAGENT_MODEL=anthropic/claude-haiku-4.5
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
24 changes: 24 additions & 0 deletions .cursor/skills/verify-anyr/artifacts/model-picker/menu-after.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
╭ anyr ────────────────────────────────────────────────────────────────╮
│ ▄█▄▀█████████▄ account default │
│ ▄█████▄ ███ key sk-ar-v1-verif…-key │
│ ▄███▀ ▀██▄ ▄▄▄███▀ model anyrouter/auto │
│ ▄███▀ ▀██▄▀███▄ agent claude │
│▄███▀ ▀██▄▀███▄ credits - │
├──────────────────────────────────────────────────────────────────────┤
│❯ █ │
├──────────────────────────────────────────────────────────────────────┤
│ LAUNCH │
│◆ ⚡ claude anyrouter/auto │
│ ⚡ codex Codex │
│ │
│ CONFIGURE │
│ ◆ model… switch session default │
│ ⚡ agent… switch default agent │
│ ⇄ account… switch profile │
│ 🔑 key… switch API key │
│ ⬇ install… install a coding agent │
│ ⚙ config… accounts · keys · agent │
│ ✕ quit esc works too │
├──────────────────────────────────────────────────────────────────────┤
│type to filter ↑↓ move ↵ run esc quit │
╰──────────────────────────────────────────────────────────────────────╯
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
command: claude
args: ["--dangerously-skip-permissions"]
env:
ANTHROPIC_AUTH_TOKEN=sk-ar-...0001
ANTHROPIC_BASE_URL=https://anyrouter.dev/api
ANTHROPIC_DEFAULT_FABLE_MODEL=stealth/ox-alpha[1m]
ANTHROPIC_DEFAULT_FABLE_MODEL_DESCRIPTION=Fable alias + fallback
ANTHROPIC_DEFAULT_HAIKU_MODEL=stealth/ox-alpha[1m]
ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION=Background & subagents
ANTHROPIC_DEFAULT_OPUS_MODEL=stealth/ox-alpha[1m]
ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION=Opus alias
ANTHROPIC_DEFAULT_SONNET_MODEL=stealth/ox-alpha[1m]
ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION=Sonnet alias
ANTHROPIC_MODEL=stealth/ox-alpha[1m]
ANYROUTER_MODEL_MODE=concrete
ANYROUTER_PINNED_PRESET=@preset/coding-stack
API_TIMEOUT_MS=3000000
CLAUDE_CODE_AUTO_COMPACT_WINDOW=1000000
CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1
CLAUDE_CODE_SUBAGENT_MODEL=stealth/ox-alpha[1m]
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Saved default model anyrouter/auto
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
1 change: 1 addition & 0 deletions .cursor/skills/verify-anyr/features/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@ Keep implementation details out of the map. Name only user paths, stable handles
- [Onboard prompts](./onboard-prompts.md) covers paste-ready impl/plan/fix prompts and JSON output without network.
- [Agent launch dry-run](./agent-launch-dry-run.md) covers printing the child command and redacted env without spawning an agent.
- [TUI launcher](./tui-launcher.md) covers `menu --dump-tui`, `config --dump-tui`, and optional PTY quit.
- [Model picker catalog](./model-picker.md) covers the inline model picker pinning `anyrouter/auto` without a most-used dump.
- [Accounts and config](./accounts-and-config.md) covers whoami, account switch, config path, and logout against the isolated home.
- [Per-agent bindings](./per-agent-bindings.md) covers inline model/account/key binds per coding agent and launch that honors per-agent keys.
37 changes: 37 additions & 0 deletions .cursor/skills/verify-anyr/features/model-picker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Model picker catalog

The inline model picker lets a user select the `anyrouter/auto` preset without filling the list from a most-used / usage ranking. Typeahead filters the same inline list. No extra screen.

## Sub-features

- `picker-dump` prints one model-picker frame that includes `anyrouter/auto` and does not say `most used`.
- `picker-use-auto` persists `anyrouter/auto` from `models use` without a catalog fetch.
- `ox-alpha-yolo` keeps `anyr claude --model stealth/ox-alpha[1m] --yolo --dry-run` working.

## How to get to it (user POV)

- Run `anyr models --dump-tui` (or `anyr models --pick --dump-tui`) to print the picker frame.
- From the launcher, choose `model…` (same inline picker; TTY).
- From settings, edit the default model row (same inline picker; TTY).
- Run `anyr models use anyrouter/auto` to pin the preset from the CLI.
- Type `anyrouter/auto` in the picker search to select the preset.

## Driving it with control-anyr

Preconditions:

- `control-anyr doctor` is clean.
- Isolated config contains the fixture `default` profile.
- Helper sets `ANYR_NO_CATALOG=1`, so the dump is the picker catalog (preset only), not a live usage list.

- **Picker dump.** Run `control-anyr cli --out artifacts/model-picker/dump.txt -- models --dump-tui`. Exit code `0`. Stdout contains `anyrouter/auto`. Stdout does not contain `most used`. Stdout has no ESC (`\x1b`).
- **Pin the preset.** Run `control-anyr cli --out artifacts/model-picker/use-auto.txt -- models use anyrouter/auto`. Exit code `0`. Stdout contains `anyrouter/auto`. Isolated `config.yaml` no longer pins a concrete catalog id as `default_model` (auto stays unset / preset).
- **Ox-alpha yolo (dry).** Run `control-anyr cli --out artifacts/model-picker/ox-alpha-yolo.txt -- claude --dry-run --yes --key sk-ar-v1-fixture-key-0001 --model stealth/ox-alpha[1m] --yolo`. Exit code `0`. Stdout contains `ANTHROPIC_MODEL=stealth/ox-alpha[1m]` and `"--dangerously-skip-permissions"`. Stdout does not contain the full fixture key.
- **Proof.** Keep `dump.txt` and `use-auto.txt`. They show the picker data source can set `anyrouter/auto` without a most-used dump.

## Gotchas

- `ANYR_NO_CATALOG=1` is expected isolation. The dump then shows the pinned preset, not a live catalog. That is the proof that the picker is not a usage ranking dump.
- `--dump-tui` is not a TTY session. Do not claim keybindings work from the dump alone; use `pty` only if you need to type the query.
- Do not invent other model ids. `anyrouter/auto` is the real preset. Concrete ids like `stealth/ox-alpha` stay CLI `--model` paths.
- `--yolo` without `--dry-run` starts Claude. Skip that.
Loading
Loading