import { getAllowedByokProviders } from '@/lib/byok' import { getLivePublicModels } from '@/lib/ai/live-public-catalog' import { providerDisplayName } from '@/lib/ai/provider-labels' const ENDPOINT_ONLY = new Set(['custom', 'custom_openai', 'custom_anthropic', 'anthropic_custom']) export type PublicByokProvider = { id: string name: string models: string[] } /** Catalogue public : fournisseurs BYOK Business, hors adresses perso. */ export async function getPublicByokCatalog(): Promise { const liveModels = await getLivePublicModels() return getAllowedByokProviders('BUSINESS') .filter((id) => !ENDPOINT_ONLY.has(id)) .map((id) => ({ id, name: providerDisplayName(id), models: liveModels[id] ?? [], })) }