providerRequired
DecisionProvider
Independent decision provider used once per harness step after compaction.
modelRequired
string
Named router model, independently of the conversational candidate models.
decisionRequired
Decision<Q>
Frozen question declaration containing the selected choice question.
questionRequired
Key
Explicit choice-question key whose criteria exactly match the candidate model keys.
modelsRequired
Readonly<Record<\${Extract<keyof Extract<Q[Key], ChoiceQuestion>[“criteria”], string | number>}`, ModelSpec>>`
One candidate per declared choice; all use the harness model provider and have independent model settings.
minConfidenceOptional
number | undefined
Confidence threshold in [0,1]; lower confidence selects fallback. Defaults to 0.85 when declared.
fallbackRequired
\${Extract<keyof Extract<Q[Key], ChoiceQuestion>[“criteria”], string | number>}“
Declared candidate key used for low confidence or permitted router failures.
onErrorOptional
"fallback" | "fail" | undefined
Defaults to fallback for timeout or classified unavailability only; fail propagates those faults. Other faults always propagate.
stateOptional
((context: HarnessModelRoutingContext) => DecisionState | Promise<DecisionState>) | undefined
Optional synchronous/asynchronous state builder; default state contains instructions, visible history, tools, step and active model without opaque reasoning.