Submatter/plans/Plan-automation-foundation/Epic-model-provider-registry/Task-settings-ai-providers-ui.md
Randall Stillwell e256380671 plan(automation): add mission-control foundation backlog and model-routing ADR
Documents the automation foundation plan (nine epics, Epic 1 taskified) and
the accepted model-provider registry contract. Updates .env.example for backlog
import workspace id and local/cloud AI provider env guidance.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 13:55:03 -05:00

63 lines
1.8 KiB
Markdown

---
kind: task
slug: settings-ai-providers-ui
title: Settings UI — AI model providers
plan_slug: automation-foundation
epic_slug: model-provider-registry
status: ready
priority: P1
tenant_id: global
owner: unassigned
cursor_todo_id: null
updated_at: "2026-07-03"
agent_prompt: |
Read docs/adr-model-routing.md. apps/web UI only — reuse components/ui.
Route: /[workspaceSlug]/settings/ai/providers. Do not store secrets in
forms — only api_key_env_var name field. claim_task before work.
---
# Task summary
Build the workspace Settings page for CRUD on model provider aliases, including a “Test connection” action.
## Description
### Route
`apps/web/app/(app)/[workspaceSlug]/settings/ai/providers/page.tsx`
Add nav link under Settings (near runs/audit).
### UI
- Table: alias, display name, provider type, model id, base URL (truncated), enabled, actions
- Add/Edit dialog: all fields from ADR; provider type select drives whether base URL is required
- Test button → calls `ai.models.testProvider` → toast with latency or error
- Delete with confirm
### UX notes
- Show helper text: “API key is read from server env var `ANTHROPIC_API_KEY`” — not a password field
- Example presets (optional buttons): “Ollama local”, “MLX local (mlx-openai-server)”, “Anthropic”, “NVIDIA NIM”, “Gemini” — prefill form per `docs/adr-model-routing.md` § Provider examples
## Subtasks
- [ ] Page + list query
- [ ] Create/edit dialog
- [ ] Test connection + delete
- [ ] Settings nav entry
## Estimation
M
## Acceptance criteria
- [ ] Admin can add `qwen-coder` with Mac Ollama base URL and test it
- [ ] Non-admin sees read-only or hidden mutations
- [ ] Matches existing settings page visual patterns (e.g. runs page)
## Links
- Epic: `./Epic-model-provider-registry.md`
- Depends on: `Task-trpc-models-router.md`