import type { Model, ModelID, ProviderID } from "./schema" export type ModelOptions = Pick /** * Advanced structural provider definition helper. Built-in providers should * prefer explicit `configure(options).model(id)` facades so deployment config is * chosen before model selection. The optional `apis` map remains for external * structural providers that expose multiple route selectors behind one provider. */ export type ModelFactory = ( id: string | ModelID, options?: Options, ) => Model type AnyModelFactory = (...args: never[]) => Model export interface Definition { readonly id: ProviderID readonly model: Factory readonly apis?: Record } type DefinitionShape = { readonly id: ProviderID readonly model: (...args: never[]) => Model readonly apis?: Record Model> } type NoExtraFields = Input & Record, never> export const make = ( definition: NoExtraFields, ) => definition export * as Provider from "./provider"