import type { NexusAIConfig } from '../types/config.js'; import type { EmbeddingModelCapabilities } from '../types/embeddings.js'; import { type AliasMetadata, type ModelCapabilities } from '../types/providers.js'; /** The format a registry data file declares, which a later release reads too. */ export declare const REGISTRY_DATA_FORMAT = "nexus-registry/1"; /** Model and embedding registry data, as a file. */ export interface RegistryData { /** Always `nexus-registry/1`. */ format: typeof REGISTRY_DATA_FORMAT; /** The data's own version, such as the date it was assembled: `2026.10.13`. */ version: string; /** When its entries were last checked against provider documentation, as an ISO date. */ verifiedAt: string; /** Where they were checked. */ source?: string; /** Completion models, by name. */ models: Record; /** Completion aliases, mapped to model names. */ aliases?: Record; /** Each alias's stage and provenance. */ aliasMetadata?: Record; /** Embedding models, by name. */ embeddingModels?: Record; /** Embedding aliases, mapped to model names. */ embeddingAliases?: Record; } /** Raised by `parseRegistryData()` for a file that is not valid registry data, naming every problem. */ export declare class RegistryDataError extends Error { /** Each problem, with the path of the field it is in. */ readonly problems: string[]; constructor( /** Each problem, with the path of the field it is in. */ problems: string[]); } /** * Every problem with a value as registry data, each with the path of its field; empty when it is * valid. An alias must name a model the file or the bundled data has. */ export declare function checkRegistryData(value: unknown): string[]; /** Reads registry data from JSON text or a parsed value, throwing `RegistryDataError` with every problem. */ export declare function parseRegistryData(value: unknown): RegistryData; /** * The data this release bundles, as a file: the starting point for one an application keeps and * updates itself, or a baseline to compare one with. */ export declare function bundledRegistryData(): RegistryData; /** * A client configuration with registry data layered in: the configuration's own entries first, then * the file's, then the bundled ones. Freshness is then measured from the file's `verifiedAt`. * * ```ts * const data = parseRegistryData(await readFile('./registry.json', 'utf8')); * const ai = new NexusAI(withRegistryData({ providers }, data)); * ``` */ export declare function withRegistryData(config: NexusAIConfig, data: RegistryData): NexusAIConfig; /** One field that differs between two versions of a model's entry. */ export interface RegistryFieldChange { /** The field's name, such as `costPer1kInput`. */ field: string; /** Its value before. */ from: unknown; /** Its value after. */ to: unknown; } /** How two versions of registry data differ, for completion and embedding models alike. */ export interface RegistryDiff { /** Models the second has and the first does not. */ added: string[]; /** Models the first has and the second does not. */ removed: string[]; /** Models both have whose entries differ, each with its changed fields. */ changed: Array<{ model: string; changes: RegistryFieldChange[]; }>; /** Aliases whose target differs, was added, or was removed. */ aliases: Array<{ alias: string; from?: string; to?: string; }>; } /** What changed from one version of registry data to another: models, fields, and aliases. */ export declare function diffRegistryData(from: RegistryData, to: RegistryData): RegistryDiff; /** How many whole days old registry data is. */ export declare function registryDataAgeDays(data: Pick, now?: Date): number;