Classify several criteria with an AI SDK decision model. Each criterion is
one choice question, keyed by its name, in one experimental_decide call,
and the answers come back as one outcome per criterion in the order given.
Decision models don't generate text, so outcomes have no explanation; label
probabilities, the provider's confidence (when it reports one) and the
resolved model ID go in each result's metadata.
experimental_decide throws when the model refuses any question, dropping
the answers to the others. The refused criteria become refusal failures
and the remaining criteria are asked again without them, so a refusal costs
one extra request instead of every sibling's result.
Classify several criteria with an AI SDK decision model. Each criterion is one choice question, keyed by its name, in one
experimental_decidecall, and the answers come back as one outcome per criterion in the order given. Decision models don't generate text, so outcomes have no explanation; label probabilities, the provider's confidence (when it reports one) and the resolved model ID go in each result's metadata.experimental_decidethrows when the model refuses any question, dropping the answers to the others. The refused criteria becomerefusalfailures and the remaining criteria are asked again without them, so a refusal costs one extra request instead of every sibling's result.