Function: getDefinitionOrThrow()
Makaio Framework / ai-adapters-core/config / getDefinitionOrThrow
Function: getDefinitionOrThrow()
Section titled “Function: getDefinitionOrThrow()”getDefinitionOrThrow<
TDefinition>(definitions,definitionId):TDefinition&object
Defined in: ../../../adapters/core/src/config/preset.ts:8
Resolve a provider definition by ID and require a concrete defaultModel.
Type Parameters
Section titled “Type Parameters”TDefinition
Section titled “TDefinition”TDefinition extends object
Parameters
Section titled “Parameters”definitions
Section titled “definitions”TDefinition[]
Available provider definitions for an adapter.
definitionId
Section titled “definitionId”string
Provider definition identifier to resolve.
Returns
Section titled “Returns”TDefinition & object
The matching definition with a guaranteed defaultModel.
Throws
Section titled “Throws”Error when the definition does not exist or does not define defaultModel.