Skip to content

Providers: unified vocabulary, listing fix, and add-provider flow (#1508) - #1513

Open
santoshkumarradha wants to merge 3 commits into
devfrom
feat/1508-providers-unification
Open

santoshkumarradha wants to merge 3 commits into
devfrom
feat/1508-providers-unification

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

Resolves #1508.

Summary

  1. Vocabulary Unification:

    • Standardized on provider as the entity that serves models across UI, settings, commands, manual, and CLI.
    • Retired legacy terminology ("service", "model service", "default service", "connection", "custom connection", "active connection", and group head "models").
    • OpenRouter routing destination standardized on host (row host, "served by ", → hosts, tab hosts).
    • External tools standardized on account.
    • Updated and extended internal/tui3/providerword_law_test.go to enforce vocabulary across non-test strings.
  2. Model Listing Fix & Background Cache Engine:

    • At launch, connected providers with empty or missing caches are fetched in the background off the UI event loop via warmEmptyProviders in app.Init().
    • ctrl+r in /model triggers concurrent refreshes for all connected providers via RefreshAllModels.
    • Providers with listing failures render explicit dim status lines (can't list models · <error> · ctrl+r retry, listing models…, or lists no models · type a model id), never an empty or missing group.
  3. UI Updates (/model, Settings → Providers, /connect):

    • /model group heads show provider name, address, and model count (local 127.0.0.1:8317 · 12 models), and ends with a selectable + add a provider row.
    • Settings → Providers tab lists all providers (including OpenRouter default) with model counts and key status, offering 4 actions on enter: refresh models · rename · change key · disconnect. Host, routing, and speed guard are grouped under a routing head.
    • /connect uses group head providers and description providers and accounts · connect another.
  4. Add Provider Flow & Loopback Probing:

    • Implemented + add a provider with concurrent loopback port probing (11434 Ollama, 1234 LM Studio, 8000 vLLM, 8080 llama.cpp, 8317) under "found on this machine".
    • Added live probing for OpenAI-compatible endpoints (ProbeOpenAIEndpoint) requiring keys only on 401/403.

Review Passes

  • Pass 1 (Defects & Contracts): Zero I/O on draw paths verified; background fetches decoupled from UI loop; error and cancellation propagation tested; loopback port probes bounded by short timeouts.
  • Pass 2 (Architecture & Software Craft): Reuses existing startModelConnect/startCustomAdd/modelEntryAnswer mint flow; clean Bubble Tea command patterns; absence and vocabulary laws passing.

—
Drafted with CodeAF · reviewed and owned by the author

)

The model picker names each service block with its address and model
count, says WHY a service that lists nothing has nothing (fetch error
with ctrl+r retry, in-flight listing, or genuinely empty), and closes
with a selectable '+ add a provider' row that opens the add-provider
flow: the panel walks the machine's local ports and offers the vendored
catalog beside them, every row ending in the one mint flow.

The settings Providers tab leads with the default provider (address,
model count, key status), orders custom and connected services under a
providers head, offers the four actions on enter (refresh models ·
rename · change key · disconnect), and names the host/routing/speed
guard rows under a routing head.

Assisted-by: CodeAF (gemini-3.8-flash-high)
Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
@santoshkumarradha santoshkumarradha added this to the Chat & connections milestone Sep 25, 2026
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

agentfield-bot and others added 2 commits September 25, 2026 16:14
… expect the all-hosts-slow wording; cmd/codeaf: unlock the notices snapshot from a defer

Assisted-by: CodeAF (gemini-3.8-flash-high)
Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
Assisted-by: CodeAF (gemini-3.8-flash-high)
Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
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.

Providers: one word everywhere, a connected provider always lists its models, and adding one takes one step

4 participants