The model's id in your catalog, for its price.
OptionalonCost?: (usd: number) => voidGets the call's cost, when the catalog has a price.
OptionalproviderOptions?: SharedV4ProviderOptionsPassed to the provider, e.g. a reasoning setting.
const { answers } = await decideAndPrice({
model: openai.decisionModel("gpt-6-luna"),
modelId: "gpt-6-luna",
models: MODELS,
state: ticket.body,
questions: {
queue: { type: "choice", criteria: { billing: "Charges", bug: "Broken" } },
urgent: { type: "boolean", instructions: "Can people not work?" },
},
onCost: ctx.onCost,
});
Asks a decision model its questions about one state (the AI SDK's
experimental_decide) and reports what the call cost, so a decision suite'srunstays one call. Grade the answers withdecisionCheckfromevalkeeper.