Repository navigation
config: list removed providers only while they are enabled - #6
DreamyTalesPAN wants to merge 2 commits into
Conversation
`config providers` printed one row per ProviderId::all(), including the two soft-removed providers as "Kimi K2 (removed)" and "CrossModel (removed)". The VibeTV Windows app builds its provider list from that output, so a customer was offered both rows (DreamyTalesPAN/CodexBar-Display#547). The command now follows the rule the settings UI already uses for ProviderId::is_deprecated(): a deprecated provider is listed only while it is enabled in settings. Resolving the names (`--provider kimik2`, `config enable kimik2`) is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Question for @DreamyTalesPAN from the VibeTV side (issue DreamyTalesPAN/CodexBar-Display#547). This PR is based on vibetv from 07.10. It is 1 commit ahead and 6 behind, and only rust/src/cli/config.rs changed. I want to bring it up to date and test it on the Windows test laptop. Please answer with 1 or 2:
Also: PR #9 (claude/cli-parity) changes rust/src/cli/config.rs too, so one of the two PRs needs a merge. Which order do you want, or should #6 wait for #9? Until you answer I do not push to this branch. |
|
@marcus7989 Sorry for the late answer: 1 – please merge the current |
…r-filter # Conflicts: # rust/src/cli/config.rs
|
[K-Marcus] The conflict resolution is ready as merge commit 02ababf2 (patch). It retains your commit and merges |
|
Fast-forwarded |
Problem (DreamyTalesPAN/CodexBar-Display#547): the VibeTV Windows app lists every provider that
codexbar config providersprints. That command prints one row perProviderId::all(), so the list contains the two retired providers askimik2: disabled (Kimi K2 (removed))andcrossmodel: disabled (CrossModel (removed)). A VibeTV customer is offered both rows.Rule now (
rust/src/cli/config.rs):config providersfollows the rule the settings UI already uses forProviderId::is_deprecated()("Settings UI hides them unless already enabled in settings",rust/src/core/provider.rs). A deprecated provider is listed only while it is switched on in the settings; otherwise it is left out. The selection moved into a small pure function,listed_providers(&Settings) -> Vec<ProviderId>, whichlist_providers()iterates. Order and row format are unchanged.Not changed:
ProviderId::all(),ProviderId::from_cli_name(so--provider kimik2,config enable kimik2etc. keep resolving), the usage and cost commands, the settings UI. One file, +45 / -5.Validation (macOS host, Rust 1.98.0 from
scripts/circleci-pinned-rust.txt)cargo fmt --all -- --check: clean.cargo test -p codexbar --lib cli::config: 5 passed, 0 failed (2 new, 3 existing; the module's fourth existing test is#[cfg(windows)]and is not compiled on macOS).listed_providers_hides_deprecated_providers_by_default: withSettings::default()neitherKimiK2norCrossModelis listed, and every provider ofProviderId::all()is listed exactly when it is not deprecated.listed_providers_keeps_deprecated_provider_enabled_in_settings: afterenable_provider(KimiK2),KimiK2is listed andCrossModelstill is not.assertion failed: !listed.contains(&ProviderId::KimiK2)/...CrossModel).HOMEpointed at a scratch folder):config providersprints 69 rows instead of 71 and none containsremoved. Afterconfig enable kimik2it prints 70 rows includingkimik2: enabled (Kimi K2 (removed)); afterconfig disable kimik2the row is gone again.Not run: the full test suite,
cargo clippy(on macOS it already fails on an untouchedvibetv), this repo's Windows CI, an MSVC build, the Windows-only test of the module, and the VibeTV Windows app against the new engine.After merge: VibeTV picks this up with the next engine release and the pin bump in
scripts/fetch-win-codexbar.ps1of CodexBar-Display.🤖 Generated with Claude Code