Skip to content

feat(tui): prefab provider templates and test-connection (#5350) - #5406

Draft
Hmbown wants to merge 2 commits into
mainfrom
cursor/v098-provider-setup-5350-3e4c
Draft

feat(tui): prefab provider templates and test-connection (#5350)#5406
Hmbown wants to merge 2 commits into
mainfrom
cursor/v098-provider-setup-5350-3e4c

Conversation

@Hmbown

@Hmbown Hmbown commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Summary

Implements #5350: prefab third-party provider templates so users only enter an API key.

  • Built-in templates for OpenCode Zen, OpenCode Go, Agnes, and SenseNova (issue: “Meituan Sensenova”). First-class routes keep their existing key-only guided setup; Agnes and SenseNova persist as named [providers.<id>] kind = "openai-compatible" tables with a fixed URL and a common model list. They are not new ProviderKind variants.
  • /provider P opens the template list. /provider setup agnes|sensenova|opencode-zen|opencode-go and /setup provider … start the matching flow.
  • T Test Connection probes /models and reopens the picker with refreshed status. A 2xx is recorded as ModelsEndpointPassedConnectionCheckedModelUnchecked. It does not call record_success / Ready. Truth-boundary on main is preserved.
  • /model no longer labels a failed Models.dev refresh as cache failed. Chrome matches /provider: refresh failed; catalog available. OpenCode Zen’s fallback list is the full curated roster.

Harvest notes

Lanes codex/v098-provider-setup-5350 and codex/v098-provider-setup-5350-fix were not on this VM (git worktree list showed only /workspace) and were not on origin. This revision rebuilds the smallest honest TUI/config templates from issue intent plus current main (truth-boundary already landed).

HEAD: bd8482f97a65e98b379ba3618a97d6378c0c4eb2

Testing

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features --locked (warning-free under the CI allow list)
  • cargo test --workspace --all-features --locked

Targeted, this revision:

  • cargo test -p codewhale-config --locked (550 passed, including provider_templates)
  • cargo test -p codewhale-tui --lib filters: catalog inject, Agnes key-only, P/T, template constructor, model list, /provider setup / /setup provider, identity fallback, provider_key_submit_opens_model_pick_without_persisting_on_validation_success (truth-boundary), Test Connection 2xx ≠ Ready, Test Connection without key, failed_live_catalog chrome, models_probe_success_marks_connection_checked_not_ready

Checklist

  • Updated docs or comments as needed
  • Added or updated tests where relevant
  • Verified TUI behavior manually if UI changes
  • Harvested/co-authored credit uses a GitHub numeric noreply address

No bot/tool Co-authored-by. Not tagged or published.

Open in Web Open in Cursor 

cursoragent and others added 2 commits August 15, 2026 07:52
Built-in /provider templates for OpenCode Zen, OpenCode Go, Agnes, and
SenseNova so setup asks only for an API key. First-class routes keep
their existing guided flow; Agnes and SenseNova persist as named
openai-compatible tables with a fixed URL and a common model list.

T (Test Connection) probes /models and refreshes picker status. A 2xx
is reachability only — LastProviderCheck::ModelsEndpointPassed, never
Ready. /model cache-failed chrome now says refresh failed; catalog
available, and Zen's fallback list is the full curated roster.

Harvest: lanes codex/v098-provider-setup-5350 and
codex/v098-provider-setup-5350-fix were not on this VM or origin.
Rebuilt the smallest TUI/config templates; no new ProviderKind variants.

Agent assistance: Cursor Cloud agent used for implementation.
Verification pending on this revision.

Co-authored-by: Hunter Bown <Hmbown@users.noreply.github.com>
The #5350 picker tests need a row-focus helper. Leaving #[test] on
move_to_provider_id made the lib-test build fail because test functions
cannot take arguments.

Verified: cargo fmt --all -- --check; cargo test -p codewhale-config
--locked provider_templates; cargo test -p codewhale-tui --lib
catalog_injects_unconfigured, enter_on_agnes, p_opens_template,
t_emits_test_connection, template_setup_constructor,
validated_model_pick_for_agnes, custom_agnes_template_seeds,
setup_subcommand_opens_agnes, setup_subcommand_opens_first_class,
setup_provider_agnes, picker_identity_resolves,
provider_key_submit_opens_model_pick, test_connection_records,
test_connection_without_key, failed_live_catalog,
models_probe_success_marks_connection_checked_not_ready.

Agent assistance: Cursor Cloud agent used for implementation and verification.

Co-authored-by: Hunter Bown <Hmbown@users.noreply.github.com>
@cursor cursor Bot changed the title WIP: prefab provider templates and test-connection (#5350) feat(tui): prefab provider templates and test-connection (#5350) Aug 15, 2026
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.

2 participants