Skip to content

rulvar API reference


rulvar API reference / @rulvar/core / resolveModelInvocation

Function: resolveModelInvocation()

ts
function resolveModelInvocation(options): ResolvedInvocation;

Defined in: packages/core/src/model/router.ts:193

Resolution runs on every model invocation, not once per agent: a layered merge of { model, effort, providerOptions, fallbacks } in the order call override > agent profile > workflow defaults > engine defaults, with the invocation role attached as a tag. After resolution the router reads ModelCaps and scrubs illegal parameters visibly: unsupported effort is removed from the wire but kept in identity; sampling params rejected by the model are removed from the adapter's namespace, never silently sent.

Parameters

ParameterTypeDescription
options{ call?: ResolutionLayer; capsOf: (ref) => ModelCaps; engine?: ResolutionLayer; floors?: QualityFloors; profile?: ResolutionLayer; role: InvocationRole; taskClass?: string; workflow?: ResolutionLayer; }-
options.call?ResolutionLayer-
options.capsOf(ref) => ModelCaps-
options.engine?ResolutionLayer-
options.floors?QualityFloorsHard router constraints; violation is a typed ConfigError (M4-T09).
options.profile?ResolutionLayer-
options.roleInvocationRole-
options.taskClass?stringProfile-declared task class; absent = unclassified, byRole only.
options.workflow?ResolutionLayer-

Returns

ResolvedInvocation