Skip to content

Refactor settings: multi-provider table configuration#56

Merged
Empreiteiro merged 2 commits intomainfrom
feature/settings-multi-provider
Mar 27, 2026
Merged

Refactor settings: multi-provider table configuration#56
Empreiteiro merged 2 commits intomainfrom
feature/settings-multi-provider

Conversation

@Empreiteiro
Copy link
Copy Markdown
Owner

Summary

  • New ProviderConfig database model supporting multiple AI and OCR providers
  • Settings page redesigned with table-based UI showing all providers at once
  • Each provider has edit, test connection, set-default, and delete actions
  • Default providers are pre-seeded (OpenAI, Claude, Gemini, Tesseract, Mistral OCR)
  • Removed dependency validation from settings (moved to dedicated /dependencies page in PR Add dependencies management page #55)
  • ai_provider.py factory reads from ProviderConfig table with legacy fallback

Test plan

  • Navigate to /settings and verify AI Providers and OCR Providers tables render
  • Click "Edit" on a provider, set API key and model, save — verify it persists
  • Click "Test" (⚡) on a provider with a valid key — verify connection test passes
  • Change the default AI provider — verify it's reflected in document processing
  • Verify legacy env-based settings still work as fallback when no provider has a key

🤖 Generated with Claude Code

Empreiteiro and others added 2 commits March 27, 2026 09:17
Replace the single-provider settings form with a table-based UI that
supports multiple AI and OCR providers simultaneously. Each provider
row shows its configuration status, model, and API key state with
edit/test/delete actions. Users can switch the default provider used
for processing without losing other configurations.

- Add ProviderConfig model with kind/provider_name/is_default columns
- Seed default providers (OpenAI, Claude, Gemini, Tesseract, Mistral)
- CRUD API at /api/settings/providers with set-default and test endpoints
- Update ai_provider.py factory to read from ProviderConfig table
- Remove dependency validation from settings page (moved to /dependencies)
- Rewrite settings page with separate AI and OCR provider tables

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… to dependencies

- Merge AI and OCR providers into one table matching the project's
  table style (bg-muted/30 header, group hover, uppercase headers,
  opacity-0 action buttons)
- Add "Type" column (AI / OCR badge) instead of separate card sections
- Remove Tesseract from provider seeds — it is a system dependency
  managed on the /dependencies page, not an API-key provider
- Remove tesseract-specific test logic from settings API
- Use Skeleton loading state consistent with other pages

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Empreiteiro Empreiteiro merged commit 53a02f2 into main Mar 27, 2026
1 of 2 checks passed
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.

1 participant