Skip to content

LanguageModelV4CallOptions

Namespace: E2E.Decision.Sdk

public sealed record LanguageModelV4CallOptions : IEquatable<LanguageModelV4CallOptions>

The AI SDK’s LanguageModelV4CallOptions (language-model-v4-call-options.ts). Upstream’s abortSignal is the CancellationToken of DoGenerateAsync and DoStreamAsync.

Inheritance: object

Implements: IEquatable<LanguageModelV4CallOptions>

View source

public double? FrequencyPenalty { get; init; }

Frequency penalty setting: the likelihood of the model repeatedly using the same words or phrases.

Value: double?

public IReadOnlyDictionary<string, string?>? Headers { get; init; }

Additional HTTP headers to be sent with the request. A null value leaves the header out.

Value: IReadOnlyDictionary<string, string>

public bool? IncludeRawChunks { get; init; }

Include raw chunks in the stream. Only applicable for streaming calls.

Value: bool?

public int? MaxOutputTokens { get; init; }

Maximum number of tokens to generate.

Value: int?

public double? PresencePenalty { get; init; }

Presence penalty setting: the likelihood of the model repeating information that is already in the prompt.

Value: double?

public required IReadOnlyList<LanguageModelV4Message> Prompt { get; init; }

A language model prompt: the standardized prompt type. This is not the user-facing prompt; the AI SDK methods map the user-facing prompt types to this format.

Value: IReadOnlyList<LanguageModelV4Message>

public IReadOnlyDictionary<string, JsonElement>? ProviderOptions { get; init; }

Additional provider-specific options, passed through to the provider, keyed by provider name.

Value: IReadOnlyDictionary<string, JsonElement>

public string? Reasoning { get; init; }

Reasoning effort level for the model: provider-default, none, minimal, low, medium, high, xhigh, or max. Defaults to provider-default.

Value: string

public LanguageModelV4ResponseFormat? ResponseFormat { get; init; }

Response format. The output can either be text or JSON. Default is text.

Value: LanguageModelV4ResponseFormat

public int? Seed { get; init; }

The seed (integer) to use for random sampling. If set and supported by the model, calls generate deterministic results.

Value: int?

public IReadOnlyList<string>? StopSequences { get; init; }

Stop sequences. If set, the model stops generating text when one of them is generated.

Value: IReadOnlyList<string>

public double? Temperature { get; init; }

Temperature setting. The range depends on the provider and model.

Value: double?

public LanguageModelV4ToolChoice? ToolChoice { get; init; }

Specifies how the tool should be selected. Defaults to auto.

Value: LanguageModelV4ToolChoice

public IReadOnlyList<LanguageModelV4Tool>? Tools { get; init; }

The tools that are available for the model.

Value: IReadOnlyList<LanguageModelV4Tool>

public int? TopK { get; init; }

Only sample from the top K options for each subsequent token.

Value: int?

public double? TopP { get; init; }

Nucleus sampling.

Value: double?