ModelSettings
type ModelSettings = object;Settings to use when calling an LLM.
This class holds optional model configuration parameters (e.g. temperature, topP, penalties, truncation, etc.).
Not all models/providers support all of these parameters, so please check the API documentation for the specific model and provider you are using.
Properties
Section titled “Properties”contextManagement?
Section titled “contextManagement?”optional contextManagement?: ModelSettingsContextManagement;Context-management strategies to apply when calling the model. This setting is available on OpenAI Responses requests, including server-side compaction. See https://developers.openai.com/api/docs/guides/compaction.
frequencyPenalty?
Section titled “frequencyPenalty?”optional frequencyPenalty?: number;The frequency penalty to use when calling the model.
maxTokens?
Section titled “maxTokens?”optional maxTokens?: number;The maximum number of output tokens to generate.
parallelToolCalls?
Section titled “parallelToolCalls?”optional parallelToolCalls?: boolean;Whether to use parallel tool calls when calling the model. Defaults to false if not provided.
presencePenalty?
Section titled “presencePenalty?”optional presencePenalty?: number;The presence penalty to use when calling the model.
promptCacheRetention?
Section titled “promptCacheRetention?”optional promptCacheRetention?: "in-memory" | "24h" | null;Enables prompt caching and controls how long cached content should be retained by the model provider. See https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention for the available options.
providerData?
Section titled “providerData?”optional providerData?: Record<string, any>;Additional provider specific settings to be passed directly to the model request.
reasoning?
Section titled “reasoning?”optional reasoning?: ModelSettingsReasoning;The reasoning settings to use when calling the model.
retry?
Section titled “retry?”optional retry?: ModelRetrySettings;Runtime-only retry configuration for the model request.
store?
Section titled “store?”optional store?: boolean;Whether to store the generated model response for later retrieval. Defaults to true if not provided.
temperature?
Section titled “temperature?”optional temperature?: number;The temperature to use when calling the model.
optional text?: ModelSettingsText;The text settings to use when calling the model.
toolChoice?
Section titled “toolChoice?”optional toolChoice?: ModelSettingsToolChoice;The tool choice to use when calling the model.
optional topP?: number;The topP to use when calling the model.
truncation?
Section titled “truncation?”optional truncation?: "auto" | "disabled";The truncation strategy to use when calling the model.