fix(cli): keep [1m]/[500k] on Claude virtual ANTHROPIC_MODEL - #69
Merged
Merged
Conversation
Claude Code's HUD invents [200k] when ANTHROPIC_MODEL is bare anyrouter/auto. Re-apply the peeled floor on virtual presets only; concrete catalog ids still strip the suffix so they do not 404. Also set CLAUDE_CODE_AUTO_COMPACT_WINDOW=1000000 when the virtual floor is at least 1M.
Contributor
anyr size and startupStartup is wall time for a cold Size budget:
Budget check: ok raw timings[
{
"asset": "anyr-darwin-arm64",
"kind": "native",
"path": "/Users/runner/work/cli/cli/anyr-darwin-arm64",
"bytes": 2927912,
"size": "2.8 MiB",
"version": "0.1.13 (built 2026-09-15 19:26:21)",
"target": "aarch64-apple-darwin",
"os": "macos-latest",
"startup_version": {
"n": 21,
"min_ms": 5.3,
"median_ms": 7.9,
"p95_ms": 10.9,
"mean_ms": 7.99
},
"startup_help": {
"n": 21,
"min_ms": 4.27,
"median_ms": 7.8,
"p95_ms": 11.52,
"mean_ms": 7.97
}
},
{
"asset": "anyr-darwin-x86_64",
"kind": "native",
"path": "/Users/runner/work/cli/cli/anyr-darwin-x86_64",
"bytes": 3137904,
"size": "3.0 MiB",
"version": "0.1.13 (built 2026-09-15 19:25:58)",
"target": "x86_64-apple-darwin",
"os": "macos-latest",
"startup_version": {
"n": 21,
"min_ms": 31.03,
"median_ms": 35.55,
"p95_ms": 42.5,
"mean_ms": 36.88
},
"startup_help": {
"n": 21,
"min_ms": 32.86,
"median_ms": 37.23,
"p95_ms": 50.9,
"mean_ms": 39.74
}
},
{
"asset": "anyr-linux-arm64",
"kind": "native",
"path": "/home/runner/work/cli/cli/anyr-linux-arm64",
"bytes": 2888744,
"size": "2.8 MiB",
"version": "0.1.13 (built 2026-09-15 19:25:37)",
"target": "aarch64-unknown-linux-gnu",
"os": "ubuntu-24.04-arm",
"startup_version": {
"n": 21,
"min_ms": 0.7,
"median_ms": 0.76,
"p95_ms": 0.84,
"mean_ms": 0.76
},
"startup_help": {
"n": 21,
"min_ms": 0.73,
"median_ms": 0.79,
"p95_ms": 0.83,
"mean_ms": 0.78
}
},
{
"asset": "anyr-linux-x86_64",
"kind": "native",
"path": "/home/runner/work/cli/cli/anyr-linux-x86_64",
"bytes": 3234008,
"size": "3.1 MiB",
"version": "0.1.13 (built 2026-09-15 19:25:41)",
"target": "x86_64-unknown-linux-gnu",
"os": "ubuntu-latest",
"startup_version": {
"n": 21,
"min_ms": 0.94,
"median_ms": 0.99,
"p95_ms": 1.1,
"mean_ms": 1.0
},
"startup_help": {
"n": 21,
"min_ms": 1.02,
"median_ms": 1.09,
"p95_ms": 1.18,
"mean_ms": 1.12
}
},
{
"asset": "anyr-windows-x86_64.exe",
"kind": "native",
"path": "D:\\a\\cli\\cli\\anyr-windows-x86_64.exe",
"bytes": 2682368,
"size": "2.6 MiB",
"version": "0.1.13 (built 2026-09-15T19:26:51Z)",
"target": "x86_64-pc-windows-msvc",
"os": "windows-latest",
"startup_version": {
"n": 21,
"min_ms": 7.94,
"median_ms": 8.02,
"p95_ms": 8.59,
"mean_ms": 8.14
},
"startup_help": {
"n": 21,
"min_ms": 7.72,
"median_ms": 8.0,
"p95_ms": 8.28,
"mean_ms": 8.06
}
},
{
"asset": "anyr.wasm",
"kind": "wasm",
"path": "/home/runner/work/cli/cli/target/wasm-pkg/anyr_cli_bg.wasm",
"bytes": 183905,
"size": "179.6 KiB",
"version": "wasm",
"target": "wasm32-unknown-unknown",
"os": ""
}
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
anyr claude --model anyrouter/auto[1m]showed Claude statusanyrouter/auto[200k] (low)becausemodel_id_for_toolpeeled the floor and setANTHROPIC_MODEL=anyrouter/auto. Claude Code then invented[200k]from its default window. Extra-bodymin_contextdoes not fix the HUD label.What
anyrouter/auto,free,byok, …): re-apply[1m]/[500k]onANTHROPIC_MODELfrom the peeled suffix orrouting.min_context.stealth/ox-alpha[1m]→stealth/ox-alpha) so they do not 404.CLAUDE_CODE_AUTO_COMPACT_WINDOW=1000000.context_length(often 200k) as the HUD suffix.Proof
cargo test --locked --all-targetsgreen locally.anyr claude --dry-run --model anyrouter/auto[1m]):ANTHROPIC_MODEL=anyrouter/auto[1m]CLAUDE_CODE_EXTRA_BODY={"provider":{"min_context":1000000}}CLAUDE_CODE_AUTO_COMPACT_WINDOW=1000000ANTHROPIC_MODEL=stealth/ox-alpha(suffix stripped).Parent squash-merges. Release-please can bump after merge.