Skip to content

ScaleDown

ScaleDownProvider in the Vercel.AI.ScaleDown namespace creates the ScaleDown models that this port implements. The API reference lists every option: ScaleDownProvider.

Browse the upstream catalog of ScaleDown models and their pricing on the Vercel AI Gateway models page.

Kind Factory method Model ids in this port’s tests and docs
Decision DecisionModel classify-1, classify

A model id in the table is one that the tests or docs use. It is not the complete list of ids the provider accepts. Pass any id that the provider documents.

Decision model:

var model = ScaleDownProvider.Create().DecisionModel("classify-1");
var result = await Decide.DecideAsync(
new DecideRequest
{
Model = model,
State = "I was charged twice for my subscription. Please refund the duplicate.",
Questions = new Dictionary<string, DecisionQuestion>
{
["category"] = new(
"choice",
"Which team should handle this request?",
new DecisionChoiceCriteria(
new Dictionary<string, DecisionInput?>
{
["billing"] = "Charges, invoices, and refunds",
["technical"] = "Bugs and outages",
}
)
),
},
}
);
foreach (var answer in result.Answers)
{
Console.WriteLine($"{answer.Key}: {answer.Value.Choice}");
}

snippet source | anchor

See the Providers guide for authentication and provider options.

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product