Skip to content

Interface: CanonicalModelResolverDeps

Makaio Framework


Makaio Framework / services-core / CanonicalModelResolverDeps

Defined in: ../../../packages/services/core/src/canonical-model/resolver-deps.ts:32

Dependencies for framework canonical-model resolution.

All lookups are expressed as async functions. The service implementation wires these to bus RPCs; tests can stub them directly.

findConfigForDefinitionAndAdapter(definitionId, adapterName): Promise<{ id: string; } | undefined>

Defined in: ../../../packages/services/core/src/canonical-model/resolver-deps.ts:80

Find a provider config for a definition that is bound to a specific adapter.

Searches enabled configs for the definition in preference order (isDefault first), returning the first that has a binding to the given adapter.

string

The provider definition ID

string

The adapter to require a binding for

Promise<{ id: string; } | undefined>


findDefaultConfigForDefinition(definitionId): Promise<{ id: string; } | undefined>

Defined in: ../../../packages/services/core/src/canonical-model/resolver-deps.ts:69

Find the default provider config for a provider definition.

Returns the config marked isDefault for the given definition, falling back to the first enabled config when no default is set. Only the config’s id is consumed by the resolver.

string

The provider definition ID to look up

Promise<{ id: string; } | undefined>


findProviderConfigByName(name): Promise<{ id: string; } | undefined>

Defined in: ../../../packages/services/core/src/canonical-model/resolver-deps.ts:46

Find a provider config by name (case-insensitive slug match). Returns minimal identity.

string

The provider config name to search for

Promise<{ id: string; } | undefined>


findProviderDefinition(id, enabledAdapterNames?): Promise<{ availableModels: object[]; credentialEnvVars?: Record<string, string>; defaultModel?: string; defaultModelFilterMode?: "allowlist" | "show-all"; description?: string; endpoints?: { anthropic?: string; openai?: string; }; fastModel?: string; id: string; name: string; } | undefined>

Defined in: ../../../packages/services/core/src/canonical-model/resolver-deps.ts:53

Find a ProviderDefinition by ID.

string

The provider definition ID to look up

readonly string[]

Optional enabled adapter names already loaded by the caller

Promise<{ availableModels: object[]; credentialEnvVars?: Record<string, string>; defaultModel?: string; defaultModelFilterMode?: "allowlist" | "show-all"; description?: string; endpoints?: { anthropic?: string; openai?: string; }; fastModel?: string; id: string; name: string; } | undefined>


getDefaultBinding(adapterName): Promise<{ adapterName: string; isDefault: boolean; providerConfigId: string; } | undefined>

Defined in: ../../../packages/services/core/src/canonical-model/resolver-deps.ts:40

Get the preferred binding for an adapter.

string

The adapter to retrieve the default binding for

Promise<{ adapterName: string; isDefault: boolean; providerConfigId: string; } | undefined>


listBindingsForConfig(providerConfigId): Promise<object[]>

Defined in: ../../../packages/services/core/src/canonical-model/resolver-deps.ts:59

Get all bindings for a given provider config ID.

string

The provider config ID to list bindings for

Promise<object[]>


listEnabledAdapterNames(): Promise<string[]>

Defined in: ../../../packages/services/core/src/canonical-model/resolver-deps.ts:34

List all enabled adapter names.

Promise<string[]>


resolveDefaultModelTarget(model): Promise<DefaultModelResolution>

Defined in: ../../../packages/services/core/src/canonical-model/resolver-deps.ts:91

Resolve a bare model name to a target via the default chain.

This is the seam for future framework-owned preference policies.

string

The bare model name to resolve

Promise<DefaultModelResolution>