Skip to content

Variable: ModelRegistrySchemas

Makaio Framework


Makaio Framework / services-core / ModelRegistrySchemas

const ModelRegistrySchemas: object

Defined in: ../../../packages/services/core/src/model-registry/schemas.ts:189

Model registry bus schemas.

Subjects for model-registry-related bus communication. Each key becomes a subject identifier as: modelRegistry.{key}

Bus subjects:

  • modelRegistry.getForProvider — Resolve a single model for a provider
  • modelRegistry.getLabModels — List all canonical models for a lab
  • modelRegistry.getProviderModels — List all models available from a provider
  • modelRegistry.refresh — Force refresh from remote registry
  • modelRegistry.changed — Broadcast that the in-memory registry changed

changed: ZodObject<{ }, $strip>

Broadcast that the registry has been refreshed and committed.

Fire-and-forget event used by consumers that need to rescan registry-backed capabilities after a successful refresh.

checkModelInProviders: object

Batch-check model availability across multiple providers in a single RPC.

Accepts an array of provider IDs and a canonical lab model name. Returns a map of providerId → resolved ProviderAIModel containing only the providers that have the model. Providers absent from the registry or that do not list the model are omitted from the result.

Use this subject instead of calling getForProvider in a loop — it collapses N sequential RPCs into a single bus request.

const { matches } = await bus.request(ModelRegistrySubjects.checkModelInProviders, {
providerIds: ['anthropic', 'openrouter', 'z-ai'],
model: 'claude-sonnet-4-6',
});
// matches: { anthropic: AIModel, openrouter: AIModel }

request: ZodObject<{ model: ZodString; providerIds: ZodArray<ZodString>; }, $strip>

response: ZodObject<{ matches: ZodRecord<ZodString, ZodObject<{ contextWindowSize: ZodNumber; family: ZodOptional<ZodString>; friendlyName: ZodOptional<ZodString>; labId: ZodString; metadata: ZodOptional<ZodObject<{ capabilities: ZodOptional<…>; description: ZodOptional<…>; includedInSubscription: ZodOptional<…>; maxOutputTokens: ZodOptional<…>; pricing: ZodOptional<…>; }, $strip>>; name: ZodString; supportedReasoningLevels: ZodOptional<ZodObject<{ extra-high: ZodOptional<…>; high: ZodOptional<…>; low: ZodOptional<…>; medium: ZodOptional<…>; none: ZodOptional<…>; }, $strip>>; }, $strip>>; }, $strip>

getForProvider: object

Resolve a single model by provider and provider-native model ID.

Returns the merged model descriptor (lab definition + provider overrides), or undefined if the model is not found for the given provider.

request: ZodObject<{ model: ZodString; providerId: ZodString; }, $strip>

response: ZodObject<{ model: ZodOptional<ZodObject<{ contextWindowSize: ZodNumber; family: ZodOptional<ZodString>; friendlyName: ZodOptional<ZodString>; labId: ZodString; metadata: ZodOptional<ZodObject<{ capabilities: ZodOptional<…>; description: ZodOptional<…>; includedInSubscription: ZodOptional<…>; maxOutputTokens: ZodOptional<…>; pricing: ZodOptional<…>; }, $strip>>; name: ZodString; supportedReasoningLevels: ZodOptional<ZodObject<{ extra-high: ZodOptional<…>; high: ZodOptional<…>; low: ZodOptional<…>; medium: ZodOptional<…>; none: ZodOptional<…>; }, $strip>>; }, $strip>>; }, $strip>

getLabModels: object

List all canonical model definitions published by a lab.

Returns the full lab model array without any provider-specific overrides.

request: ZodObject<{ labId: ZodString; }, $strip>

response: ZodObject<{ models: ZodArray<ZodObject<{ contextWindowSize: ZodNumber; family: ZodOptional<ZodString>; friendlyName: ZodOptional<ZodString>; labId: ZodString; metadata: ZodOptional<ZodObject<{ capabilities: ZodOptional<…>; description: ZodOptional<…>; includedInSubscription: ZodOptional<…>; maxOutputTokens: ZodOptional<…>; pricing: ZodOptional<…>; }, $strip>>; name: ZodString; supportedReasoningLevels: ZodOptional<ZodObject<{ extra-high: ZodOptional<…>; high: ZodOptional<…>; low: ZodOptional<…>; medium: ZodOptional<…>; none: ZodOptional<…>; }, $strip>>; }, $strip>>; }, $strip>

getProviderModels: object

List all models available from a provider (merged with lab definitions).

Returns the full merged model list for the provider — lab defaults with provider-specific overrides applied.

request: ZodObject<{ providerId: ZodString; }, $strip>

response: ZodObject<{ models: ZodArray<ZodObject<{ contextWindowSize: ZodNumber; family: ZodOptional<ZodString>; friendlyName: ZodOptional<ZodString>; labId: ZodString; metadata: ZodOptional<ZodObject<{ capabilities: ZodOptional<…>; description: ZodOptional<…>; includedInSubscription: ZodOptional<…>; maxOutputTokens: ZodOptional<…>; pricing: ZodOptional<…>; }, $strip>>; name: ZodString; supportedReasoningLevels: ZodOptional<ZodObject<{ extra-high: ZodOptional<…>; high: ZodOptional<…>; low: ZodOptional<…>; medium: ZodOptional<…>; none: ZodOptional<…>; }, $strip>>; }, $strip>>; }, $strip>

refresh: object

Force refresh of the model registry from remote source. Fetches latest registry and updates cache.

request: ZodObject<{ }, $strip>

response: ZodObject<{ error: ZodOptional<ZodString>; success: ZodBoolean; }, $strip>

const result = await bus.request(ModelRegistrySubjects.getProviderModels, {
providerId: 'anthropic',
});
await bus.request(ModelRegistrySubjects.refresh, {});