Function: resolveProviderResolution()
Makaio Framework / ai-adapters-core/config / resolveProviderResolution
Function: resolveProviderResolution()
Section titled “Function: resolveProviderResolution()”resolveProviderResolution(
bus,providerConfigId,protocol):Promise<ProviderResolution>
Defined in: ../../../adapters/core/src/config/resolve-provider-resolution.ts:55
Resolve a ProviderConfig to its full runtime data: config record, definition record, endpoint URL, and plaintext credentials.
Encapsulates the common lookup chain shared by the adapter config factory and the provider endpoint resolver:
AdapterSubsystemSubjects.getProviderConfigfor the canonical read modelAdapterSubsystemSubjects.buildProviderContextfor runtime credential refs and endpoint overridesProviderStorageSubjects.getfor provider-definition metadatacontext.endpointOverrides?.[protocol] ?? definition.endpoints?.[protocol]- Opens a DirectChannel via
CredentialSubjects.getChannelTokenand resolves each credential ref; the channel is closed after use.
Callers keep only their differing post-resolution logic (e.g., strict
baseUrl / apiKey validation for HTTP bridges vs. nullable baseUrl
for adapter factories that allow env-var fallbacks).
Parameters
Section titled “Parameters”Bus instance for storage and credential requests
providerConfigId
Section titled “providerConfigId”string
UUID of the ProviderConfig to resolve
protocol
Section titled “protocol”"anthropic" | "openai"
Wire protocol used to select the correct endpoint URL
Returns
Section titled “Returns”Promise<ProviderResolution>
Fully resolved provider data
Throws
Section titled “Throws”Error when the ProviderConfig or its ProviderDefinition is not found