Skip to content

Variable: ModelRegistryNamespace

Makaio Framework


Makaio Framework / services-core / ModelRegistryNamespace

const ModelRegistryNamespace: BusNamespace<"modelRegistry", SubjectRecordFromSchemaRecord<{ changed: ZodObject<{ }, $strip>; checkModelInProviders: { 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<…, …>>; name: ZodString; supportedReasoningLevels: ZodOptional<ZodObject<…, …>>; }, $strip>>; }, $strip>; }; getForProvider: { 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<…, …>>; name: ZodString; supportedReasoningLevels: ZodOptional<ZodObject<…, …>>; }, $strip>>; }, $strip>; }; getLabModels: { request: ZodObject<{ labId: ZodString; }, $strip>; response: ZodObject<{ models: ZodArray<ZodObject<{ contextWindowSize: ZodNumber; family: ZodOptional<ZodString>; friendlyName: ZodOptional<ZodString>; labId: ZodString; metadata: ZodOptional<ZodObject<…, …>>; name: ZodString; supportedReasoningLevels: ZodOptional<ZodObject<…, …>>; }, $strip>>; }, $strip>; }; getProviderModels: { request: ZodObject<{ providerId: ZodString; }, $strip>; response: ZodObject<{ models: ZodArray<ZodObject<{ contextWindowSize: ZodNumber; family: ZodOptional<ZodString>; friendlyName: ZodOptional<ZodString>; labId: ZodString; metadata: ZodOptional<ZodObject<…, …>>; name: ZodString; supportedReasoningLevels: ZodOptional<ZodObject<…, …>>; }, $strip>>; }, $strip>; }; refresh: { request: ZodObject<{ }, $strip>; response: ZodObject<{ error: ZodOptional<ZodString>; success: ZodBoolean; }, $strip>; }; }>, {[key: string]: string | string[]; }, { changed: ZodObject<{ }, $strip>; checkModelInProviders: { 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: …; description: …; includedInSubscription: …; maxOutputTokens: …; pricing: …; }, $strip>>; name: ZodString; supportedReasoningLevels: ZodOptional<ZodObject<{ extra-high: …; high: …; low: …; medium: …; none: …; }, $strip>>; }, $strip>>; }, $strip>; }; getForProvider: { 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: …; description: …; includedInSubscription: …; maxOutputTokens: …; pricing: …; }, $strip>>; name: ZodString; supportedReasoningLevels: ZodOptional<ZodObject<{ extra-high: …; high: …; low: …; medium: …; none: …; }, $strip>>; }, $strip>>; }, $strip>; }; getLabModels: { request: ZodObject<{ labId: ZodString; }, $strip>; response: ZodObject<{ models: ZodArray<ZodObject<{ contextWindowSize: ZodNumber; family: ZodOptional<ZodString>; friendlyName: ZodOptional<ZodString>; labId: ZodString; metadata: ZodOptional<ZodObject<{ capabilities: …; description: …; includedInSubscription: …; maxOutputTokens: …; pricing: …; }, $strip>>; name: ZodString; supportedReasoningLevels: ZodOptional<ZodObject<{ extra-high: …; high: …; low: …; medium: …; none: …; }, $strip>>; }, $strip>>; }, $strip>; }; getProviderModels: { request: ZodObject<{ providerId: ZodString; }, $strip>; response: ZodObject<{ models: ZodArray<ZodObject<{ contextWindowSize: ZodNumber; family: ZodOptional<ZodString>; friendlyName: ZodOptional<ZodString>; labId: ZodString; metadata: ZodOptional<ZodObject<{ capabilities: …; description: …; includedInSubscription: …; maxOutputTokens: …; pricing: …; }, $strip>>; name: ZodString; supportedReasoningLevels: ZodOptional<ZodObject<{ extra-high: …; high: …; low: …; medium: …; none: …; }, $strip>>; }, $strip>>; }, $strip>; }; refresh: { request: ZodObject<{ }, $strip>; response: ZodObject<{ error: ZodOptional<ZodString>; success: ZodBoolean; }, $strip>; }; }>

Defined in: ../../../packages/services/core/src/model-registry/namespace.ts:36

Model Registry namespace for accessing model information.

Provides bus subjects for:

  • Resolving a single model for a provider
  • Listing all models for a lab or provider
  • Refreshing registry from remote source
  • Observing registry refresh commits

Prefix: ‘modelRegistry.‘

// Get all models for a provider
const result = await bus.request(ModelRegistrySubjects.getProviderModels, {
providerId: 'anthropic',
});
// Resolve a single model
const resolved = await bus.request(ModelRegistrySubjects.getForProvider, {
providerId: 'anthropic',
model: 'claude-sonnet-4-6',
});
// Force refresh from remote
await bus.request(ModelRegistrySubjects.refresh, {});
// Observe committed refreshes
bus.on(ModelRegistrySubjects.changed, () => {
// Rescan dependent providers
});