Skip to content

fix(models): catalog ids, Claude [1m] suffix, auto = most used - #12

Merged
duyet merged 1 commit into
mainfrom
fix/session-model-per-agent
Aug 24, 2026
Merged

fix(models): catalog ids, Claude [1m] suffix, auto = most used#12
duyet merged 1 commit into
mainfrom
fix/session-model-per-agent

Conversation

@duyet

@duyet duyet commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Config and non-Claude agents store/send catalog ids (stealth/ox-alpha). Claude Code spawn appends [1m] (1M context); Claude strips it before the gateway so Pi/Codex never see the suffix.
  • Unset / auto default resolves to GET /v1/models?sort=usage (most used this week). A user-pinned model is kept. Settings x (or picking auto) clears back to that.

Test plan

  • cargo test
  • anyr claude --dry-run --model stealth/ox-alpha shows ANTHROPIC_MODEL=stealth/ox-alpha[1m]
  • anyr pi --dry-run --model stealth/ox-alpha[1m] passes --model stealth/ox-alpha
  • Config x on default model resets to auto (most used)

Store provider/model catalog ids only. Claude Code gets the [1m] 1M-context
suffix at spawn; Pi/Codex and the rest do not. Unset default picks the
catalog's most-used model; a pinned id is kept; x / auto clears back to that.

Co-Authored-By: duyetbot <bot@duyet.net>

Co-authored-by: Duyet Le <me@duyet.net>
Co-authored-by: duyetbot <bot@duyet.net>
@github-actions

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.3 MiB 3.05 ms 2.8 ms
anyr-linux-arm64 native 2.3 MiB 0.69 ms 0.76 ms
anyr-linux-x86_64 native 2.6 MiB 0.8 ms 0.8 ms
anyr-windows-x86_64.exe native 2.2 MiB 9.15 ms 9.15 ms
anyr.wasm wasm 173.9 KiB

Budget check: ok

raw timings
[
  {
    "asset": "anyr-darwin-arm64",
    "kind": "native",
    "path": "/Users/runner/work/cli/cli/anyr-darwin-arm64",
    "bytes": 2461784,
    "size": "2.3 MiB",
    "version": "0.1.10 (built 2026-08-24 11:58:01)",
    "target": "aarch64-apple-darwin",
    "os": "macos-latest",
    "startup_version": {
      "n": 21,
      "min_ms": 2.62,
      "median_ms": 3.05,
      "p95_ms": 3.18,
      "mean_ms": 3.01
    },
    "startup_help": {
      "n": 21,
      "min_ms": 2.59,
      "median_ms": 2.8,
      "p95_ms": 3.23,
      "mean_ms": 2.85
    }
  },
  {
    "asset": "anyr-linux-arm64",
    "kind": "native",
    "path": "/home/runner/work/cli/cli/anyr-linux-arm64",
    "bytes": 2429920,
    "size": "2.3 MiB",
    "version": "0.1.10 (built 2026-08-24 11:57:52)",
    "target": "aarch64-unknown-linux-gnu",
    "os": "ubuntu-24.04-arm",
    "startup_version": {
      "n": 21,
      "min_ms": 0.64,
      "median_ms": 0.69,
      "p95_ms": 0.76,
      "mean_ms": 0.7
    },
    "startup_help": {
      "n": 21,
      "min_ms": 0.71,
      "median_ms": 0.76,
      "p95_ms": 0.84,
      "mean_ms": 0.76
    }
  },
  {
    "asset": "anyr-linux-x86_64",
    "kind": "native",
    "path": "/home/runner/work/cli/cli/anyr-linux-x86_64",
    "bytes": 2730864,
    "size": "2.6 MiB",
    "version": "0.1.10 (built 2026-08-24 11:57:59)",
    "target": "x86_64-unknown-linux-gnu",
    "os": "ubuntu-latest",
    "startup_version": {
      "n": 21,
      "min_ms": 0.77,
      "median_ms": 0.8,
      "p95_ms": 0.86,
      "mean_ms": 0.81
    },
    "startup_help": {
      "n": 21,
      "min_ms": 0.76,
      "median_ms": 0.8,
      "p95_ms": 0.89,
      "mean_ms": 0.81
    }
  },
  {
    "asset": "anyr-windows-x86_64.exe",
    "kind": "native",
    "path": "D:\\a\\cli\\cli\\anyr-windows-x86_64.exe",
    "bytes": 2260992,
    "size": "2.2 MiB",
    "version": "0.1.10 (built 2026-08-24T11:59:16Z)",
    "target": "x86_64-pc-windows-msvc",
    "os": "windows-latest",
    "startup_version": {
      "n": 21,
      "min_ms": 8.85,
      "median_ms": 9.15,
      "p95_ms": 9.39,
      "mean_ms": 9.15
    },
    "startup_help": {
      "n": 21,
      "min_ms": 8.91,
      "median_ms": 9.15,
      "p95_ms": 9.59,
      "mean_ms": 9.22
    }
  },
  {
    "asset": "anyr.wasm",
    "kind": "wasm",
    "path": "/home/runner/work/cli/cli/target/wasm-pkg/anyr_cli_bg.wasm",
    "bytes": 178037,
    "size": "173.9 KiB",
    "version": "wasm",
    "target": "wasm32-unknown-unknown",
    "os": ""
  }
]

@duyet
duyet merged commit 7fc97ba into main Aug 24, 2026
8 checks passed
@duyet
duyet deleted the fix/session-model-per-agent branch August 24, 2026 12:00
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.

1 participant