Skip to content

fix(cli): fresh path keeps auto -> anyrouter/auto for first-turn failover (#58) - #59

Merged
duyetbot merged 1 commit into
mainfrom
fix/cli-auto-default-58
Sep 7, 2026
Merged

fix(cli): fresh path keeps auto -> anyrouter/auto for first-turn failover (#58)#59
duyetbot merged 1 commit into
mainfrom
fix/cli-auto-default-58

Conversation

@duyetbot

@duyetbot duyetbot commented Sep 6, 2026

Copy link
Copy Markdown
Member

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.

  • src/cmd/launch.rs: keep auto/anyrouter/auto as-is through resolve_session_model; the /models lookup still supplies the context-window probe for Claude's 1M suffix.
  • src/help.rs: document the default model behavior.
  • most_used_model_id retained for the models-list UI.

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).

…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.
@github-actions

github-actions Bot commented Sep 6, 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 3.66 ms 3.05 ms
anyr-darwin-x86_64 native 3.0 MiB 34.21 ms 37.91 ms
anyr-linux-arm64 native 2.8 MiB 0.71 ms 0.7 ms
anyr-linux-x86_64 native 3.1 MiB 0.97 ms 0.95 ms
anyr-windows-x86_64.exe native 2.6 MiB 8.64 ms 8.77 ms
anyr.wasm wasm 176.2 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-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": ""
  }
]

@duyetbot
duyetbot merged commit 3f020ff into main Sep 7, 2026
9 checks passed
@duyetbot
duyetbot deleted the fix/cli-auto-default-58 branch September 7, 2026 06:33
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