Model selection preferences based on desired speed and cost characteristics. Plot will automatically select the best available model matching these preferences.
OptionalsystemSystem instructions to guide the model's behavior.
OptionalpromptThe user's input prompt. Can be a simple string or an array of messages for multi-turn conversations.
OptionalmessagesConversation messages for multi-turn interactions. Replaces 'prompt' for more complex conversations.
OptionaltoolsTools that the model can call during generation. Each tool definition includes a description, input schema, and optional execute function.
OptionaltoolControls which tools the model can use.
OptionaloutputStructured output schema using Typebox. Typebox schemas are JSON Schema objects that provide full TypeScript type inference.
OptionalmaxMaximum number of tokens to generate.
OptionaltemperatureTemperature for controlling randomness (0-2). Higher values make output more random, lower values more deterministic.
OptionaltopTop P sampling parameter (0-1). Controls diversity by limiting to top probability tokens.
OptionalwebEnable provider-native web search so the model can retrieve up-to-date information from the web. The search is executed server-side by the provider and any pages used are returned in AIResponse.sources.
Only available on web-search-capable providers (Anthropic and
Google). Check AICapabilities.webSearch via available()
before relying on it; on unsupported providers the flag is ignored.
Pass true for defaults, or an object to cap the number of searches.
OptionalmaxMaximum number of sequential generation steps for agentic tool use.
When the model calls a tool, its result is fed back and the model is
called again, up to maxSteps times, until it produces a final answer.
Defaults to 1 (single step — tool calls are returned but not looped), preserving prior behavior. Set higher (e.g. 6) to let the model chain tool calls into a final answer.
Request parameters for AI text generation, matching Vercel AI SDK's generateText() function.