agent?: Agent

Agent settings to update on this session. Omitted fields stay unchanged.

model?: string

The model for subsequent turns. Omit to keep the current model.

minLength0
maxLength1048576
reasoning?: Reasoning { effort }

Reasoning settings to update. Omit to keep the current effort.

effort?: "none" | "minimal" | "low" | 4 more | null

Omit to keep the current effort. Null selects the model’s default effort.

One of the following:
"none"
"minimal"
"low"
"medium"
"high"
"xhigh"
"max"
service_tier?: "auto" | "default" | "flex" | 3 more | null

Omit to keep the current tier. Null resets it to auto.

  • auto - Selects the service tier automatically.
  • default - Uses the default service tier.
  • flex - Uses the flex service tier.
  • priority - Uses the priority service tier.
  • fast - Uses the fast service tier.
  • ultrafast - Uses the ultrafast service tier.
One of the following:
"auto"

Selects the service tier automatically.

"default"

Uses the default service tier.

"flex"

Uses the flex service tier.

"priority"

Uses the priority service tier.

"fast"

Uses the fast service tier.

"ultrafast"

Uses the ultrafast service tier.

tools?: Array<AgentToolParam> | null

Replaces the session tools. Functions and MCP servers change on the next model call. Built-in tools change by the next turn. Omit to keep the current tools, or pass null or an empty array to clear them.

minItems0
maxItems16384
One of the following:
AgentToolConfigParamFunction { description, name, parameters, 3 more }

A function defined by the application.

description: string

A description of what the function does.

minLength0
maxLength1048576
name: string

The name of the function.

minLength0
maxLength1048576
parameters: Record<string, unknown>

A JSON Schema object describing the function’s arguments.

type: "function"

The type of the object. Always function.

async?: boolean

Whether the agent continues without waiting for the function result. Defaults to false.

defer_loading?: boolean

Whether this function is deferred and discovered through tool search. Defaults to false.

AgentToolConfigParamToolSearch { type }

Discovers deferred function tools and loads them into the model context.

type: "tool_search"

The type of the object. Always tool_search.

AgentToolConfigParamProgrammaticToolCalling { type, enabled }

Enables calling tools from model-generated code.

type: "programmatic_tool_calling"

The type of the object. Always programmatic_tool_calling.

enabled?: boolean

Whether tools can be called from model-generated code. Defaults to true.

AgentToolConfigParamMcp { server_label, transport, type, 5 more }

Tools provided by a remote MCP server.

server_label: string

A label used to identify the MCP server in tool calls.

minLength0
maxLength1048576

The transport used to connect to the MCP server.

One of the following:
McpTransportConfigParamHTTP { server_url, type, authorization, headers }

Connects to an MCP server over HTTP.

server_url: string

The URL of the MCP server.

minLength0
maxLength1048576
type: "http"

The type of the object. Always http.

authorization?: string | null

The authorization value sent to the MCP server, if any.

minLength0
maxLength1048576
headers?: Record<string, string> | null

Additional HTTP headers sent to the MCP server.

McpTransportConfigParamStdio { command, cwd, type, 3 more }

Starts an MCP server as a local process.

command: string

The command used to start the MCP server.

minLength0
maxLength1048576
cwd: string

The working directory used to start the MCP server.

minLength0
maxLength1048576
type: "stdio"

The type of the object. Always stdio.

args?: Array<string> | null

Arguments passed to the MCP server command.

minItems0
maxItems16384
env?: Record<string, string> | null

Environment variables set for the MCP server process.

env_vars?: Array<string> | null

Environment variable names to inherit from the selected execution environment.

minItems0
maxItems16384
type: "mcp"

The type of the object. Always mcp.

allowed_tools?: Array<string> | null

The MCP tools the agent may call. All server tools are allowed when omitted.

minItems0
maxItems16384
connection_origin?: "service" | "environment" | null

Selects where outbound MCP HTTP connections originate. Omitted or service uses the Managed Agents service network; environment uses the session’s selected environment.

One of the following:
"service"

Uses the Managed Agents service network.

"environment"

Uses the session’s execution environment.

credential_id?: string | null

The attached vault credential used to authenticate this MCP server. Optional when exactly one attached credential matches the server URL.

minLength0
maxLength1048576
request_metadata?: Record<string, unknown> | null

Metadata included with requests to this MCP server.

required?: boolean

Whether this MCP server must initialize before the first turn. Defaults to false.

AgentToolConfigParamWebSearch { type, allowed_domains, context_size, 2 more }

Web search.

type: "web_search"

The type of the object. Always web_search.

allowed_domains?: Array<string> | null

Domains the search may include.

minItems0
maxItems16384
context_size?: "low" | "medium" | "high" | null

The amount of search context made available to the model. Defaults to medium.

One of the following:
"low"
"medium"
"high"
location?: Location | null

Approximate location used to localize search results.

city?: string | null

The city name.

minLength0
maxLength1048576
country?: string | null

The two-letter ISO country code, such as US.

minLength0
maxLength1048576
region?: string | null

The region or state name.

minLength0
maxLength1048576
timezone?: string | null

The IANA timezone, such as America/Los_Angeles.

minLength0
maxLength1048576
mode?: "disabled" | "cached" | "live" | null

The source used for web search results. Defaults to live.

One of the following:
"disabled"

Disables web search.

"cached"

Uses cached search results.

"live"

Searches the live web.

AgentToolConfigParamComputerUse { type, include_screenshots }

Browser use in an OpenAI-hosted session.

type: "computer_use"

The type of the object. Always computer_use.

include_screenshots?: boolean

Whether computer tool outputs include screenshots. Defaults to false.

AgentToolConfigParamAutomations { type }

Lets the agent manage its own scheduled wakeups.

type: "automations"

The type of the object. Always automations.

metadata?: Record<string, string> | null

Replaces all metadata. Omit to leave unchanged, or pass null or {} to clear it. Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters.

prompt_cache_options?: PromptCacheOptions | null

Default prompt cache lifetime for future turns. Send null to clear the session default.

ttl?: "30m" | "12h"

Minimum lifetime for new prompt cache entries. Defaults to 30 minutes.

One of the following:
"30m"
"12h"
review?: "none" | "auto_review"

Default action review for new root turns. Existing turns and their subagents keep their review mode.

One of the following:
"none"

Keep the existing execution behavior without automatic action review.

"auto_review"

Review eligible actions automatically. Deny manual approval fallbacks.

spend_control?: SpendControl | null

Omit to retain the limit; null or a null limit removes it without resetting spend.

limit: number | null

Positive USD cents, or null to remove the limit.

formatint64
minimum1
maximum4503599627370495