-
Notifications
You must be signed in to change notification settings - Fork 3.3k
v0.8.63: Split config modules and centralize provider lookup tables #3311
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingcleanupCode cleanup, refactor, or maintenance workCode cleanup, refactor, or maintenance workenhancementNew feature or requestNew feature or requestreliabilityReliability, flaky behavior, retries, fallbacks, and robustnessReliability, flaky behavior, retries, fallbacks, and robustnessrustPull requests that update rust codePull requests that update rust codev0.8.63Targeting v0.8.63Targeting v0.8.63
Milestone
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcleanupCode cleanup, refactor, or maintenance workCode cleanup, refactor, or maintenance workenhancementNew feature or requestNew feature or requestreliabilityReliability, flaky behavior, retries, fallbacks, and robustnessReliability, flaky behavior, retries, fallbacks, and robustnessrustPull requests that update rust codePull requests that update rust codev0.8.63Targeting v0.8.63Targeting v0.8.63
Projects
StatusShow more project fields
Backlog
Problem
The TUI config layer and shared config crate have large provider/config monoliths:
crates/tui/src/config.rscrates/config/src/lib.rsThe analysis found duplicated provider match blocks around a 25-variant provider enum. Adding a provider requires updating multiple synchronized functions, which increases bug risk.
This overlaps with #2608, which already tracks extracting the provider registry from ballooning config files. This issue should either build on #2608 or become the implementation plan for closing it.
Proposed shape
For
crates/tui/src/config.rs, extract focused modules such as:config/constants.rsconfig/provider.rsconfig/model_names.rsconfig/types.rsconfig/loading.rsconfig/env_override.rsconfig/paths.rsconfig/workspace_trust.rsconfig/credentials.rsFor
crates/config/src/lib.rs, extract:Provider registry direction
Replace repeated
match ApiProvider/match ProviderKindblocks with a single lookup-table/metadata accessor where possible. Provider-specific behavior can still exist, but the common metadata should not be duplicated across 5+ functions.Acceptance criteria
Risk
Medium. This needs compatibility tests before deeper module surgery.