Skip to content

fix(cli): stop appending [1m] to Claude catalog model ids - #60

Merged
duyetbot merged 1 commit into
mainfrom
fix/3183-cli-strip-1m
Sep 9, 2026
Merged

fix(cli): stop appending [1m] to Claude catalog model ids#60
duyetbot merged 1 commit into
mainfrom
fix/3183-cli-strip-1m

Conversation

@duyetbot

@duyetbot duyetbot commented Sep 9, 2026

Copy link
Copy Markdown
Member

Leftover CLI work for https://github.com/duyet/anyrouter/issues/3183.

The API side was already closed via duyet/anyrouter#3187. This PR only changes the native CLI launch path:

  • Do not append [1m] when launching Claude (model_id_for_tool returns the catalog id for every agent).
  • catalog_model_id / sanitize_model_id strip [1m], dangling [Nm, and closed [Nm] / [0;1m] tails so user-typed or relay-tagged ids are canonical before env/--model.
  • Tests now expect ANTHROPIC_MODEL=… (bare catalog ids), not …[1m].

Issue 3183 may already be closed; linking for leftover CLI tracking. Does not close or merge release-please PRs.

Closes https://github.com/duyet/anyrouter/issues/3183

Claude launch now sends bare catalog ids (never id[1m]). catalog_model_id
strips closed [Nm]/[0;1m] tails as well as dangling [Nm so user-typed
or relay-tagged ids canonicalize before env/--model.
@github-actions

github-actions Bot commented Sep 9, 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.8 MiB 4.35 ms 3.73 ms
anyr-darwin-x86_64 native 3.0 MiB 44.72 ms 42.37 ms
anyr-linux-arm64 native 2.8 MiB 0.83 ms 0.8 ms
anyr-linux-x86_64 native 3.1 MiB 0.68 ms 0.66 ms
anyr-windows-x86_64.exe native 2.6 MiB 10.67 ms 10.78 ms
anyr.wasm wasm 176.0 KiB

Budget check: ok

raw timings
[
  {
    "asset": "anyr-darwin-arm64",
    "kind": "native",
    "path": "/Users/runner/work/cli/cli/anyr-darwin-arm64",
    "bytes": 2927800,
    "size": "2.8 MiB",
    "version": "0.1.11 (built 2026-09-09 07:26:12)",
    "target": "aarch64-apple-darwin",
    "os": "macos-latest",
    "startup_version": {
      "n": 21,
      "min_ms": 4.02,
      "median_ms": 4.35,
      "p95_ms": 4.8,
      "mean_ms": 4.5
    },
    "startup_help": {
      "n": 21,
      "min_ms": 3.24,
      "median_ms": 3.73,
      "p95_ms": 4.5,
      "mean_ms": 3.9
    }
  },
  {
    "asset": "anyr-darwin-x86_64",
    "kind": "native",
    "path": "/Users/runner/work/cli/cli/anyr-darwin-x86_64",
    "bytes": 3133720,
    "size": "3.0 MiB",
    "version": "0.1.11 (built 2026-09-09 07:26:36)",
    "target": "x86_64-apple-darwin",
    "os": "macos-latest",
    "startup_version": {
      "n": 21,
      "min_ms": 34.1,
      "median_ms": 44.72,
      "p95_ms": 51.65,
      "mean_ms": 44.39
    },
    "startup_help": {
      "n": 21,
      "min_ms": 35.57,
      "median_ms": 42.37,
      "p95_ms": 50.16,
      "mean_ms": 42.25
    }
  },
  {
    "asset": "anyr-linux-arm64",
    "kind": "native",
    "path": "/home/runner/work/cli/cli/anyr-linux-arm64",
    "bytes": 2888744,
    "size": "2.8 MiB",
    "version": "0.1.11 (built 2026-09-09 07:25:34)",
    "target": "aarch64-unknown-linux-gnu",
    "os": "ubuntu-24.04-arm",
    "startup_version": {
      "n": 21,
      "min_ms": 0.73,
      "median_ms": 0.83,
      "p95_ms": 0.88,
      "mean_ms": 0.85
    },
    "startup_help": {
      "n": 21,
      "min_ms": 0.71,
      "median_ms": 0.8,
      "p95_ms": 0.89,
      "mean_ms": 0.8
    }
  },
  {
    "asset": "anyr-linux-x86_64",
    "kind": "native",
    "path": "/home/runner/work/cli/cli/anyr-linux-x86_64",
    "bytes": 3229776,
    "size": "3.1 MiB",
    "version": "0.1.11 (built 2026-09-09 07:25:49)",
    "target": "x86_64-unknown-linux-gnu",
    "os": "ubuntu-latest",
    "startup_version": {
      "n": 21,
      "min_ms": 0.65,
      "median_ms": 0.68,
      "p95_ms": 0.75,
      "mean_ms": 0.69
    },
    "startup_help": {
      "n": 21,
      "min_ms": 0.64,
      "median_ms": 0.66,
      "p95_ms": 0.83,
      "mean_ms": 0.68
    }
  },
  {
    "asset": "anyr-windows-x86_64.exe",
    "kind": "native",
    "path": "D:\\a\\cli\\cli\\anyr-windows-x86_64.exe",
    "bytes": 2674176,
    "size": "2.6 MiB",
    "version": "0.1.11 (built 2026-09-09T07:27:05Z)",
    "target": "x86_64-pc-windows-msvc",
    "os": "windows-latest",
    "startup_version": {
      "n": 21,
      "min_ms": 10.5,
      "median_ms": 10.67,
      "p95_ms": 12.78,
      "mean_ms": 11.19
    },
    "startup_help": {
      "n": 21,
      "min_ms": 10.35,
      "median_ms": 10.78,
      "p95_ms": 11.27,
      "mean_ms": 10.81
    }
  },
  {
    "asset": "anyr.wasm",
    "kind": "wasm",
    "path": "/home/runner/work/cli/cli/target/wasm-pkg/anyr_cli_bg.wasm",
    "bytes": 180225,
    "size": "176.0 KiB",
    "version": "wasm",
    "target": "wasm32-unknown-unknown",
    "os": ""
  }
]

@duyetbot
duyetbot merged commit 81a5473 into main Sep 9, 2026
9 checks passed
@duyetbot
duyetbot deleted the fix/3183-cli-strip-1m branch September 9, 2026 07:35
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.

2 participants