Skip to content

Variable: ProviderDefinitionSchema

Makaio Framework


Makaio Framework / contracts / ProviderDefinitionSchema

const ProviderDefinitionSchema: ZodObject<{ availableModels: ZodDefault<ZodArray<ZodObject<{ contextWindowSize: ZodNumber; family: ZodOptional<ZodString>; friendlyName: ZodOptional<ZodString>; labId: ZodString; metadata: ZodOptional<ZodObject<{ capabilities: ZodOptional<ZodObject<…, …>>; description: ZodOptional<ZodString>; includedInSubscription: ZodOptional<ZodBoolean>; maxOutputTokens: ZodOptional<ZodNumber>; pricing: ZodOptional<ZodObject<…, …>>; }, $strip>>; name: ZodString; supportedReasoningLevels: ZodOptional<ZodObject<{ extra-high: ZodOptional<ZodUnion<…>>; high: ZodOptional<ZodUnion<…>>; low: ZodOptional<ZodUnion<…>>; medium: ZodOptional<ZodUnion<…>>; none: ZodOptional<ZodUnion<…>>; }, $strip>>; }, $strip>>>; credentialEnvVars: ZodOptional<ZodRecord<ZodString, ZodString>>; defaultModel: ZodOptional<ZodString>; defaultModelFilterMode: ZodOptional<ZodEnum<{ allowlist: "allowlist"; show-all: "show-all"; }>>; description: ZodOptional<ZodString>; endpoints: ZodOptional<ZodObject<{ anthropic: ZodOptional<ZodString>; openai: ZodOptional<ZodString>; }, $strip>>; fastModel: ZodOptional<ZodString>; id: ZodString; name: ZodString; }, $strip>

Defined in: ../../../packages/contracts/src/provider/definition.ts:77

Provider definition schema.

The canonical parsed provider contract. Defines the stable identity, display metadata, protocol endpoints, runtime-populated model catalog, and credential environment variables for a single inference provider.

Static provider packages should declare ProviderDefinitionInput: they describe what a provider is, not how it is configured at runtime. The runtime layer (storage, sync service, model registry) derives parsed provider definitions and per-user provider records from those declarations.

Providers that do not communicate over a network (e.g., GitHub Copilot, which uses its own SDK transport) omit endpoints.

{
id: 'anthropic',
name: 'Anthropic',
description: 'Official Anthropic Claude API',
endpoints: { anthropic: 'https://api.anthropic.com' },
defaultModel: 'claude-sonnet-4-5',
fastModel: 'claude-haiku-4-5',
credentialEnvVars: { apiKey: 'ANTHROPIC_API_KEY' },
}

availableModels is omitted — the registry service populates it from the YAML lab registry at boot time and defaults to [] when absent.