fix(cli): honor an explicit --router on configure provider - #1532
Open
249469326i-lang wants to merge 1 commit into
Open
fix(cli): honor an explicit --router on configure provider#1532249469326i-lang wants to merge 1 commit into
249469326i-lang wants to merge 1 commit into
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.
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.
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.