Variable: ModelRegistrySchemas
Makaio Framework / services-core / ModelRegistrySchemas
Variable: ModelRegistrySchemas
Section titled “Variable: ModelRegistrySchemas”
constModelRegistrySchemas: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 providermodelRegistry.getLabModels— List all canonical models for a labmodelRegistry.getProviderModels— List all models available from a providermodelRegistry.refresh— Force refresh from remote registrymodelRegistry.changed— Broadcast that the in-memory registry changed
Type Declaration
Section titled “Type Declaration”changed
Section titled “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
Section titled “checkModelInProviders”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.
Example
Section titled “Example”const { matches } = await bus.request(ModelRegistrySubjects.checkModelInProviders, { providerIds: ['anthropic', 'openrouter', 'z-ai'], model: 'claude-sonnet-4-6',});// matches: { anthropic: AIModel, openrouter: AIModel }checkModelInProviders.request
Section titled “checkModelInProviders.request”request:
ZodObject<{model:ZodString;providerIds:ZodArray<ZodString>; },$strip>
checkModelInProviders.response
Section titled “checkModelInProviders.response”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
Section titled “getForProvider”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.
getForProvider.request
Section titled “getForProvider.request”request:
ZodObject<{model:ZodString;providerId:ZodString; },$strip>
getForProvider.response
Section titled “getForProvider.response”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
Section titled “getLabModels”getLabModels:
object
List all canonical model definitions published by a lab.
Returns the full lab model array without any provider-specific overrides.
getLabModels.request
Section titled “getLabModels.request”request:
ZodObject<{labId:ZodString; },$strip>
getLabModels.response
Section titled “getLabModels.response”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
Section titled “getProviderModels”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.
getProviderModels.request
Section titled “getProviderModels.request”request:
ZodObject<{providerId:ZodString; },$strip>
getProviderModels.response
Section titled “getProviderModels.response”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
Section titled “refresh”refresh:
object
Force refresh of the model registry from remote source. Fetches latest registry and updates cache.
refresh.request
Section titled “refresh.request”request:
ZodObject<{ },$strip>
refresh.response
Section titled “refresh.response”response:
ZodObject<{error:ZodOptional<ZodString>;success:ZodBoolean; },$strip>
Examples
Section titled “Examples”const result = await bus.request(ModelRegistrySubjects.getProviderModels, { providerId: 'anthropic',});await bus.request(ModelRegistrySubjects.refresh, {});