Skip to content

GatewayDecisionProvider

Namespace: E2E.Decision.Sdk.Gateway

public sealed class GatewayDecisionProvider : IDecisionProvider

.NET-only: the AI SDK’s createGateway decision-model factory, served by the Vercel.AI package’s GatewayProvider instead of a port inside E2E.Decision. It makes decisionModel (and the deprecated evaluationModel) return an IDecisionModel that ExperimentalDecide and the decision executor accept. The rest of the Gateway (language, realtime, batch, spend, credits) is Vercel.AI’s: reach it through Gateway.

Inheritance: object

Implements: IDecisionProvider

View source

public GatewayDecisionProvider(GatewayProvider? gateway = null)

Wraps <code class=“paramref”>gateway</code>, or a default Gateway (AI_GATEWAY_API_KEY, else VERCEL_OIDC_TOKEN).

Parameters

Name Type Description
gateway GatewayProvider

public GatewayProvider Gateway { get; }

The Vercel.AI Gateway provider the decision models call through.

Value: GatewayProvider

public IDecisionModel? DecisionModel(string modelId)

Creates a decision model (decisionModel).

Parameters

Name Type Description
modelId string

Returns: IDecisionModel

public IEvaluationModel? EvaluationModel(string modelId)

Deprecated: use DecisionModel(string). Creates an evaluation model (evaluationModel).

Parameters

Name Type Description
modelId string

Returns: IEvaluationModel