Skip to content

fix(tui): support multiple provider instances of the same type - #385

Merged
Aaronontheweb merged 2 commits into
devfrom
claude-wt-multi-provider
Mar 23, 2026
Merged

fix(tui): support multiple provider instances of the same type#385
Aaronontheweb merged 2 commits into
devfrom
claude-wt-multi-provider

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Collaborator

Summary

Fixes #384. The provider manager TUI assumed one instance per provider type, breaking netclaw provider and netclaw model when two providers shared the same type (e.g., two openai-compatible entries with different endpoints).

  • Rewrite RefreshDisplayProviders() — two-pass approach shows all configured instances followed by unconfigured type placeholders, instead of FirstOrDefault per type
  • Add "+ Add new provider" option — allows adding additional instances of any type (including already-configured types) via the TUI
  • Show display names everywhere — model manager provider selection, role overview, confirm screen, discover screen, and CLI netclaw provider list now show Name (DisplayName) format

Test plan

  • dotnet build — full solution compiles
  • All 226 existing CLI tests pass unchanged
  • 5 new tests added:
    • DisplayProviders_ShowsMultipleInstancesOfSameType
    • StartAddNewProvider_TransitionsToAddSelectType
    • GoBack_FromAddSelectType_ReturnsToList
    • Refresh_PopulatesDisplayNameFromRegistry
    • Refresh_FallsBackToTypeWhenNoRegistry
  • Manual: configure two openai-compatible entries → both appear in netclaw provider TUI
  • Manual: netclaw provider list shows DisplayName column
  • Manual: netclaw model shows Name (DisplayName) in provider selection

The provider manager TUI used FirstOrDefault per provider type, hiding
duplicate instances when two providers shared the same type (e.g., two
openai-compatible entries with different endpoints). Rewrite
RefreshDisplayProviders to show all configured instances followed by
unconfigured type placeholders, and add a "+ Add new provider" option
that presents all types for selection.

Also enrich the model manager and CLI provider list with display names
so users can distinguish provider instances at a glance.
@Aaronontheweb
Aaronontheweb merged commit 31b2ced into dev Mar 23, 2026
3 checks passed
@Aaronontheweb
Aaronontheweb deleted the claude-wt-multi-provider branch March 23, 2026 01:56
@Aaronontheweb Aaronontheweb mentioned this pull request Mar 25, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TUI: Support listing and managing multiple providers of the same type

1 participant