fix(ui): thème, textes et lisibilité restants de la revue
Les boutons suivent la couleur d’apparence, les libellés trop petits ou trop techniques sont clarifiés, et le catalogue des fournisseurs se met à jour tout seul. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
23
memento-note/lib/ai/byok-catalog.ts
Normal file
23
memento-note/lib/ai/byok-catalog.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
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<PublicByokProvider[]> {
|
||||
const liveModels = await getLivePublicModels()
|
||||
return getAllowedByokProviders('BUSINESS')
|
||||
.filter((id) => !ENDPOINT_ONLY.has(id))
|
||||
.map((id) => ({
|
||||
id,
|
||||
name: providerDisplayName(id),
|
||||
models: liveModels[id] ?? [],
|
||||
}))
|
||||
}
|
||||
Reference in New Issue
Block a user