Skip to content

Configured picker treats empty provider headers as configured #4333

Description

@Hmbown

Problem

The TUI's Model · configured view can treat an unconfigured provider as configured when the persisted provider entry contains only an empty table such as:

[providers.anthropic.http_headers]

provider_config_is_explicit previously tested whether http_headers was present, not whether it contained a meaningful nonblank entry. Empty/default provider fields could also survive serialization. A config polluted with these empty tables therefore expanded the configured picker to hundreds of global catalog rows.

This is distinct from the broader provider/catalog refactor in #3949.

Expected behavior

  • Empty maps/tables and blank strings do not count as provider configuration.
  • Nonempty user-authored headers, usable auth/OAuth, and meaningful model/base URL/auth fields do count.
  • The active provider remains visible.
  • The configured picker stays scoped while full catalog/search still discovers unconfigured providers.
  • Saving config omits empty provider/header structures so pollution does not recur.

Evidence and implementation

Draft PR #4332 adds the semantic predicate, empty-structure serialization guards, existing polluted-config compatibility, and focused config/provider/picker tests. Local full TUI verification: 6,378 passed, 0 failed, 2 ignored; config crate: 368 passed, 0 failed.

Acceptance

  • fix: make v0.8.68 TUI state and routing truthful #4332 is reviewed and landed.
  • Empty provider headers do not appear in the configured picker after loading an existing polluted config.
  • Nonempty headers and the active OpenAI Codex route remain visible.
  • Unconfigured Anthropic rows remain discoverable only through full catalog/search.
  • Empty provider/header tables do not survive a save round trip.

Do not close until the landed build is verified against a real previously polluted user config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrelease-blockerMust be fixed before the next releasereliabilityReliability, flaky behavior, retries, fallbacks, and robustnesstuiTerminal UI behavior, rendering, or interactionv0.8.68Targeting v0.8.68

    Projects

    Status
    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions