Files
browser/openspec/changes/implement-ai-provider-management/tasks.md
T
2026-07-11 14:56:10 +08:00

2.2 KiB

1. Backend Contracts And Service

  • 1.1 Add AI provider update, status, test, and model-list DTO contracts with redacted response shapes.
  • 1.2 Extend service.Core with AI provider update, status, local test, and model-list methods using existing validators and repositories.

2. Backend API Surface

  • 2.1 Implement AI provider management routes for update, status, test, and models using named DTOs and service methods.
  • 2.2 Update platform route/protocol documentation for implemented AI provider management routes and deferred live invocation.
  • 2.3 Add backend service/API tests for update, enable/disable, test/models, missing resources, duplicate handling, and raw key rejection.

3. Frontend Contracts And Page

  • 3.1 Add centralized platform_web/api AI provider types and PlatformApiClient methods for list/create/update/status/test/models.
  • 3.2 Replace the placeholder AI provider page with a functional operational management view using the API client and no raw key display.
  • 3.3 Add frontend tests for page rendering, management actions, API client calls, and raw-key field absence.

4. Verification

  • 4.1 Run go test ./... from platform/ and record evidence.
  • 4.2 Run frontend tests/build from platform_web/ and record evidence.
  • 4.3 Run a browser walkthrough of the AI provider page and record evidence.
  • 4.4 Run scripts/check-structure.sh and record evidence.
  • 4.5 Run openspec validate implement-ai-provider-management --strict and record evidence.

Evidence

  • go test ./domain ./dto: passed.
  • go test ./service ./api: passed.
  • go test ./... from platform/: passed.
  • npm test from platform_web/: passed.
  • npm run typecheck from platform_web/: passed.
  • npm run build from platform_web/: passed.
  • Browser walkthrough with Playwright Chromium against http://127.0.0.1:5173/#/aiProviders: passed; rendered AI provider management, created Browser Check Provider, tested metadata, toggled status, and verified visible text did not contain rawApiKey, api_key=, Bearer , or sk-.
  • scripts/check-structure.sh: passed.
  • openspec validate implement-ai-provider-management --strict: passed.