Skip to content

fix(cli): honor an explicit --router on configure provider - #1532

Merged
Open-Squilla merged 1 commit into
TokenRhythm:mainfrom
ShaunMX:fix/1341-configure-provider-router
Sep 16, 2026
Merged

Open-Squilla merged 1 commit into
TokenRhythm:mainfrom
ShaunMX:fix/1341-configure-provider-router

Conversation

@ShaunMX

@ShaunMX ShaunMX commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Fixes #1341

Summary

  • The headless configure provider branch applied the provider payload and persisted immediately, so an explicit --router disabled was silently dropped: a fresh profile reported routerMode: "recommended" and synthesized the default c0–c3 tier ladder instead of disabling the router.
  • The explicit flag is now plumbed through to the router mutation after the provider apply (same order as the onboard --provider path).

Semantics

  • Explicit --router <mode> is authoritative, matching the command help (recommended | openrouter-mix | disabled).
  • Omitted --router keeps the stored/synthesized router state untouched on a re-save (a provider key rotation never re-enables a disabled router).
  • An invalid mode now exits 2 with the mode validation message instead of being silently ignored.

Tests

  • tests/test_cli/test_onboard_cmd_headless_semantics.py:
    • fresh-config repro: configure provider --router disabled yields [squilla_router] enabled = false;
    • keep-current: a provider re-save without --router leaves a disabled router disabled;
    • invalid --router exits 2 naming the mode constraint.
  • Focused suites: 42 passed (headless semantics) + 341 passed (related onboard/mutation suites); ruff clean.
  • Manually verified on Windows: the released 0.5.4 CLI reports routerMode: "recommended" for the issue's repro command; after this fix the same command reports "disabled" and writes enabled = false to config.toml.

The headless `configure provider` branch applied the provider payload and
persisted immediately, so an explicit `--router disabled` was silently
dropped: fresh profiles reported routerMode "recommended" and synthesized
the default c0-c3 ladder instead of disabling the router (TokenRhythm#1341).

Plumb the explicit flag through to the router mutation after the provider
apply (same order as the `onboard --provider` path). An omitted --router
keeps the stored/synthesized router state untouched, and an invalid value
now exits 2 with the mode validation message instead of being ignored.
@github-actions

Copy link
Copy Markdown

Merge queue CI: failurerun 35080876707, attempt 1.
Tested queue candidate: 6e8b6aec0703809d7f85706e5a7b13e7e95c9097. This result belongs to that combined tree, not necessarily the PR's current head.

The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 16, 2026
@Open-Squilla
Open-Squilla added this pull request to the merge queue Sep 16, 2026
@github-actions

Copy link
Copy Markdown

Merge queue CI: cancelledrun 35086975217, attempt 1.
Tested queue candidate: 2c6af7e528d62626a0f134a67ad8901e240b178d. This result belongs to that combined tree, not necessarily the PR's current head.

The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed.

@github-actions

Copy link
Copy Markdown

Merge queue CI: failurerun 35087538302, attempt 1.
Tested queue candidate: 2ac960aac3f41bf64aa3979b49634112e8787055. This result belongs to that combined tree, not necessarily the PR's current head.

The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 16, 2026
@github-actions

Copy link
Copy Markdown

Merge queue CI: failurerun 35087538302, attempt 2.
Tested queue candidate: 2ac960aac3f41bf64aa3979b49634112e8787055. This result belongs to that combined tree, not necessarily the PR's current head.

The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed.

@Open-Squilla
Open-Squilla added this pull request to the merge queue Sep 16, 2026
@github-actions

Copy link
Copy Markdown

Merge queue CI: cancelledrun 35098700147, attempt 1.
Tested queue candidate: 8259c0b574fcf9385b515efa992219de5ff366d2. This result belongs to that combined tree, not necessarily the PR's current head.

The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed.

Merged via the queue into TokenRhythm:main with commit 5ba0481 Sep 16, 2026
23 checks passed
@github-actions

Copy link
Copy Markdown

Merge queue CI: successrun 35101511798, attempt 1.
Tested queue candidate: 5ba0481d1ccdfbf9ced4e7bca75a83ba77a0ec46. This result belongs to that combined tree, not necessarily the PR's current head.

The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed.

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.

[Bug]: configure provider ignores an explicit --router disabled on a fresh profile

2 participants