fix(cli): fresh path keeps auto -> anyrouter/auto for first-turn failover (#58) - #59
Merged
Conversation
…over (#58) anyr claude with no --model now leaves ANYROUTER_MODEL_MODE=auto and ANTHROPIC_MODEL=anyrouter/auto on a fresh install, instead of pinning the most-used catalog model id. Pinning a single model disables anyrouter/auto's health-aware cross-model failover chain — the first turn can then land on a degraded SKU with no fallback. The /models lookup still contributes the context-window probe used for Claude's 1M-context suffix. most_used_model_id is retained for the models list UI, which still shows the user's pinned auto model. Docs: clarify --model auto default in help text.
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": 2927800,
"size": "2.8 MiB",
"version": "0.1.11 (built 2026-09-06 15:19:27)",
"target": "aarch64-apple-darwin",
"os": "macos-latest",
"startup_version": {
"n": 21,
"min_ms": 3.43,
"median_ms": 3.66,
"p95_ms": 5.6,
"mean_ms": 4.06
},
"startup_help": {
"n": 21,
"min_ms": 2.88,
"median_ms": 3.05,
"p95_ms": 3.83,
"mean_ms": 3.18
}
},
{
"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-06 15:18:38)",
"target": "x86_64-apple-darwin",
"os": "macos-latest",
"startup_version": {
"n": 21,
"min_ms": 30.92,
"median_ms": 34.21,
"p95_ms": 38.73,
"mean_ms": 34.68
},
"startup_help": {
"n": 21,
"min_ms": 36.58,
"median_ms": 37.91,
"p95_ms": 68.38,
"mean_ms": 41.21
}
},
{
"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-06 15:18:16)",
"target": "aarch64-unknown-linux-gnu",
"os": "ubuntu-24.04-arm",
"startup_version": {
"n": 21,
"min_ms": 0.65,
"median_ms": 0.71,
"p95_ms": 0.76,
"mean_ms": 0.71
},
"startup_help": {
"n": 21,
"min_ms": 0.67,
"median_ms": 0.7,
"p95_ms": 0.78,
"mean_ms": 0.71
}
},
{
"asset": "anyr-linux-x86_64",
"kind": "native",
"path": "/home/runner/work/cli/cli/anyr-linux-x86_64",
"bytes": 3230264,
"size": "3.1 MiB",
"version": "0.1.11 (built 2026-09-06 15:18:31)",
"target": "x86_64-unknown-linux-gnu",
"os": "ubuntu-latest",
"startup_version": {
"n": 21,
"min_ms": 0.95,
"median_ms": 0.97,
"p95_ms": 1.02,
"mean_ms": 0.98
},
"startup_help": {
"n": 21,
"min_ms": 0.92,
"median_ms": 0.95,
"p95_ms": 1.11,
"mean_ms": 0.97
}
},
{
"asset": "anyr-windows-x86_64.exe",
"kind": "native",
"path": "D:\\a\\cli\\cli\\anyr-windows-x86_64.exe",
"bytes": 2674688,
"size": "2.6 MiB",
"version": "0.1.11 (built 2026-09-06T15:19:43Z)",
"target": "x86_64-pc-windows-msvc",
"os": "windows-latest",
"startup_version": {
"n": 21,
"min_ms": 8.48,
"median_ms": 8.64,
"p95_ms": 9.19,
"mean_ms": 8.73
},
"startup_help": {
"n": 21,
"min_ms": 8.52,
"median_ms": 8.77,
"p95_ms": 9.17,
"mean_ms": 8.86
}
},
{
"asset": "anyr.wasm",
"kind": "wasm",
"path": "/home/runner/work/cli/cli/target/wasm-pkg/anyr_cli_bg.wasm",
"bytes": 180433,
"size": "176.2 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.
Fresh (no --model) now leaves ANYROUTER_MODEL_MODE=auto and ANTHROPIC_MODEL=anyrouter/auto on a fresh install, instead of pinning the most-used single catalog model. Pinning a single model disables anyrouter/auto's health-aware cross-model failover chain.
Dry-run on a fresh home (with a valid key) now emits:
ANYROUTER_MODEL_MODE=auto
ANTHROPIC_MODEL=anyrouter/auto
CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1
Companion anyrouter PR: #3154 (caugiay disable + auto head bias to stable flagships).