feat(tui): prefab provider templates and test-connection (#5350) - #5406
Draft
Hmbown wants to merge 2 commits into
Draft
feat(tui): prefab provider templates and test-connection (#5350)#5406Hmbown wants to merge 2 commits into
Hmbown wants to merge 2 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #5350: prefab third-party provider templates so users only enter an API key.
[providers.<id>] kind = "openai-compatible"tables with a fixed URL and a common model list. They are not newProviderKindvariants./providerPopens the template list./provider setup agnes|sensenova|opencode-zen|opencode-goand/setup provider …start the matching flow.TTest Connection probes/modelsand reopens the picker with refreshed status. A 2xx is recorded asModelsEndpointPassed→ConnectionCheckedModelUnchecked. It does not callrecord_success/Ready. Truth-boundary on main is preserved./modelno longer labels a failed Models.dev refresh ascache 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-5350andcodex/v098-provider-setup-5350-fixwere not on this VM (git worktree listshowed only/workspace) and were not onorigin. This revision rebuilds the smallest honest TUI/config templates from issue intent plus currentmain(truth-boundary already landed).HEAD:
bd8482f97a65e98b379ba3618a97d6378c0c4eb2Testing
cargo fmt --all -- --checkcargo clippy --workspace --all-targets --all-features --locked(warning-free under the CI allow list)cargo test --workspace --all-features --lockedTargeted, this revision:
cargo test -p codewhale-config --locked(550 passed, includingprovider_templates)cargo test -p codewhale-tui --libfilters: 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_catalogchrome,models_probe_success_marks_connection_checked_not_readyChecklist
No bot/tool
Co-authored-by. Not tagged or published.