Skip to content

feat(management): add AI provider admin CRUD#2

Closed
flooryyyy wants to merge 1 commit intomainfrom
codex/add-admin-crud-for-ai-providers
Closed

feat(management): add AI provider admin CRUD#2
flooryyyy wants to merge 1 commit intomainfrom
codex/add-admin-crud-for-ai-providers

Conversation

@flooryyyy
Copy link
Copy Markdown
Owner

Motivation

  • Provide workspace admins an integrated place to manage AI/model providers (enable/disable, set default, test connection) using the same provider-settings UX patterns as other management pages.
  • Persist provider configuration in system settings so workspace AI features can use a configurable provider list.

Description

  • Add a new management tab and UI section AiProvidersSection at src/app/(main)/management/AiProvidersSection.tsx and wire it into ManagementClient.tsx and the Sidebar under the #ai-providers anchor.
  • Implement REST admin endpoints under src/app/api/management/ai-providers for list/create/update/delete, set default ([id]/default), and connection testing ([id]/test), reusing adminAction auth helper.
  • Persist provider configs in systemSettings.aiProvidersJson with helpers in _lib.ts, add a DB migration src/app/db/migrations/34AddAiProvidersJson.ts, and update DB typings in src/app/lib/types/db.ts.
  • Test connection logic includes lightweight checks for OpenAI, Anthropic and Google (Generative Language) endpoints and normalizes provider data (default enforcement, ids, required fields).

Testing

  • Ran static/type checks: npm run -s check completed successfully (TypeScript types updated and verified).
  • Ran unit tests: vitest run executed (run by the pre-commit hook) and all tests passed.
  • Verified the management UI builds and the new API routes conform to the existing adminAction authorization wrapper during local checks.

Codex Task

@flooryyyy flooryyyy closed this Apr 10, 2026
@flooryyyy flooryyyy deleted the codex/add-admin-crud-for-ai-providers branch April 10, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant