feat: auto-detect models from custom providers

Add 'Detect Models' button to custom provider forms that calls the
provider's /models endpoint to discover available models automatically.

- Supports OpenAI-compatible, Anthropic-compatible, and Google
  Generative AI providers
- Auto-fills context window and max tokens from provider response
- Filters out embedding, reranking, and non-text models
- Removes empty default model rows after detection
- Added comprehensive backend and frontend test coverage
This commit is contained in:
Islam Nofl
2026-05-13 14:13:26 +03:00
parent b4b80ac0cb
commit d57968ae91
7 changed files with 909 additions and 6 deletions

View File

@@ -20,6 +20,7 @@ vi.mock("lucide-react", () => ({
Loader2: ({ className }: { className?: string }) => <svg data-testid="icon-loader" className={className} />,
Pencil: () => <svg data-testid="icon-pencil" />,
Plus: () => <svg data-testid="icon-plus" />,
Search: () => <svg data-testid="icon-search" />,
Trash2: () => <svg data-testid="icon-trash" />,
}));