import type { ModelCapabilities, ModelLimits, ModelParameters, ModelPricing, ModelStatus, ProviderId } from "@/lib/ai/core/types"; import { OPENAI_CATALOG } from "@/lib/ai/providers/openai/catalog"; import { GEMINI_CATALOG } from "@/lib/ai/providers/gemini/catalog"; import { XAI_CATALOG } from "@/lib/ai/providers/xai/catalog"; import { MISTRAL_CATALOG } from "@/lib/ai/providers/mistral/catalog"; import { DEEPSEEK_CATALOG } from "@/lib/ai/providers/deepseek/catalog"; import { KIMI_CATALOG } from "@/lib/ai/providers/kimi/catalog"; import { CEREBRAS_CATALOG } from "@/lib/ai/providers/cerebras/catalog"; /** * Documented augmentation for models whose list endpoint lacks capability metadata. * Everything here comes from `docs/provider-research/*.md` (official docs + real probes). * Adapters' `listModels()` produces the base object; the catalog fills the gaps. */ export interface CatalogEntry { displayName?: string; family?: string; capabilities: ModelCapabilities; capabilityOverrides?: Partial; limits?: ModelLimits; parameters?: ModelParameters; parameterOverrides?: Partial; pricing?: ModelPricing | null; status?: ModelStatus; sortWeight?: number; metadata?: Record; } const CATALOGS: Record> = { openai: OPENAI_CATALOG, anthropic: new Map(), // Anthropic's Models API returns full capability metadata; pricing lives in the adapter. gemini: GEMINI_CATALOG, xai: XAI_CATALOG, mistral: MISTRAL_CATALOG, deepseek: DEEPSEEK_CATALOG, kimi: KIMI_CATALOG, openrouter: new Map(), // fully live metadata from /api/v1/models cerebras: CEREBRAS_CATALOG, custom: new Map(), // user endpoints: capabilities come from discovery + the user's manual declarations }; export function getCatalog(provider: ProviderId): Map { return CATALOGS[provider]; }