fix: Google provider save after model detection, SSRF protection, PR review fixes

- Add google-generative-ai to CustomProvider.apiType union type
- Update assertApiType to accept google-generative-ai in create/update
- Fix createCustomProvider mapping in legacy.ts for Google type
- Fix fetchCustomProviders mapping for Google type
- Add google-generative-ai to CustomProvidersSection API_TYPES
- Add SSRF protection to probeProviderModels (block private/loopback)
- Add body validation to probe-models route handler
- Update stale JSDoc in legacy.ts
This commit is contained in:
Islam Nofl
2026-05-14 16:56:11 +03:00
parent a487a20bbc
commit 55c35cf611
6 changed files with 61 additions and 13 deletions

View File

@@ -311,7 +311,7 @@ export interface NotificationProviderConfig {
export interface CustomProvider {
id: string;
name: string;
apiType: "openai-compatible" | "anthropic-compatible";
apiType: "openai-compatible" | "anthropic-compatible" | "google-generative-ai";
baseUrl: string;
apiKey?: string;
models?: { id: string; name: string }[];