fix(cli): honor an explicit --router on configure provider - #1532
Conversation
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.
|
Merge queue CI: failure — run 35080876707, attempt 1.
The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed. |
|
Merge queue CI: failure — run 35087538302, attempt 1. The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed. |
|
Merge queue CI: failure — run 35087538302, attempt 2.
The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed. |
|
Merge queue CI: cancelled — run 35098700147, attempt 1.
The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed. |
|
Merge queue CI: success — run 35101511798, attempt 1. The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed. |
Fixes #1341
Summary
configure providerbranch applied the provider payload and persisted immediately, so an explicit--router disabledwas silently dropped: a fresh profile reportedrouterMode: "recommended"and synthesized the default c0–c3 tier ladder instead of disabling the router.onboard --providerpath).Semantics
--router <mode>is authoritative, matching the command help (recommended | openrouter-mix | disabled).--routerkeeps the stored/synthesized router state untouched on a re-save (a provider key rotation never re-enables a disabled router).Tests
tests/test_cli/test_onboard_cmd_headless_semantics.py:configure provider --router disabledyields[squilla_router] enabled = false;--routerleaves a disabled router disabled;--routerexits 2 naming the mode constraint.ruffclean.routerMode: "recommended"for the issue's repro command; after this fix the same command reports"disabled"and writesenabled = falsetoconfig.toml.