Skip to content

Function: buildProviderContext()

Makaio Framework


Makaio Framework / services-core / buildProviderContext

buildProviderContext(bus, providerConfigId): Promise<{ credentialEnvVars?: Record<string, string>; credentialRefs: Record<string, string & $brand<"CredentialRef">>; definitionId: string; endpointOverrides?: { anthropic?: string; openai?: string; }; providerConfigId: string; }>

Defined in: ../../../packages/services/core/src/provider-context/build-provider-context.ts:16

Resolve the bus-safe provider context via the adapter subsystem subject.

The adapter subsystem owns the canonical provider-context assembly. This helper keeps framework consumers on that seam while preserving the local error contract for missing provider configs.

IMakaioBus

Bus instance used to request the subsystem subject

string

Provider config identifier to resolve

Promise<{ credentialEnvVars?: Record<string, string>; credentialRefs: Record<string, string & $brand<"CredentialRef">>; definitionId: string; endpointOverrides?: { anthropic?: string; openai?: string; }; providerConfigId: string; }>

Unresolved provider context with credential refs

Error when the config cannot be found