DecisionModels
Namespace: Vercel.AI.Operations
public static class DecisionModelsResolves decision models, including string model ids. Maps to resolveDecisionModel.
Inheritance: object
Fields
Section titled “Fields”MissingProviderMessage
Section titled “MissingProviderMessage”public const string MissingProviderMessage = "The default provider does not support decision models."Message thrown when the default provider has no decision models.
Value: string
Properties
Section titled “Properties”DefaultProvider
Section titled “DefaultProvider”public static ProviderBase? DefaultProvider { get; set; }The global default provider (AI_SDK_DEFAULT_PROVIDER). A string model id is resolved through it. It must
implement IDecisionProvider or the deprecated IEvaluationProvider. When null, string ids go through Gateway.
Value: ProviderBase
GatewayFactory
Section titled “GatewayFactory”public static Func<GatewayProvider>? GatewayFactory { get; set; }Creates the provider used when DefaultProvider is null. Null uses a shared GatewayProvider.
Value: Func<GatewayProvider>
Methods
Section titled “Methods”Resolve(IDecisionCaller?, string?)
Section titled “Resolve(IDecisionCaller?, string?)”public static IDecisionCaller Resolve(IDecisionCaller? model, string? modelId)Resolves a decision model. <code class=“paramref”>model</code> wins when set. Otherwise <code class=“paramref”>modelId</code> goes through DefaultProvider, or Gateway when none is set.
Parameters
| Name | Type | Description |
|---|---|---|
model |
IDecisionCaller | |
modelId |
string |
Returns: IDecisionCaller
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product