diff --git a/en/go/resources/responses/index.md b/en/go/resources/responses/index.md index b7c739c..d4472ab 100644 --- a/en/go/resources/responses/index.md +++ b/en/go/resources/responses/index.md @@ -6,13 +6,7 @@ **post** `/responses` -Creates a model response. Provide [text](https://platform.openai.com/docs/guides/text) or -[image](https://platform.openai.com/docs/guides/images) inputs to generate [text](https://platform.openai.com/docs/guides/text) -or [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have the model call -your own [custom code](https://platform.openai.com/docs/guides/function-calling) or use built-in -[tools](https://platform.openai.com/docs/guides/tools) like [web search](https://platform.openai.com/docs/guides/tools-web-search) -or [file search](https://platform.openai.com/docs/guides/tools-file-search) to use your own data -as input for the model's response. +Create a model response ### Parameters @@ -131,6 +125,16 @@ as input for the model's response. - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -161,6 +165,16 @@ as input for the model's response. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -173,7 +187,9 @@ as input for the model's response. - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -195,6 +211,16 @@ as input for the model's response. The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role EasyInputMessageRole` The role of the message input. One of `user`, `assistant`, `system`, or @@ -1142,6 +1168,26 @@ as input for the model's response. The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -1189,6 +1235,16 @@ as input for the model's response. - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImageContent struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -1219,6 +1275,16 @@ as input for the model's response. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFileContent struct{…}` A file input to the model. @@ -1231,7 +1297,9 @@ as input for the model's response. - `Detail ResponseInputFileContentDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"` - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"` @@ -1253,6 +1321,16 @@ as input for the model's response. The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Type FunctionCallOutput` The type of the function tool call output. Always `function_call_output`. @@ -1263,6 +1341,30 @@ as input for the model's response. The unique ID of the function tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemFunctionCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemFunctionCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemFunctionCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Status string` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -1331,7 +1433,7 @@ as input for the model's response. - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -1339,6 +1441,14 @@ as input for the model's response. - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -1347,6 +1457,10 @@ as input for the model's response. A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -1412,11 +1526,7 @@ as input for the model's response. - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -1587,6 +1697,14 @@ as input for the model's response. - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -1803,6 +1921,22 @@ as input for the model's response. - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -1962,6 +2096,14 @@ as input for the model's response. - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -2102,6 +2244,14 @@ as input for the model's response. - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -2170,16 +2320,30 @@ as input for the model's response. - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -2280,6 +2444,14 @@ as input for the model's response. - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The item type. Always `tool_search_output`. @@ -2354,6 +2526,8 @@ as input for the model's response. A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -2694,6 +2868,30 @@ as input for the model's response. The unique ID of the shell tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Environment ResponseInputItemShellCallEnvironmentUnion` The environment to execute the shell commands in. @@ -2770,6 +2968,30 @@ as input for the model's response. The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `MaxOutputLength int64` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -2864,6 +3086,30 @@ as input for the model's response. The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseInputItemApplyPatchCallOutput struct{…}` The streamed output emitted by an apply patch tool call. @@ -2890,6 +3136,30 @@ as input for the model's response. The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Output string` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -3082,6 +3352,30 @@ as input for the model's response. The unique ID of the custom tool call output in the OpenAI platform. + - `Caller ResponseCustomToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseCustomToolCall struct{…}` A call to a custom tool created by the model. @@ -3108,6 +3402,26 @@ as input for the model's response. The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -3136,6 +3450,58 @@ as input for the model's response. - `const ResponseInputItemItemReferenceTypeItemReference ResponseInputItemItemReferenceType = "item_reference"` + - `type ResponseInputItemProgram struct{…}` + + - `ID string` + + The unique ID of this program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The item type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseInputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of this program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output. + + - `const ResponseInputItemProgramOutputStatusCompleted ResponseInputItemProgramOutputStatus = "completed"` + + - `const ResponseInputItemProgramOutputStatusIncomplete ResponseInputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The item type. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `Instructions param.Field[string]` A system (or developer) message inserted into the model's context. @@ -3176,6 +3542,30 @@ as input for the model's response. The moderation model to use for moderated completions, e.g. 'omni-moderation-latest'. + - `Policy ResponseNewParamsModerationPolicy` + + The policy to apply to moderated response input and output. + + - `Input ResponseNewParamsModerationPolicyInput` + + The moderation policy for the response input. + + - `Mode string` + + - `const ResponseNewParamsModerationPolicyInputModeScore ResponseNewParamsModerationPolicyInputMode = "score"` + + - `const ResponseNewParamsModerationPolicyInputModeBlock ResponseNewParamsModerationPolicyInputMode = "block"` + + - `Output ResponseNewParamsModerationPolicyOutput` + + The moderation policy for the response output. + + - `Mode string` + + - `const ResponseNewParamsModerationPolicyOutputModeScore ResponseNewParamsModerationPolicyOutputMode = "score"` + + - `const ResponseNewParamsModerationPolicyOutputModeBlock ResponseNewParamsModerationPolicyOutputMode = "block"` + - `ParallelToolCalls param.Field[bool]` Whether to allow the model to run tool calls in parallel. @@ -3195,9 +3585,32 @@ as input for the model's response. Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `PromptCacheOptions param.Field[ResponseNewParamsPromptCacheOptions]` + + Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + + - `Mode string` + + Controls whether OpenAI automatically creates an implicit cache breakpoint. Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint and writes up to the latest three explicit breakpoints in the request. With `explicit`, OpenAI does not create an implicit breakpoint and writes up to the latest four explicit breakpoints. If there are no explicit breakpoints, the request does not use prompt caching. + + - `const ResponseNewParamsPromptCacheOptionsModeImplicit ResponseNewParamsPromptCacheOptionsMode = "implicit"` + + - `const ResponseNewParamsPromptCacheOptionsModeExplicit ResponseNewParamsPromptCacheOptionsMode = "explicit"` + + - `Ttl string` + + The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Defaults to `30m`, which is currently the only supported value. The backend may retain cache entries for longer. + + - `const ResponseNewParamsPromptCacheOptionsTtl30m ResponseNewParamsPromptCacheOptionsTtl = "30m"` + - `PromptCacheRetention param.Field[ResponseNewParamsPromptCacheRetention]` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -3418,6 +3831,14 @@ as input for the model's response. - `const CustomCustom Custom = "custom"` + - `ResponseNewParamsToolChoiceSpecificProgrammaticToolCallingParam` + + - `Type ProgrammaticToolCalling` + + The tool to call. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolChoiceApplyPatch struct{…}` Forces the model to call the apply_patch tool when executing a tool call. @@ -3488,6 +3909,8 @@ as input for the model's response. A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -3582,6 +4005,8 @@ as input for the model's response. - `const ResponseErrorCodeInvalidPrompt ResponseErrorCode = "invalid_prompt"` + - `const ResponseErrorCodeBioPolicy ResponseErrorCode = "bio_policy"` + - `const ResponseErrorCodeVectorStoreTimeout ResponseErrorCode = "vector_store_timeout"` - `const ResponseErrorCodeInvalidImage ResponseErrorCode = "invalid_image"` @@ -3677,6 +4102,16 @@ as input for the model's response. - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -3707,6 +4142,16 @@ as input for the model's response. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -3719,7 +4164,9 @@ as input for the model's response. - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -3741,6 +4188,16 @@ as input for the model's response. The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role EasyInputMessageRole` The role of the message input. One of `user`, `assistant`, `system`, or @@ -4688,6 +5145,26 @@ as input for the model's response. The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -4735,6 +5212,16 @@ as input for the model's response. - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImageContent struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -4765,6 +5252,16 @@ as input for the model's response. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFileContent struct{…}` A file input to the model. @@ -4777,7 +5274,9 @@ as input for the model's response. - `Detail ResponseInputFileContentDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"` - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"` @@ -4799,6 +5298,16 @@ as input for the model's response. The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Type FunctionCallOutput` The type of the function tool call output. Always `function_call_output`. @@ -4809,6 +5318,30 @@ as input for the model's response. The unique ID of the function tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemFunctionCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemFunctionCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemFunctionCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Status string` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -4877,7 +5410,7 @@ as input for the model's response. - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -4885,6 +5418,14 @@ as input for the model's response. - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -4893,6 +5434,10 @@ as input for the model's response. A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -4958,11 +5503,7 @@ as input for the model's response. - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -5133,6 +5674,14 @@ as input for the model's response. - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -5349,6 +5898,22 @@ as input for the model's response. - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -5508,6 +6073,14 @@ as input for the model's response. - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -5648,6 +6221,14 @@ as input for the model's response. - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -5716,16 +6297,30 @@ as input for the model's response. - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -5826,6 +6421,14 @@ as input for the model's response. - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The item type. Always `tool_search_output`. @@ -5900,6 +6503,8 @@ as input for the model's response. A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -6240,6 +6845,30 @@ as input for the model's response. The unique ID of the shell tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Environment ResponseInputItemShellCallEnvironmentUnion` The environment to execute the shell commands in. @@ -6316,6 +6945,30 @@ as input for the model's response. The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `MaxOutputLength int64` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -6410,6 +7063,30 @@ as input for the model's response. The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseInputItemApplyPatchCallOutput struct{…}` The streamed output emitted by an apply patch tool call. @@ -6436,6 +7113,30 @@ as input for the model's response. The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Output string` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -6628,6 +7329,30 @@ as input for the model's response. The unique ID of the custom tool call output in the OpenAI platform. + - `Caller ResponseCustomToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseCustomToolCall struct{…}` A call to a custom tool created by the model. @@ -6654,6 +7379,26 @@ as input for the model's response. The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -6682,6 +7427,58 @@ as input for the model's response. - `const ResponseInputItemItemReferenceTypeItemReference ResponseInputItemItemReferenceType = "item_reference"` + - `type ResponseInputItemProgram struct{…}` + + - `ID string` + + The unique ID of this program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The item type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseInputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of this program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output. + + - `const ResponseInputItemProgramOutputStatusCompleted ResponseInputItemProgramOutputStatus = "completed"` + + - `const ResponseInputItemProgramOutputStatusIncomplete ResponseInputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The item type. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `Metadata Metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -6702,6 +7499,12 @@ as input for the model's response. - `type ChatModel string` + - `const ChatModelGPT5_6Sol ChatModel = "gpt-5.6-sol"` + + - `const ChatModelGPT5_6Terra ChatModel = "gpt-5.6-terra"` + + - `const ChatModelGPT5_6Luna ChatModel = "gpt-5.6-luna"` + - `const ChatModelGPT5_4 ChatModel = "gpt-5.4"` - `const ChatModelGPT5_4Mini ChatModel = "gpt-5.4-mini"` @@ -6969,6 +7772,30 @@ as input for the model's response. - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + - `Caller ResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -7044,6 +7871,58 @@ as input for the model's response. for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `type ResponseOutputItemProgram struct{…}` + + - `ID string` + + The unique ID of the program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The type of the item. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseOutputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of the program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output item. + + - `const ResponseOutputItemProgramOutputStatusCompleted ResponseOutputItemProgramOutputStatus = "completed"` + + - `const ResponseOutputItemProgramOutputStatusIncomplete ResponseOutputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The type of the item. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `type ResponseToolSearchCall struct{…}` - `ID string` @@ -7148,6 +8027,8 @@ as input for the model's response. A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -7250,6 +8131,8 @@ as input for the model's response. A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -7498,6 +8381,26 @@ as input for the model's response. - `const ShellCallShellCall ShellCall = "shell_call"` + - `Caller ResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -7578,6 +8481,26 @@ as input for the model's response. - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + - `Caller ResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -7662,6 +8585,26 @@ as input for the model's response. - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + - `Caller ResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -7692,6 +8635,26 @@ as input for the model's response. - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + - `Caller ResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call output. @@ -8025,6 +8988,14 @@ as input for the model's response. - `const CustomCustom Custom = "custom"` + - `type ResponseToolChoiceSpecificProgrammaticToolCallingParam struct{…}` + + - `Type ProgrammaticToolCalling` + + The tool to call. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolChoiceApplyPatch struct{…}` Forces the model to call the apply_patch tool when executing a tool call. @@ -8095,6 +9066,8 @@ as input for the model's response. A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -8321,9 +9294,32 @@ as input for the model's response. Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `PromptCacheOptions ResponsePromptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode string` + + Whether implicit prompt-cache breakpoints were enabled. + + - `const ResponsePromptCacheOptionsModeImplicit ResponsePromptCacheOptionsMode = "implicit"` + + - `const ResponsePromptCacheOptionsModeExplicit ResponsePromptCacheOptionsMode = "explicit"` + + - `Ttl string` + + The minimum lifetime applied to each cache breakpoint. + + - `const ResponsePromptCacheOptionsTtl30m ResponsePromptCacheOptionsTtl = "30m"` + - `PromptCacheRetention ResponsePromptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -8356,16 +9352,13 @@ as input for the model's response. - `Effort ReasoningEffort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + Constrains effort on reasoning for reasoning models. Currently supported + values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. + Reducing reasoning effort can result in faster responses and fewer tokens + used on reasoning in a response. Not all reasoning models support every + value. See the + [reasoning guide](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `const ReasoningEffortNone ReasoningEffort = "none"` @@ -8379,6 +9372,8 @@ as input for the model's response. - `const ReasoningEffortXhigh ReasoningEffort = "xhigh"` + - `const ReasoningEffortMax ReasoningEffort = "max"` + - `GenerateSummary ReasoningGenerateSummary` **Deprecated:** use `summary` instead. @@ -8393,6 +9388,24 @@ as input for the model's response. - `const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"` + - `Mode ReasoningMode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `string` + + - `type ReasoningMode string` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `const ReasoningModeStandard ReasoningMode = "standard"` + + - `const ReasoningModePro ReasoningMode = "pro"` + - `Summary ReasoningSummary` A summary of the reasoning performed by the model. This can be @@ -8577,6 +9590,10 @@ as input for the model's response. A detailed breakdown of the input tokens. + - `CacheWriteTokens int64` + + The number of input tokens that were written to the cache. + - `CachedTokens int64` The number of tokens that were retrieved from the cache. @@ -8703,8 +9720,14 @@ func main() { }, "strict": true, "type": "function", + "allowed_callers": [ + "direct" + ], "defer_loading": true, - "description": "description" + "description": "description", + "output_schema": { + "foo": "bar" + } } ], "top_p": 1, @@ -8759,11 +9782,16 @@ func main() { "version": "version" }, "prompt_cache_key": "prompt-cache-key-1234", + "prompt_cache_options": { + "mode": "implicit", + "ttl": "30m" + }, "prompt_cache_retention": "in_memory", "reasoning": { "context": "auto", "effort": "none", "generate_summary": "auto", + "mode": "standard", "summary": "auto" }, "safety_identifier": "safety-identifier-1234", @@ -8780,6 +9808,7 @@ func main() { "usage": { "input_tokens": 0, "input_tokens_details": { + "cache_write_tokens": 0, "cached_tokens": 0 }, "output_tokens": 0, @@ -8798,7 +9827,7 @@ func main() { **get** `/responses/{response_id}` -Retrieves a model response with the given ID. +Get a model response ### Parameters @@ -8869,6 +9898,8 @@ Retrieves a model response with the given ID. - `const ResponseErrorCodeInvalidPrompt ResponseErrorCode = "invalid_prompt"` + - `const ResponseErrorCodeBioPolicy ResponseErrorCode = "bio_policy"` + - `const ResponseErrorCodeVectorStoreTimeout ResponseErrorCode = "vector_store_timeout"` - `const ResponseErrorCodeInvalidImage ResponseErrorCode = "invalid_image"` @@ -8964,6 +9995,16 @@ Retrieves a model response with the given ID. - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -8994,6 +10035,16 @@ Retrieves a model response with the given ID. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -9006,7 +10057,9 @@ Retrieves a model response with the given ID. - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -9028,6 +10081,16 @@ Retrieves a model response with the given ID. The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role EasyInputMessageRole` The role of the message input. One of `user`, `assistant`, `system`, or @@ -9975,6 +11038,26 @@ Retrieves a model response with the given ID. The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -10022,6 +11105,16 @@ Retrieves a model response with the given ID. - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImageContent struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -10052,6 +11145,16 @@ Retrieves a model response with the given ID. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFileContent struct{…}` A file input to the model. @@ -10064,7 +11167,9 @@ Retrieves a model response with the given ID. - `Detail ResponseInputFileContentDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"` - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"` @@ -10086,6 +11191,16 @@ Retrieves a model response with the given ID. The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Type FunctionCallOutput` The type of the function tool call output. Always `function_call_output`. @@ -10096,6 +11211,30 @@ Retrieves a model response with the given ID. The unique ID of the function tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemFunctionCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemFunctionCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemFunctionCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Status string` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -10164,7 +11303,7 @@ Retrieves a model response with the given ID. - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -10172,6 +11311,14 @@ Retrieves a model response with the given ID. - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -10180,6 +11327,10 @@ Retrieves a model response with the given ID. A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -10245,11 +11396,7 @@ Retrieves a model response with the given ID. - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -10420,6 +11567,14 @@ Retrieves a model response with the given ID. - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -10636,6 +11791,22 @@ Retrieves a model response with the given ID. - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -10795,6 +11966,14 @@ Retrieves a model response with the given ID. - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -10935,6 +12114,14 @@ Retrieves a model response with the given ID. - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -11003,16 +12190,30 @@ Retrieves a model response with the given ID. - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -11113,6 +12314,14 @@ Retrieves a model response with the given ID. - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The item type. Always `tool_search_output`. @@ -11187,6 +12396,8 @@ Retrieves a model response with the given ID. A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -11527,6 +12738,30 @@ Retrieves a model response with the given ID. The unique ID of the shell tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Environment ResponseInputItemShellCallEnvironmentUnion` The environment to execute the shell commands in. @@ -11603,6 +12838,30 @@ Retrieves a model response with the given ID. The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `MaxOutputLength int64` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -11697,6 +12956,30 @@ Retrieves a model response with the given ID. The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseInputItemApplyPatchCallOutput struct{…}` The streamed output emitted by an apply patch tool call. @@ -11723,6 +13006,30 @@ Retrieves a model response with the given ID. The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Output string` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -11915,6 +13222,30 @@ Retrieves a model response with the given ID. The unique ID of the custom tool call output in the OpenAI platform. + - `Caller ResponseCustomToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseCustomToolCall struct{…}` A call to a custom tool created by the model. @@ -11941,6 +13272,26 @@ Retrieves a model response with the given ID. The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -11969,6 +13320,58 @@ Retrieves a model response with the given ID. - `const ResponseInputItemItemReferenceTypeItemReference ResponseInputItemItemReferenceType = "item_reference"` + - `type ResponseInputItemProgram struct{…}` + + - `ID string` + + The unique ID of this program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The item type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseInputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of this program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output. + + - `const ResponseInputItemProgramOutputStatusCompleted ResponseInputItemProgramOutputStatus = "completed"` + + - `const ResponseInputItemProgramOutputStatusIncomplete ResponseInputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The item type. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `Metadata Metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -11989,6 +13392,12 @@ Retrieves a model response with the given ID. - `type ChatModel string` + - `const ChatModelGPT5_6Sol ChatModel = "gpt-5.6-sol"` + + - `const ChatModelGPT5_6Terra ChatModel = "gpt-5.6-terra"` + + - `const ChatModelGPT5_6Luna ChatModel = "gpt-5.6-luna"` + - `const ChatModelGPT5_4 ChatModel = "gpt-5.4"` - `const ChatModelGPT5_4Mini ChatModel = "gpt-5.4-mini"` @@ -12256,6 +13665,30 @@ Retrieves a model response with the given ID. - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + - `Caller ResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -12331,6 +13764,58 @@ Retrieves a model response with the given ID. for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `type ResponseOutputItemProgram struct{…}` + + - `ID string` + + The unique ID of the program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The type of the item. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseOutputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of the program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output item. + + - `const ResponseOutputItemProgramOutputStatusCompleted ResponseOutputItemProgramOutputStatus = "completed"` + + - `const ResponseOutputItemProgramOutputStatusIncomplete ResponseOutputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The type of the item. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `type ResponseToolSearchCall struct{…}` - `ID string` @@ -12435,6 +13920,8 @@ Retrieves a model response with the given ID. A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -12537,6 +14024,8 @@ Retrieves a model response with the given ID. A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -12785,6 +14274,26 @@ Retrieves a model response with the given ID. - `const ShellCallShellCall ShellCall = "shell_call"` + - `Caller ResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -12865,6 +14374,26 @@ Retrieves a model response with the given ID. - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + - `Caller ResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -12949,6 +14478,26 @@ Retrieves a model response with the given ID. - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + - `Caller ResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -12979,6 +14528,26 @@ Retrieves a model response with the given ID. - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + - `Caller ResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call output. @@ -13312,6 +14881,14 @@ Retrieves a model response with the given ID. - `const CustomCustom Custom = "custom"` + - `type ResponseToolChoiceSpecificProgrammaticToolCallingParam struct{…}` + + - `Type ProgrammaticToolCalling` + + The tool to call. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolChoiceApplyPatch struct{…}` Forces the model to call the apply_patch tool when executing a tool call. @@ -13382,6 +14959,8 @@ Retrieves a model response with the given ID. A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -13608,9 +15187,32 @@ Retrieves a model response with the given ID. Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `PromptCacheOptions ResponsePromptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode string` + + Whether implicit prompt-cache breakpoints were enabled. + + - `const ResponsePromptCacheOptionsModeImplicit ResponsePromptCacheOptionsMode = "implicit"` + + - `const ResponsePromptCacheOptionsModeExplicit ResponsePromptCacheOptionsMode = "explicit"` + + - `Ttl string` + + The minimum lifetime applied to each cache breakpoint. + + - `const ResponsePromptCacheOptionsTtl30m ResponsePromptCacheOptionsTtl = "30m"` + - `PromptCacheRetention ResponsePromptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -13643,16 +15245,13 @@ Retrieves a model response with the given ID. - `Effort ReasoningEffort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + Constrains effort on reasoning for reasoning models. Currently supported + values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. + Reducing reasoning effort can result in faster responses and fewer tokens + used on reasoning in a response. Not all reasoning models support every + value. See the + [reasoning guide](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `const ReasoningEffortNone ReasoningEffort = "none"` @@ -13666,6 +15265,8 @@ Retrieves a model response with the given ID. - `const ReasoningEffortXhigh ReasoningEffort = "xhigh"` + - `const ReasoningEffortMax ReasoningEffort = "max"` + - `GenerateSummary ReasoningGenerateSummary` **Deprecated:** use `summary` instead. @@ -13680,6 +15281,24 @@ Retrieves a model response with the given ID. - `const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"` + - `Mode ReasoningMode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `string` + + - `type ReasoningMode string` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `const ReasoningModeStandard ReasoningMode = "standard"` + + - `const ReasoningModePro ReasoningMode = "pro"` + - `Summary ReasoningSummary` A summary of the reasoning performed by the model. This can be @@ -13864,6 +15483,10 @@ Retrieves a model response with the given ID. A detailed breakdown of the input tokens. + - `CacheWriteTokens int64` + + The number of input tokens that were written to the cache. + - `CachedTokens int64` The number of tokens that were retrieved from the cache. @@ -13994,8 +15617,14 @@ func main() { }, "strict": true, "type": "function", + "allowed_callers": [ + "direct" + ], "defer_loading": true, - "description": "description" + "description": "description", + "output_schema": { + "foo": "bar" + } } ], "top_p": 1, @@ -14050,11 +15679,16 @@ func main() { "version": "version" }, "prompt_cache_key": "prompt-cache-key-1234", + "prompt_cache_options": { + "mode": "implicit", + "ttl": "30m" + }, "prompt_cache_retention": "in_memory", "reasoning": { "context": "auto", "effort": "none", "generate_summary": "auto", + "mode": "standard", "summary": "auto" }, "safety_identifier": "safety-identifier-1234", @@ -14071,6 +15705,7 @@ func main() { "usage": { "input_tokens": 0, "input_tokens_details": { + "cache_write_tokens": 0, "cached_tokens": 0 }, "output_tokens": 0, @@ -14089,7 +15724,7 @@ func main() { **delete** `/responses/{response_id}` -Deletes a model response with the given ID. +Delete a model response ### Parameters @@ -14124,9 +15759,7 @@ func main() { **post** `/responses/{response_id}/cancel` -Cancels a model response with the given ID. Only responses created with -the `background` parameter set to `true` can be cancelled. -[Learn more](https://platform.openai.com/docs/guides/background). +Cancel a response ### Parameters @@ -14158,6 +15791,8 @@ the `background` parameter set to `true` can be cancelled. - `const ResponseErrorCodeInvalidPrompt ResponseErrorCode = "invalid_prompt"` + - `const ResponseErrorCodeBioPolicy ResponseErrorCode = "bio_policy"` + - `const ResponseErrorCodeVectorStoreTimeout ResponseErrorCode = "vector_store_timeout"` - `const ResponseErrorCodeInvalidImage ResponseErrorCode = "invalid_image"` @@ -14253,6 +15888,16 @@ the `background` parameter set to `true` can be cancelled. - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -14283,6 +15928,16 @@ the `background` parameter set to `true` can be cancelled. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -14295,7 +15950,9 @@ the `background` parameter set to `true` can be cancelled. - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -14317,6 +15974,16 @@ the `background` parameter set to `true` can be cancelled. The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role EasyInputMessageRole` The role of the message input. One of `user`, `assistant`, `system`, or @@ -15264,6 +16931,26 @@ the `background` parameter set to `true` can be cancelled. The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -15311,6 +16998,16 @@ the `background` parameter set to `true` can be cancelled. - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImageContent struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -15341,6 +17038,16 @@ the `background` parameter set to `true` can be cancelled. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFileContent struct{…}` A file input to the model. @@ -15353,7 +17060,9 @@ the `background` parameter set to `true` can be cancelled. - `Detail ResponseInputFileContentDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"` - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"` @@ -15375,6 +17084,16 @@ the `background` parameter set to `true` can be cancelled. The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Type FunctionCallOutput` The type of the function tool call output. Always `function_call_output`. @@ -15385,6 +17104,30 @@ the `background` parameter set to `true` can be cancelled. The unique ID of the function tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemFunctionCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemFunctionCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemFunctionCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Status string` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -15453,7 +17196,7 @@ the `background` parameter set to `true` can be cancelled. - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -15461,6 +17204,14 @@ the `background` parameter set to `true` can be cancelled. - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -15469,6 +17220,10 @@ the `background` parameter set to `true` can be cancelled. A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -15534,11 +17289,7 @@ the `background` parameter set to `true` can be cancelled. - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -15709,6 +17460,14 @@ the `background` parameter set to `true` can be cancelled. - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -15925,6 +17684,22 @@ the `background` parameter set to `true` can be cancelled. - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -16084,6 +17859,14 @@ the `background` parameter set to `true` can be cancelled. - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -16224,6 +18007,14 @@ the `background` parameter set to `true` can be cancelled. - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -16292,16 +18083,30 @@ the `background` parameter set to `true` can be cancelled. - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -16402,6 +18207,14 @@ the `background` parameter set to `true` can be cancelled. - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The item type. Always `tool_search_output`. @@ -16476,6 +18289,8 @@ the `background` parameter set to `true` can be cancelled. A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -16816,6 +18631,30 @@ the `background` parameter set to `true` can be cancelled. The unique ID of the shell tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Environment ResponseInputItemShellCallEnvironmentUnion` The environment to execute the shell commands in. @@ -16892,6 +18731,30 @@ the `background` parameter set to `true` can be cancelled. The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `MaxOutputLength int64` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -16986,6 +18849,30 @@ the `background` parameter set to `true` can be cancelled. The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseInputItemApplyPatchCallOutput struct{…}` The streamed output emitted by an apply patch tool call. @@ -17012,6 +18899,30 @@ the `background` parameter set to `true` can be cancelled. The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Output string` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -17204,6 +19115,30 @@ the `background` parameter set to `true` can be cancelled. The unique ID of the custom tool call output in the OpenAI platform. + - `Caller ResponseCustomToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseCustomToolCall struct{…}` A call to a custom tool created by the model. @@ -17230,6 +19165,26 @@ the `background` parameter set to `true` can be cancelled. The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -17258,6 +19213,58 @@ the `background` parameter set to `true` can be cancelled. - `const ResponseInputItemItemReferenceTypeItemReference ResponseInputItemItemReferenceType = "item_reference"` + - `type ResponseInputItemProgram struct{…}` + + - `ID string` + + The unique ID of this program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The item type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseInputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of this program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output. + + - `const ResponseInputItemProgramOutputStatusCompleted ResponseInputItemProgramOutputStatus = "completed"` + + - `const ResponseInputItemProgramOutputStatusIncomplete ResponseInputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The item type. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `Metadata Metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -17278,6 +19285,12 @@ the `background` parameter set to `true` can be cancelled. - `type ChatModel string` + - `const ChatModelGPT5_6Sol ChatModel = "gpt-5.6-sol"` + + - `const ChatModelGPT5_6Terra ChatModel = "gpt-5.6-terra"` + + - `const ChatModelGPT5_6Luna ChatModel = "gpt-5.6-luna"` + - `const ChatModelGPT5_4 ChatModel = "gpt-5.4"` - `const ChatModelGPT5_4Mini ChatModel = "gpt-5.4-mini"` @@ -17545,6 +19558,30 @@ the `background` parameter set to `true` can be cancelled. - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + - `Caller ResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -17620,6 +19657,58 @@ the `background` parameter set to `true` can be cancelled. for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `type ResponseOutputItemProgram struct{…}` + + - `ID string` + + The unique ID of the program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The type of the item. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseOutputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of the program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output item. + + - `const ResponseOutputItemProgramOutputStatusCompleted ResponseOutputItemProgramOutputStatus = "completed"` + + - `const ResponseOutputItemProgramOutputStatusIncomplete ResponseOutputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The type of the item. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `type ResponseToolSearchCall struct{…}` - `ID string` @@ -17724,6 +19813,8 @@ the `background` parameter set to `true` can be cancelled. A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -17826,6 +19917,8 @@ the `background` parameter set to `true` can be cancelled. A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -18074,6 +20167,26 @@ the `background` parameter set to `true` can be cancelled. - `const ShellCallShellCall ShellCall = "shell_call"` + - `Caller ResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -18154,6 +20267,26 @@ the `background` parameter set to `true` can be cancelled. - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + - `Caller ResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -18238,6 +20371,26 @@ the `background` parameter set to `true` can be cancelled. - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + - `Caller ResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -18268,6 +20421,26 @@ the `background` parameter set to `true` can be cancelled. - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + - `Caller ResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call output. @@ -18601,6 +20774,14 @@ the `background` parameter set to `true` can be cancelled. - `const CustomCustom Custom = "custom"` + - `type ResponseToolChoiceSpecificProgrammaticToolCallingParam struct{…}` + + - `Type ProgrammaticToolCalling` + + The tool to call. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolChoiceApplyPatch struct{…}` Forces the model to call the apply_patch tool when executing a tool call. @@ -18671,6 +20852,8 @@ the `background` parameter set to `true` can be cancelled. A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -18897,9 +21080,32 @@ the `background` parameter set to `true` can be cancelled. Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `PromptCacheOptions ResponsePromptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode string` + + Whether implicit prompt-cache breakpoints were enabled. + + - `const ResponsePromptCacheOptionsModeImplicit ResponsePromptCacheOptionsMode = "implicit"` + + - `const ResponsePromptCacheOptionsModeExplicit ResponsePromptCacheOptionsMode = "explicit"` + + - `Ttl string` + + The minimum lifetime applied to each cache breakpoint. + + - `const ResponsePromptCacheOptionsTtl30m ResponsePromptCacheOptionsTtl = "30m"` + - `PromptCacheRetention ResponsePromptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -18932,16 +21138,13 @@ the `background` parameter set to `true` can be cancelled. - `Effort ReasoningEffort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + Constrains effort on reasoning for reasoning models. Currently supported + values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. + Reducing reasoning effort can result in faster responses and fewer tokens + used on reasoning in a response. Not all reasoning models support every + value. See the + [reasoning guide](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `const ReasoningEffortNone ReasoningEffort = "none"` @@ -18955,6 +21158,8 @@ the `background` parameter set to `true` can be cancelled. - `const ReasoningEffortXhigh ReasoningEffort = "xhigh"` + - `const ReasoningEffortMax ReasoningEffort = "max"` + - `GenerateSummary ReasoningGenerateSummary` **Deprecated:** use `summary` instead. @@ -18969,6 +21174,24 @@ the `background` parameter set to `true` can be cancelled. - `const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"` + - `Mode ReasoningMode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `string` + + - `type ReasoningMode string` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `const ReasoningModeStandard ReasoningMode = "standard"` + + - `const ReasoningModePro ReasoningMode = "pro"` + - `Summary ReasoningSummary` A summary of the reasoning performed by the model. This can be @@ -19153,6 +21376,10 @@ the `background` parameter set to `true` can be cancelled. A detailed breakdown of the input tokens. + - `CacheWriteTokens int64` + + The number of input tokens that were written to the cache. + - `CachedTokens int64` The number of tokens that were retrieved from the cache. @@ -19276,8 +21503,14 @@ func main() { }, "strict": true, "type": "function", + "allowed_callers": [ + "direct" + ], "defer_loading": true, - "description": "description" + "description": "description", + "output_schema": { + "foo": "bar" + } } ], "top_p": 1, @@ -19332,11 +21565,16 @@ func main() { "version": "version" }, "prompt_cache_key": "prompt-cache-key-1234", + "prompt_cache_options": { + "mode": "implicit", + "ttl": "30m" + }, "prompt_cache_retention": "in_memory", "reasoning": { "context": "auto", "effort": "none", "generate_summary": "auto", + "mode": "standard", "summary": "auto" }, "safety_identifier": "safety-identifier-1234", @@ -19353,6 +21591,7 @@ func main() { "usage": { "input_tokens": 0, "input_tokens_details": { + "cache_write_tokens": 0, "cached_tokens": 0 }, "output_tokens": 0, @@ -19371,9 +21610,7 @@ func main() { **post** `/responses/compact` -Compact a conversation. Returns a compacted response object. - -Learn when and how to compact long-running conversations in the [conversation state guide](https://platform.openai.com/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see [Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced). +Compact a response ### Parameters @@ -19387,6 +21624,12 @@ Learn when and how to compact long-running conversations in the [conversation st Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models. + - `const ResponseCompactParamsModelGPT5_6Sol ResponseCompactParamsModel = "gpt-5.6-sol"` + + - `const ResponseCompactParamsModelGPT5_6Terra ResponseCompactParamsModel = "gpt-5.6-terra"` + + - `const ResponseCompactParamsModelGPT5_6Luna ResponseCompactParamsModel = "gpt-5.6-luna"` + - `const ResponseCompactParamsModelGPT5_4 ResponseCompactParamsModel = "gpt-5.4"` - `const ResponseCompactParamsModelGPT5_4Mini ResponseCompactParamsModel = "gpt-5.4-mini"` @@ -19617,6 +21860,16 @@ Learn when and how to compact long-running conversations in the [conversation st - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -19647,6 +21900,16 @@ Learn when and how to compact long-running conversations in the [conversation st The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -19659,7 +21922,9 @@ Learn when and how to compact long-running conversations in the [conversation st - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -19681,6 +21946,16 @@ Learn when and how to compact long-running conversations in the [conversation st The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role EasyInputMessageRole` The role of the message input. One of `user`, `assistant`, `system`, or @@ -20628,6 +22903,26 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -20675,6 +22970,16 @@ Learn when and how to compact long-running conversations in the [conversation st - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImageContent struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -20705,6 +23010,16 @@ Learn when and how to compact long-running conversations in the [conversation st The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFileContent struct{…}` A file input to the model. @@ -20717,7 +23032,9 @@ Learn when and how to compact long-running conversations in the [conversation st - `Detail ResponseInputFileContentDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"` - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"` @@ -20739,6 +23056,16 @@ Learn when and how to compact long-running conversations in the [conversation st The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Type FunctionCallOutput` The type of the function tool call output. Always `function_call_output`. @@ -20749,6 +23076,30 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the function tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemFunctionCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemFunctionCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemFunctionCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Status string` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -20817,7 +23168,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -20825,6 +23176,14 @@ Learn when and how to compact long-running conversations in the [conversation st - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -20833,6 +23192,10 @@ Learn when and how to compact long-running conversations in the [conversation st A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -20898,11 +23261,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -21073,6 +23432,14 @@ Learn when and how to compact long-running conversations in the [conversation st - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -21289,6 +23656,22 @@ Learn when and how to compact long-running conversations in the [conversation st - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -21448,6 +23831,14 @@ Learn when and how to compact long-running conversations in the [conversation st - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -21588,6 +23979,14 @@ Learn when and how to compact long-running conversations in the [conversation st - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -21656,16 +24055,30 @@ Learn when and how to compact long-running conversations in the [conversation st - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -21766,6 +24179,14 @@ Learn when and how to compact long-running conversations in the [conversation st - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The item type. Always `tool_search_output`. @@ -21840,6 +24261,8 @@ Learn when and how to compact long-running conversations in the [conversation st A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -22180,6 +24603,30 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the shell tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Environment ResponseInputItemShellCallEnvironmentUnion` The environment to execute the shell commands in. @@ -22256,6 +24703,30 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `MaxOutputLength int64` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -22350,6 +24821,30 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseInputItemApplyPatchCallOutput struct{…}` The streamed output emitted by an apply patch tool call. @@ -22376,6 +24871,30 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Output string` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -22568,6 +25087,30 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the custom tool call output in the OpenAI platform. + - `Caller ResponseCustomToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseCustomToolCall struct{…}` A call to a custom tool created by the model. @@ -22594,6 +25137,26 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -22622,6 +25185,58 @@ Learn when and how to compact long-running conversations in the [conversation st - `const ResponseInputItemItemReferenceTypeItemReference ResponseInputItemItemReferenceType = "item_reference"` + - `type ResponseInputItemProgram struct{…}` + + - `ID string` + + The unique ID of this program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The item type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseInputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of this program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output. + + - `const ResponseInputItemProgramOutputStatusCompleted ResponseInputItemProgramOutputStatus = "completed"` + + - `const ResponseInputItemProgramOutputStatusIncomplete ResponseInputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The item type. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `Instructions param.Field[string]` A system (or developer) message inserted into the model's context. @@ -22635,6 +25250,24 @@ Learn when and how to compact long-running conversations in the [conversation st A key to use when reading from or writing to the prompt cache. + - `PromptCacheOptions param.Field[ResponseCompactParamsPromptCacheOptions]` + + Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + + - `Mode string` + + Controls whether OpenAI automatically creates an implicit cache breakpoint. Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint and writes up to the latest three explicit breakpoints in the request. With `explicit`, OpenAI does not create an implicit breakpoint and writes up to the latest four explicit breakpoints. If there are no explicit breakpoints, the request does not use prompt caching. + + - `const ResponseCompactParamsPromptCacheOptionsModeImplicit ResponseCompactParamsPromptCacheOptionsMode = "implicit"` + + - `const ResponseCompactParamsPromptCacheOptionsModeExplicit ResponseCompactParamsPromptCacheOptionsMode = "explicit"` + + - `Ttl string` + + The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Defaults to `30m`, which is currently the only supported value. The backend may retain cache entries for longer. + + - `const ResponseCompactParamsPromptCacheOptionsTtl30m ResponseCompactParamsPromptCacheOptionsTtl = "30m"` + - `PromptCacheRetention param.Field[ResponseCompactParamsPromptCacheRetention]` How long to retain a prompt cache entry created by this request. @@ -22961,6 +25594,26 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -23011,6 +25664,16 @@ Learn when and how to compact long-running conversations in the [conversation st - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -23041,6 +25704,16 @@ Learn when and how to compact long-running conversations in the [conversation st The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -23053,7 +25726,9 @@ Learn when and how to compact long-running conversations in the [conversation st - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -23075,6 +25750,16 @@ Learn when and how to compact long-running conversations in the [conversation st The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Status ResponseFunctionToolCallOutputItemStatus` The status of the item. One of `in_progress`, `completed`, or @@ -23092,6 +25777,30 @@ Learn when and how to compact long-running conversations in the [conversation st - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + - `Caller ResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -23759,6 +26468,58 @@ Learn when and how to compact long-running conversations in the [conversation st - `const ResponseReasoningItemStatusIncomplete ResponseReasoningItemStatus = "incomplete"` + - `type ResponseOutputItemProgram struct{…}` + + - `ID string` + + The unique ID of the program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The type of the item. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseOutputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of the program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output item. + + - `const ResponseOutputItemProgramOutputStatusCompleted ResponseOutputItemProgramOutputStatus = "completed"` + + - `const ResponseOutputItemProgramOutputStatusIncomplete ResponseOutputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The type of the item. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `type ResponseToolSearchCall struct{…}` - `ID string` @@ -23847,7 +26608,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -23855,6 +26616,14 @@ Learn when and how to compact long-running conversations in the [conversation st - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -23863,6 +26632,10 @@ Learn when and how to compact long-running conversations in the [conversation st A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -23928,11 +26701,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -24103,6 +26872,14 @@ Learn when and how to compact long-running conversations in the [conversation st - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -24319,6 +27096,22 @@ Learn when and how to compact long-running conversations in the [conversation st - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -24478,6 +27271,14 @@ Learn when and how to compact long-running conversations in the [conversation st - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -24618,6 +27419,14 @@ Learn when and how to compact long-running conversations in the [conversation st - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -24686,16 +27495,30 @@ Learn when and how to compact long-running conversations in the [conversation st - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -24796,6 +27619,14 @@ Learn when and how to compact long-running conversations in the [conversation st - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The type of the item. Always `tool_search_output`. @@ -24866,6 +27697,8 @@ Learn when and how to compact long-running conversations in the [conversation st A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -25179,6 +28012,26 @@ Learn when and how to compact long-running conversations in the [conversation st - `const ShellCallShellCall ShellCall = "shell_call"` + - `Caller ResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -25259,6 +28112,26 @@ Learn when and how to compact long-running conversations in the [conversation st - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + - `Caller ResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -25343,6 +28216,26 @@ Learn when and how to compact long-running conversations in the [conversation st - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + - `Caller ResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -25373,6 +28266,26 @@ Learn when and how to compact long-running conversations in the [conversation st - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + - `Caller ResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call output. @@ -25554,6 +28467,26 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -25593,6 +28526,10 @@ Learn when and how to compact long-running conversations in the [conversation st A detailed breakdown of the input tokens. + - `CacheWriteTokens int64` + + The number of input tokens that were written to the cache. + - `CachedTokens int64` The number of tokens that were retrieved from the cache. @@ -25633,7 +28570,7 @@ func main() { option.WithAPIKey("My API Key"), ) compactedResponse, err := client.Responses.Compact(context.TODO(), responses.ResponseCompactParams{ - Model: responses.ResponseCompactParamsModelGPT5_4, + Model: responses.ResponseCompactParamsModelGPT5_6Sol, }) if err != nil { panic(err.Error()) @@ -25693,6 +28630,7 @@ func main() { "usage": { "input_tokens": 0, "input_tokens_details": { + "cache_write_tokens": 0, "cached_tokens": 0 }, "output_tokens": 0, @@ -25718,6 +28656,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + ### Compacted Response - `type CompactedResponse struct{…}` @@ -26024,6 +28970,26 @@ func main() { The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -26074,6 +29040,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -26104,6 +29080,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -26116,7 +29102,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -26138,6 +29126,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Status ResponseFunctionToolCallOutputItemStatus` The status of the item. One of `in_progress`, `completed`, or @@ -26155,6 +29153,30 @@ func main() { - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + - `Caller ResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -26822,6 +29844,58 @@ func main() { - `const ResponseReasoningItemStatusIncomplete ResponseReasoningItemStatus = "incomplete"` + - `type ResponseOutputItemProgram struct{…}` + + - `ID string` + + The unique ID of the program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The type of the item. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseOutputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of the program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output item. + + - `const ResponseOutputItemProgramOutputStatusCompleted ResponseOutputItemProgramOutputStatus = "completed"` + + - `const ResponseOutputItemProgramOutputStatusIncomplete ResponseOutputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The type of the item. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `type ResponseToolSearchCall struct{…}` - `ID string` @@ -26910,7 +29984,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -26918,6 +29992,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -26926,6 +30008,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -26991,11 +30077,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -27166,6 +30248,14 @@ func main() { - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -27382,6 +30472,22 @@ func main() { - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -27541,6 +30647,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -27681,6 +30795,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -27749,16 +30871,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -27859,6 +30995,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The type of the item. Always `tool_search_output`. @@ -27929,6 +31073,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -28242,6 +31388,26 @@ func main() { - `const ShellCallShellCall ShellCall = "shell_call"` + - `Caller ResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -28322,6 +31488,26 @@ func main() { - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + - `Caller ResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -28406,6 +31592,26 @@ func main() { - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + - `Caller ResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -28436,6 +31642,26 @@ func main() { - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + - `Caller ResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call output. @@ -28617,6 +31843,26 @@ func main() { The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -28656,6 +31902,10 @@ func main() { A detailed breakdown of the input tokens. + - `CacheWriteTokens int64` + + The number of input tokens that were written to the cache. + - `CachedTokens int64` The number of tokens that were retrieved from the cache. @@ -29326,6 +32576,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -29406,6 +32664,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -29436,6 +32704,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -29448,7 +32726,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -29470,6 +32750,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role EasyInputMessageRole` The role of the message input. One of `user`, `assistant`, `system`, or @@ -29566,11 +32856,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -29636,6 +32922,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -29810,7 +33104,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -29818,6 +33112,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -29826,6 +33128,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + ### Inline Skill - `type InlineSkill struct{…}` @@ -29954,16 +33260,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -29978,6 +33298,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -30054,6 +33382,8 @@ func main() { - `const ResponseErrorCodeInvalidPrompt ResponseErrorCode = "invalid_prompt"` + - `const ResponseErrorCodeBioPolicy ResponseErrorCode = "bio_policy"` + - `const ResponseErrorCodeVectorStoreTimeout ResponseErrorCode = "vector_store_timeout"` - `const ResponseErrorCodeInvalidImage ResponseErrorCode = "invalid_image"` @@ -30149,6 +33479,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -30179,6 +33519,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -30191,7 +33541,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -30213,6 +33565,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role EasyInputMessageRole` The role of the message input. One of `user`, `assistant`, `system`, or @@ -31160,6 +34522,26 @@ func main() { The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -31207,6 +34589,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImageContent struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -31237,6 +34629,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFileContent struct{…}` A file input to the model. @@ -31249,7 +34651,9 @@ func main() { - `Detail ResponseInputFileContentDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"` - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"` @@ -31271,6 +34675,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Type FunctionCallOutput` The type of the function tool call output. Always `function_call_output`. @@ -31281,6 +34695,30 @@ func main() { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemFunctionCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemFunctionCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemFunctionCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Status string` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -31349,7 +34787,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -31357,6 +34795,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -31365,6 +34811,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -31430,11 +34880,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -31605,6 +35051,14 @@ func main() { - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -31821,6 +35275,22 @@ func main() { - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -31980,6 +35450,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -32120,6 +35598,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -32188,16 +35674,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -32298,6 +35798,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The item type. Always `tool_search_output`. @@ -32372,6 +35880,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -32712,6 +36222,30 @@ func main() { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Environment ResponseInputItemShellCallEnvironmentUnion` The environment to execute the shell commands in. @@ -32788,6 +36322,30 @@ func main() { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `MaxOutputLength int64` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -32882,6 +36440,30 @@ func main() { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseInputItemApplyPatchCallOutput struct{…}` The streamed output emitted by an apply patch tool call. @@ -32908,6 +36490,30 @@ func main() { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Output string` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -33100,6 +36706,30 @@ func main() { The unique ID of the custom tool call output in the OpenAI platform. + - `Caller ResponseCustomToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseCustomToolCall struct{…}` A call to a custom tool created by the model. @@ -33126,6 +36756,26 @@ func main() { The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -33154,6 +36804,58 @@ func main() { - `const ResponseInputItemItemReferenceTypeItemReference ResponseInputItemItemReferenceType = "item_reference"` + - `type ResponseInputItemProgram struct{…}` + + - `ID string` + + The unique ID of this program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The item type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseInputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of this program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output. + + - `const ResponseInputItemProgramOutputStatusCompleted ResponseInputItemProgramOutputStatus = "completed"` + + - `const ResponseInputItemProgramOutputStatusIncomplete ResponseInputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The item type. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `Metadata Metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -33174,6 +36876,12 @@ func main() { - `type ChatModel string` + - `const ChatModelGPT5_6Sol ChatModel = "gpt-5.6-sol"` + + - `const ChatModelGPT5_6Terra ChatModel = "gpt-5.6-terra"` + + - `const ChatModelGPT5_6Luna ChatModel = "gpt-5.6-luna"` + - `const ChatModelGPT5_4 ChatModel = "gpt-5.4"` - `const ChatModelGPT5_4Mini ChatModel = "gpt-5.4-mini"` @@ -33441,6 +37149,30 @@ func main() { - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + - `Caller ResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -33516,6 +37248,58 @@ func main() { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `type ResponseOutputItemProgram struct{…}` + + - `ID string` + + The unique ID of the program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The type of the item. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseOutputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of the program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output item. + + - `const ResponseOutputItemProgramOutputStatusCompleted ResponseOutputItemProgramOutputStatus = "completed"` + + - `const ResponseOutputItemProgramOutputStatusIncomplete ResponseOutputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The type of the item. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `type ResponseToolSearchCall struct{…}` - `ID string` @@ -33620,6 +37404,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -33722,6 +37508,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -33970,6 +37758,26 @@ func main() { - `const ShellCallShellCall ShellCall = "shell_call"` + - `Caller ResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -34050,6 +37858,26 @@ func main() { - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + - `Caller ResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -34134,6 +37962,26 @@ func main() { - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + - `Caller ResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -34164,6 +38012,26 @@ func main() { - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + - `Caller ResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call output. @@ -34497,6 +38365,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `type ResponseToolChoiceSpecificProgrammaticToolCallingParam struct{…}` + + - `Type ProgrammaticToolCalling` + + The tool to call. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolChoiceApplyPatch struct{…}` Forces the model to call the apply_patch tool when executing a tool call. @@ -34567,6 +38443,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -34793,9 +38671,32 @@ func main() { Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `PromptCacheOptions ResponsePromptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode string` + + Whether implicit prompt-cache breakpoints were enabled. + + - `const ResponsePromptCacheOptionsModeImplicit ResponsePromptCacheOptionsMode = "implicit"` + + - `const ResponsePromptCacheOptionsModeExplicit ResponsePromptCacheOptionsMode = "explicit"` + + - `Ttl string` + + The minimum lifetime applied to each cache breakpoint. + + - `const ResponsePromptCacheOptionsTtl30m ResponsePromptCacheOptionsTtl = "30m"` + - `PromptCacheRetention ResponsePromptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -34828,16 +38729,13 @@ func main() { - `Effort ReasoningEffort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + Constrains effort on reasoning for reasoning models. Currently supported + values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. + Reducing reasoning effort can result in faster responses and fewer tokens + used on reasoning in a response. Not all reasoning models support every + value. See the + [reasoning guide](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `const ReasoningEffortNone ReasoningEffort = "none"` @@ -34851,6 +38749,8 @@ func main() { - `const ReasoningEffortXhigh ReasoningEffort = "xhigh"` + - `const ReasoningEffortMax ReasoningEffort = "max"` + - `GenerateSummary ReasoningGenerateSummary` **Deprecated:** use `summary` instead. @@ -34865,6 +38765,24 @@ func main() { - `const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"` + - `Mode ReasoningMode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `string` + + - `type ReasoningMode string` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `const ReasoningModeStandard ReasoningMode = "standard"` + + - `const ReasoningModePro ReasoningMode = "pro"` + - `Summary ReasoningSummary` A summary of the reasoning performed by the model. This can be @@ -35049,6 +38967,10 @@ func main() { A detailed breakdown of the input tokens. + - `CacheWriteTokens int64` + + The number of input tokens that were written to the cache. + - `CachedTokens int64` The number of tokens that were retrieved from the cache. @@ -35158,6 +39080,26 @@ func main() { - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + - `Caller ResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -35190,6 +39132,26 @@ func main() { - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + - `Caller ResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call output. @@ -35545,6 +39507,8 @@ func main() { - `const ResponseErrorCodeInvalidPrompt ResponseErrorCode = "invalid_prompt"` + - `const ResponseErrorCodeBioPolicy ResponseErrorCode = "bio_policy"` + - `const ResponseErrorCodeVectorStoreTimeout ResponseErrorCode = "vector_store_timeout"` - `const ResponseErrorCodeInvalidImage ResponseErrorCode = "invalid_image"` @@ -35640,6 +39604,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -35670,6 +39644,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -35682,7 +39666,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -35704,6 +39690,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role EasyInputMessageRole` The role of the message input. One of `user`, `assistant`, `system`, or @@ -36651,6 +40647,26 @@ func main() { The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -36698,6 +40714,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImageContent struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -36728,6 +40754,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFileContent struct{…}` A file input to the model. @@ -36740,7 +40776,9 @@ func main() { - `Detail ResponseInputFileContentDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"` - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"` @@ -36762,6 +40800,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Type FunctionCallOutput` The type of the function tool call output. Always `function_call_output`. @@ -36772,6 +40820,30 @@ func main() { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemFunctionCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemFunctionCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemFunctionCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Status string` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -36840,7 +40912,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -36848,6 +40920,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -36856,6 +40936,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -36921,11 +41005,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -37096,6 +41176,14 @@ func main() { - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -37312,6 +41400,22 @@ func main() { - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -37471,6 +41575,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -37611,6 +41723,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -37679,16 +41799,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -37789,6 +41923,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The item type. Always `tool_search_output`. @@ -37863,6 +42005,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -38203,6 +42347,30 @@ func main() { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Environment ResponseInputItemShellCallEnvironmentUnion` The environment to execute the shell commands in. @@ -38279,6 +42447,30 @@ func main() { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `MaxOutputLength int64` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -38373,6 +42565,30 @@ func main() { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseInputItemApplyPatchCallOutput struct{…}` The streamed output emitted by an apply patch tool call. @@ -38399,6 +42615,30 @@ func main() { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Output string` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -38591,6 +42831,30 @@ func main() { The unique ID of the custom tool call output in the OpenAI platform. + - `Caller ResponseCustomToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseCustomToolCall struct{…}` A call to a custom tool created by the model. @@ -38617,6 +42881,26 @@ func main() { The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -38645,6 +42929,58 @@ func main() { - `const ResponseInputItemItemReferenceTypeItemReference ResponseInputItemItemReferenceType = "item_reference"` + - `type ResponseInputItemProgram struct{…}` + + - `ID string` + + The unique ID of this program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The item type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseInputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of this program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output. + + - `const ResponseInputItemProgramOutputStatusCompleted ResponseInputItemProgramOutputStatus = "completed"` + + - `const ResponseInputItemProgramOutputStatusIncomplete ResponseInputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The item type. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `Metadata Metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -38665,6 +43001,12 @@ func main() { - `type ChatModel string` + - `const ChatModelGPT5_6Sol ChatModel = "gpt-5.6-sol"` + + - `const ChatModelGPT5_6Terra ChatModel = "gpt-5.6-terra"` + + - `const ChatModelGPT5_6Luna ChatModel = "gpt-5.6-luna"` + - `const ChatModelGPT5_4 ChatModel = "gpt-5.4"` - `const ChatModelGPT5_4Mini ChatModel = "gpt-5.4-mini"` @@ -38932,6 +43274,30 @@ func main() { - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + - `Caller ResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -39007,6 +43373,58 @@ func main() { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `type ResponseOutputItemProgram struct{…}` + + - `ID string` + + The unique ID of the program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The type of the item. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseOutputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of the program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output item. + + - `const ResponseOutputItemProgramOutputStatusCompleted ResponseOutputItemProgramOutputStatus = "completed"` + + - `const ResponseOutputItemProgramOutputStatusIncomplete ResponseOutputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The type of the item. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `type ResponseToolSearchCall struct{…}` - `ID string` @@ -39111,6 +43529,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -39213,6 +43633,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -39461,6 +43883,26 @@ func main() { - `const ShellCallShellCall ShellCall = "shell_call"` + - `Caller ResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -39541,6 +43983,26 @@ func main() { - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + - `Caller ResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -39625,6 +44087,26 @@ func main() { - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + - `Caller ResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -39655,6 +44137,26 @@ func main() { - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + - `Caller ResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call output. @@ -39988,6 +44490,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `type ResponseToolChoiceSpecificProgrammaticToolCallingParam struct{…}` + + - `Type ProgrammaticToolCalling` + + The tool to call. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolChoiceApplyPatch struct{…}` Forces the model to call the apply_patch tool when executing a tool call. @@ -40058,6 +44568,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -40284,9 +44796,32 @@ func main() { Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `PromptCacheOptions ResponsePromptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode string` + + Whether implicit prompt-cache breakpoints were enabled. + + - `const ResponsePromptCacheOptionsModeImplicit ResponsePromptCacheOptionsMode = "implicit"` + + - `const ResponsePromptCacheOptionsModeExplicit ResponsePromptCacheOptionsMode = "explicit"` + + - `Ttl string` + + The minimum lifetime applied to each cache breakpoint. + + - `const ResponsePromptCacheOptionsTtl30m ResponsePromptCacheOptionsTtl = "30m"` + - `PromptCacheRetention ResponsePromptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -40319,16 +44854,13 @@ func main() { - `Effort ReasoningEffort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + Constrains effort on reasoning for reasoning models. Currently supported + values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. + Reducing reasoning effort can result in faster responses and fewer tokens + used on reasoning in a response. Not all reasoning models support every + value. See the + [reasoning guide](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `const ReasoningEffortNone ReasoningEffort = "none"` @@ -40342,6 +44874,8 @@ func main() { - `const ReasoningEffortXhigh ReasoningEffort = "xhigh"` + - `const ReasoningEffortMax ReasoningEffort = "max"` + - `GenerateSummary ReasoningGenerateSummary` **Deprecated:** use `summary` instead. @@ -40356,6 +44890,24 @@ func main() { - `const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"` + - `Mode ReasoningMode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `string` + + - `type ReasoningMode string` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `const ReasoningModeStandard ReasoningMode = "standard"` + + - `const ReasoningModePro ReasoningMode = "pro"` + - `Summary ReasoningSummary` A summary of the reasoning performed by the model. This can be @@ -40540,6 +45092,10 @@ func main() { A detailed breakdown of the input tokens. + - `CacheWriteTokens int64` + + The number of input tokens that were written to the cache. + - `CachedTokens int64` The number of tokens that were retrieved from the cache. @@ -41142,6 +45698,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -41172,6 +45738,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -41184,7 +45760,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -41206,6 +45784,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseOutputText struct{…}` A text output from the model. @@ -41784,6 +46372,8 @@ func main() { - `const ResponseErrorCodeInvalidPrompt ResponseErrorCode = "invalid_prompt"` + - `const ResponseErrorCodeBioPolicy ResponseErrorCode = "bio_policy"` + - `const ResponseErrorCodeVectorStoreTimeout ResponseErrorCode = "vector_store_timeout"` - `const ResponseErrorCodeInvalidImage ResponseErrorCode = "invalid_image"` @@ -41879,6 +46469,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -41909,6 +46509,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -41921,7 +46531,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -41943,6 +46555,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role EasyInputMessageRole` The role of the message input. One of `user`, `assistant`, `system`, or @@ -42890,6 +47512,26 @@ func main() { The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -42937,6 +47579,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImageContent struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -42967,6 +47619,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFileContent struct{…}` A file input to the model. @@ -42979,7 +47641,9 @@ func main() { - `Detail ResponseInputFileContentDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"` - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"` @@ -43001,6 +47665,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Type FunctionCallOutput` The type of the function tool call output. Always `function_call_output`. @@ -43011,6 +47685,30 @@ func main() { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemFunctionCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemFunctionCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemFunctionCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Status string` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -43079,7 +47777,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -43087,6 +47785,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -43095,6 +47801,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -43160,11 +47870,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -43335,6 +48041,14 @@ func main() { - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -43551,6 +48265,22 @@ func main() { - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -43710,6 +48440,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -43850,6 +48588,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -43918,16 +48664,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -44028,6 +48788,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The item type. Always `tool_search_output`. @@ -44102,6 +48870,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -44442,6 +49212,30 @@ func main() { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Environment ResponseInputItemShellCallEnvironmentUnion` The environment to execute the shell commands in. @@ -44518,6 +49312,30 @@ func main() { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `MaxOutputLength int64` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -44612,6 +49430,30 @@ func main() { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseInputItemApplyPatchCallOutput struct{…}` The streamed output emitted by an apply patch tool call. @@ -44638,6 +49480,30 @@ func main() { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Output string` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -44830,6 +49696,30 @@ func main() { The unique ID of the custom tool call output in the OpenAI platform. + - `Caller ResponseCustomToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseCustomToolCall struct{…}` A call to a custom tool created by the model. @@ -44856,6 +49746,26 @@ func main() { The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -44884,6 +49794,58 @@ func main() { - `const ResponseInputItemItemReferenceTypeItemReference ResponseInputItemItemReferenceType = "item_reference"` + - `type ResponseInputItemProgram struct{…}` + + - `ID string` + + The unique ID of this program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The item type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseInputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of this program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output. + + - `const ResponseInputItemProgramOutputStatusCompleted ResponseInputItemProgramOutputStatus = "completed"` + + - `const ResponseInputItemProgramOutputStatusIncomplete ResponseInputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The item type. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `Metadata Metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -44904,6 +49866,12 @@ func main() { - `type ChatModel string` + - `const ChatModelGPT5_6Sol ChatModel = "gpt-5.6-sol"` + + - `const ChatModelGPT5_6Terra ChatModel = "gpt-5.6-terra"` + + - `const ChatModelGPT5_6Luna ChatModel = "gpt-5.6-luna"` + - `const ChatModelGPT5_4 ChatModel = "gpt-5.4"` - `const ChatModelGPT5_4Mini ChatModel = "gpt-5.4-mini"` @@ -45171,6 +50139,30 @@ func main() { - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + - `Caller ResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -45246,6 +50238,58 @@ func main() { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `type ResponseOutputItemProgram struct{…}` + + - `ID string` + + The unique ID of the program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The type of the item. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseOutputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of the program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output item. + + - `const ResponseOutputItemProgramOutputStatusCompleted ResponseOutputItemProgramOutputStatus = "completed"` + + - `const ResponseOutputItemProgramOutputStatusIncomplete ResponseOutputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The type of the item. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `type ResponseToolSearchCall struct{…}` - `ID string` @@ -45350,6 +50394,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -45452,6 +50498,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -45700,6 +50748,26 @@ func main() { - `const ShellCallShellCall ShellCall = "shell_call"` + - `Caller ResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -45780,6 +50848,26 @@ func main() { - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + - `Caller ResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -45864,6 +50952,26 @@ func main() { - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + - `Caller ResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -45894,6 +51002,26 @@ func main() { - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + - `Caller ResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call output. @@ -46227,6 +51355,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `type ResponseToolChoiceSpecificProgrammaticToolCallingParam struct{…}` + + - `Type ProgrammaticToolCalling` + + The tool to call. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolChoiceApplyPatch struct{…}` Forces the model to call the apply_patch tool when executing a tool call. @@ -46297,6 +51433,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -46523,9 +51661,32 @@ func main() { Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `PromptCacheOptions ResponsePromptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode string` + + Whether implicit prompt-cache breakpoints were enabled. + + - `const ResponsePromptCacheOptionsModeImplicit ResponsePromptCacheOptionsMode = "implicit"` + + - `const ResponsePromptCacheOptionsModeExplicit ResponsePromptCacheOptionsMode = "explicit"` + + - `Ttl string` + + The minimum lifetime applied to each cache breakpoint. + + - `const ResponsePromptCacheOptionsTtl30m ResponsePromptCacheOptionsTtl = "30m"` + - `PromptCacheRetention ResponsePromptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -46558,16 +51719,13 @@ func main() { - `Effort ReasoningEffort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + Constrains effort on reasoning for reasoning models. Currently supported + values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. + Reducing reasoning effort can result in faster responses and fewer tokens + used on reasoning in a response. Not all reasoning models support every + value. See the + [reasoning guide](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `const ReasoningEffortNone ReasoningEffort = "none"` @@ -46581,6 +51739,8 @@ func main() { - `const ReasoningEffortXhigh ReasoningEffort = "xhigh"` + - `const ReasoningEffortMax ReasoningEffort = "max"` + - `GenerateSummary ReasoningGenerateSummary` **Deprecated:** use `summary` instead. @@ -46595,6 +51755,24 @@ func main() { - `const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"` + - `Mode ReasoningMode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `string` + + - `type ReasoningMode string` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `const ReasoningModeStandard ReasoningMode = "standard"` + + - `const ReasoningModePro ReasoningMode = "pro"` + - `Summary ReasoningSummary` A summary of the reasoning performed by the model. This can be @@ -46779,6 +51957,10 @@ func main() { A detailed breakdown of the input tokens. + - `CacheWriteTokens int64` + + The number of input tokens that were written to the cache. + - `CachedTokens int64` The number of tokens that were retrieved from the cache. @@ -46844,6 +52026,26 @@ func main() { The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -46964,6 +52166,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -46994,6 +52206,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -47006,7 +52228,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -47028,6 +52252,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Type CustomToolCallOutput` The type of the custom tool call output. Always `custom_tool_call_output`. @@ -47038,6 +52272,30 @@ func main() { The unique ID of the custom tool call output in the OpenAI platform. + - `Caller ResponseCustomToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + ### Response Custom Tool Call Output Item - `type ResponseCustomToolCallOutputItem struct{…}` @@ -47079,6 +52337,8 @@ func main() { - `const ResponseErrorCodeInvalidPrompt ResponseErrorCode = "invalid_prompt"` + - `const ResponseErrorCodeBioPolicy ResponseErrorCode = "bio_policy"` + - `const ResponseErrorCodeVectorStoreTimeout ResponseErrorCode = "vector_store_timeout"` - `const ResponseErrorCodeInvalidImage ResponseErrorCode = "invalid_image"` @@ -47173,6 +52433,8 @@ func main() { - `const ResponseErrorCodeInvalidPrompt ResponseErrorCode = "invalid_prompt"` + - `const ResponseErrorCodeBioPolicy ResponseErrorCode = "bio_policy"` + - `const ResponseErrorCodeVectorStoreTimeout ResponseErrorCode = "vector_store_timeout"` - `const ResponseErrorCodeInvalidImage ResponseErrorCode = "invalid_image"` @@ -47268,6 +52530,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -47298,6 +52570,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -47310,7 +52592,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -47332,6 +52616,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role EasyInputMessageRole` The role of the message input. One of `user`, `assistant`, `system`, or @@ -48279,6 +53573,26 @@ func main() { The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -48326,6 +53640,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImageContent struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -48356,6 +53680,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFileContent struct{…}` A file input to the model. @@ -48368,7 +53702,9 @@ func main() { - `Detail ResponseInputFileContentDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"` - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"` @@ -48390,6 +53726,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Type FunctionCallOutput` The type of the function tool call output. Always `function_call_output`. @@ -48400,6 +53746,30 @@ func main() { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemFunctionCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemFunctionCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemFunctionCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Status string` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -48468,7 +53838,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -48476,6 +53846,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -48484,6 +53862,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -48549,11 +53931,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -48724,6 +54102,14 @@ func main() { - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -48940,6 +54326,22 @@ func main() { - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -49099,6 +54501,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -49239,6 +54649,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -49307,16 +54725,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -49417,6 +54849,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The item type. Always `tool_search_output`. @@ -49491,6 +54931,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -49831,6 +55273,30 @@ func main() { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Environment ResponseInputItemShellCallEnvironmentUnion` The environment to execute the shell commands in. @@ -49907,6 +55373,30 @@ func main() { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `MaxOutputLength int64` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -50001,6 +55491,30 @@ func main() { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseInputItemApplyPatchCallOutput struct{…}` The streamed output emitted by an apply patch tool call. @@ -50027,6 +55541,30 @@ func main() { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Output string` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -50219,6 +55757,30 @@ func main() { The unique ID of the custom tool call output in the OpenAI platform. + - `Caller ResponseCustomToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseCustomToolCall struct{…}` A call to a custom tool created by the model. @@ -50245,6 +55807,26 @@ func main() { The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -50273,6 +55855,58 @@ func main() { - `const ResponseInputItemItemReferenceTypeItemReference ResponseInputItemItemReferenceType = "item_reference"` + - `type ResponseInputItemProgram struct{…}` + + - `ID string` + + The unique ID of this program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The item type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseInputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of this program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output. + + - `const ResponseInputItemProgramOutputStatusCompleted ResponseInputItemProgramOutputStatus = "completed"` + + - `const ResponseInputItemProgramOutputStatusIncomplete ResponseInputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The item type. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `Metadata Metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -50293,6 +55927,12 @@ func main() { - `type ChatModel string` + - `const ChatModelGPT5_6Sol ChatModel = "gpt-5.6-sol"` + + - `const ChatModelGPT5_6Terra ChatModel = "gpt-5.6-terra"` + + - `const ChatModelGPT5_6Luna ChatModel = "gpt-5.6-luna"` + - `const ChatModelGPT5_4 ChatModel = "gpt-5.4"` - `const ChatModelGPT5_4Mini ChatModel = "gpt-5.4-mini"` @@ -50560,6 +56200,30 @@ func main() { - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + - `Caller ResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -50635,6 +56299,58 @@ func main() { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `type ResponseOutputItemProgram struct{…}` + + - `ID string` + + The unique ID of the program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The type of the item. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseOutputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of the program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output item. + + - `const ResponseOutputItemProgramOutputStatusCompleted ResponseOutputItemProgramOutputStatus = "completed"` + + - `const ResponseOutputItemProgramOutputStatusIncomplete ResponseOutputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The type of the item. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `type ResponseToolSearchCall struct{…}` - `ID string` @@ -50739,6 +56455,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -50841,6 +56559,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -51089,6 +56809,26 @@ func main() { - `const ShellCallShellCall ShellCall = "shell_call"` + - `Caller ResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -51169,6 +56909,26 @@ func main() { - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + - `Caller ResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -51253,6 +57013,26 @@ func main() { - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + - `Caller ResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -51283,6 +57063,26 @@ func main() { - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + - `Caller ResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call output. @@ -51616,6 +57416,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `type ResponseToolChoiceSpecificProgrammaticToolCallingParam struct{…}` + + - `Type ProgrammaticToolCalling` + + The tool to call. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolChoiceApplyPatch struct{…}` Forces the model to call the apply_patch tool when executing a tool call. @@ -51686,6 +57494,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -51912,9 +57722,32 @@ func main() { Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `PromptCacheOptions ResponsePromptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode string` + + Whether implicit prompt-cache breakpoints were enabled. + + - `const ResponsePromptCacheOptionsModeImplicit ResponsePromptCacheOptionsMode = "implicit"` + + - `const ResponsePromptCacheOptionsModeExplicit ResponsePromptCacheOptionsMode = "explicit"` + + - `Ttl string` + + The minimum lifetime applied to each cache breakpoint. + + - `const ResponsePromptCacheOptionsTtl30m ResponsePromptCacheOptionsTtl = "30m"` + - `PromptCacheRetention ResponsePromptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -51947,16 +57780,13 @@ func main() { - `Effort ReasoningEffort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + Constrains effort on reasoning for reasoning models. Currently supported + values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. + Reducing reasoning effort can result in faster responses and fewer tokens + used on reasoning in a response. Not all reasoning models support every + value. See the + [reasoning guide](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `const ReasoningEffortNone ReasoningEffort = "none"` @@ -51970,6 +57800,8 @@ func main() { - `const ReasoningEffortXhigh ReasoningEffort = "xhigh"` + - `const ReasoningEffortMax ReasoningEffort = "max"` + - `GenerateSummary ReasoningGenerateSummary` **Deprecated:** use `summary` instead. @@ -51984,6 +57816,24 @@ func main() { - `const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"` + - `Mode ReasoningMode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `string` + + - `type ReasoningMode string` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `const ReasoningModeStandard ReasoningMode = "standard"` + + - `const ReasoningModePro ReasoningMode = "pro"` + - `Summary ReasoningSummary` A summary of the reasoning performed by the model. This can be @@ -52168,6 +58018,10 @@ func main() { A detailed breakdown of the input tokens. + - `CacheWriteTokens int64` + + The number of input tokens that were written to the cache. + - `CachedTokens int64` The number of tokens that were retrieved from the cache. @@ -52536,6 +58390,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImageContent struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -52566,6 +58430,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFileContent struct{…}` A file input to the model. @@ -52578,7 +58452,9 @@ func main() { - `Detail ResponseInputFileContentDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"` - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"` @@ -52600,6 +58476,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + ### Response Function Call Output Item List - `type ResponseFunctionCallOutputItemList []ResponseFunctionCallOutputItemUnion` @@ -52620,6 +58506,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImageContent struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -52650,6 +58546,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFileContent struct{…}` A file input to the model. @@ -52662,7 +58568,9 @@ func main() { - `Detail ResponseInputFileContentDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"` - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"` @@ -52684,6 +58592,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + ### Response Function Shell Call Output Content - `type ResponseFunctionShellCallOutputContent struct{…}` @@ -52796,6 +58714,26 @@ func main() { - `const ShellCallShellCall ShellCall = "shell_call"` + - `Caller ResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -52878,6 +58816,26 @@ func main() { - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + - `Caller ResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -52911,6 +58869,26 @@ func main() { The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -52989,6 +58967,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -53019,6 +59007,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -53031,7 +59029,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -53053,6 +59053,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Status ResponseFunctionToolCallOutputItemStatus` The status of the item. One of `in_progress`, `completed`, or @@ -53070,6 +59080,30 @@ func main() { - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + - `Caller ResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -53308,6 +59342,8 @@ func main() { - `const ResponseErrorCodeInvalidPrompt ResponseErrorCode = "invalid_prompt"` + - `const ResponseErrorCodeBioPolicy ResponseErrorCode = "bio_policy"` + - `const ResponseErrorCodeVectorStoreTimeout ResponseErrorCode = "vector_store_timeout"` - `const ResponseErrorCodeInvalidImage ResponseErrorCode = "invalid_image"` @@ -53403,6 +59439,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -53433,6 +59479,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -53445,7 +59501,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -53467,6 +59525,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role EasyInputMessageRole` The role of the message input. One of `user`, `assistant`, `system`, or @@ -54414,6 +60482,26 @@ func main() { The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -54461,6 +60549,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImageContent struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -54491,6 +60589,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFileContent struct{…}` A file input to the model. @@ -54503,7 +60611,9 @@ func main() { - `Detail ResponseInputFileContentDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"` - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"` @@ -54525,6 +60635,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Type FunctionCallOutput` The type of the function tool call output. Always `function_call_output`. @@ -54535,6 +60655,30 @@ func main() { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemFunctionCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemFunctionCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemFunctionCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Status string` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -54603,7 +60747,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -54611,6 +60755,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -54619,6 +60771,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -54684,11 +60840,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -54859,6 +61011,14 @@ func main() { - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -55075,6 +61235,22 @@ func main() { - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -55234,6 +61410,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -55374,6 +61558,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -55442,16 +61634,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -55552,6 +61758,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The item type. Always `tool_search_output`. @@ -55626,6 +61840,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -55966,6 +62182,30 @@ func main() { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Environment ResponseInputItemShellCallEnvironmentUnion` The environment to execute the shell commands in. @@ -56042,6 +62282,30 @@ func main() { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `MaxOutputLength int64` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -56136,6 +62400,30 @@ func main() { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseInputItemApplyPatchCallOutput struct{…}` The streamed output emitted by an apply patch tool call. @@ -56162,6 +62450,30 @@ func main() { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Output string` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -56354,6 +62666,30 @@ func main() { The unique ID of the custom tool call output in the OpenAI platform. + - `Caller ResponseCustomToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseCustomToolCall struct{…}` A call to a custom tool created by the model. @@ -56380,6 +62716,26 @@ func main() { The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -56408,6 +62764,58 @@ func main() { - `const ResponseInputItemItemReferenceTypeItemReference ResponseInputItemItemReferenceType = "item_reference"` + - `type ResponseInputItemProgram struct{…}` + + - `ID string` + + The unique ID of this program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The item type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseInputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of this program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output. + + - `const ResponseInputItemProgramOutputStatusCompleted ResponseInputItemProgramOutputStatus = "completed"` + + - `const ResponseInputItemProgramOutputStatusIncomplete ResponseInputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The item type. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `Metadata Metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -56428,6 +62836,12 @@ func main() { - `type ChatModel string` + - `const ChatModelGPT5_6Sol ChatModel = "gpt-5.6-sol"` + + - `const ChatModelGPT5_6Terra ChatModel = "gpt-5.6-terra"` + + - `const ChatModelGPT5_6Luna ChatModel = "gpt-5.6-luna"` + - `const ChatModelGPT5_4 ChatModel = "gpt-5.4"` - `const ChatModelGPT5_4Mini ChatModel = "gpt-5.4-mini"` @@ -56695,6 +63109,30 @@ func main() { - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + - `Caller ResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -56770,6 +63208,58 @@ func main() { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `type ResponseOutputItemProgram struct{…}` + + - `ID string` + + The unique ID of the program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The type of the item. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseOutputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of the program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output item. + + - `const ResponseOutputItemProgramOutputStatusCompleted ResponseOutputItemProgramOutputStatus = "completed"` + + - `const ResponseOutputItemProgramOutputStatusIncomplete ResponseOutputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The type of the item. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `type ResponseToolSearchCall struct{…}` - `ID string` @@ -56874,107 +63364,111 @@ func main() { A tool that runs Python code to help generate a response to a prompt. - - `type ToolImageGeneration struct{…}` - - A tool that generates images using the GPT image models. - - - `type ToolLocalShell struct{…}` - - A tool that allows the model to execute shell commands in a local environment. - - - `type FunctionShellTool struct{…}` - - A tool that allows the model to execute shell commands. - - - `type CustomTool struct{…}` - - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) - - - `type NamespaceTool struct{…}` - - Groups function/custom tools under a shared namespace. - - - `type ToolSearchTool struct{…}` - - Hosted or BYOT tool search configuration for deferred tools. - - - `type WebSearchPreviewTool struct{…}` - - This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). - - - `type ApplyPatchTool struct{…}` - - Allows the assistant to create, delete, or update files using unified diffs. - - - `Type ToolSearchOutput` - - The type of the item. Always `tool_search_output`. - - - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"` - - - `CreatedBy string` - - The identifier of the actor that created the item. - - - `type ResponseOutputItemAdditionalTools struct{…}` - - - `ID string` - - The unique ID of the additional tools item. - - - `Role string` - - The role that provided the additional tools. - - - `const ResponseOutputItemAdditionalToolsRoleUnknown ResponseOutputItemAdditionalToolsRole = "unknown"` - - - `const ResponseOutputItemAdditionalToolsRoleUser ResponseOutputItemAdditionalToolsRole = "user"` - - - `const ResponseOutputItemAdditionalToolsRoleAssistant ResponseOutputItemAdditionalToolsRole = "assistant"` - - - `const ResponseOutputItemAdditionalToolsRoleSystem ResponseOutputItemAdditionalToolsRole = "system"` - - - `const ResponseOutputItemAdditionalToolsRoleCritic ResponseOutputItemAdditionalToolsRole = "critic"` - - - `const ResponseOutputItemAdditionalToolsRoleDiscriminator ResponseOutputItemAdditionalToolsRole = "discriminator"` - - - `const ResponseOutputItemAdditionalToolsRoleDeveloper ResponseOutputItemAdditionalToolsRole = "developer"` - - - `const ResponseOutputItemAdditionalToolsRoleTool ResponseOutputItemAdditionalToolsRole = "tool"` - - - `Tools []ToolUnion` - - The additional tool definitions made available at this item. - - - `type FunctionTool struct{…}` - - Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). - - - `type FileSearchTool struct{…}` - - A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). - - - `type ComputerTool struct{…}` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type ComputerUsePreviewTool struct{…}` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type WebSearchTool struct{…}` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). - - - `type ToolMcp struct{…}` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). - - - `type ToolCodeInterpreter struct{…}` - - A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + + - `type ToolImageGeneration struct{…}` + + A tool that generates images using the GPT image models. + + - `type ToolLocalShell struct{…}` + + A tool that allows the model to execute shell commands in a local environment. + + - `type FunctionShellTool struct{…}` + + A tool that allows the model to execute shell commands. + + - `type CustomTool struct{…}` + + A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + + - `type NamespaceTool struct{…}` + + Groups function/custom tools under a shared namespace. + + - `type ToolSearchTool struct{…}` + + Hosted or BYOT tool search configuration for deferred tools. + + - `type WebSearchPreviewTool struct{…}` + + This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + + - `type ApplyPatchTool struct{…}` + + Allows the assistant to create, delete, or update files using unified diffs. + + - `Type ToolSearchOutput` + + The type of the item. Always `tool_search_output`. + + - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"` + + - `CreatedBy string` + + The identifier of the actor that created the item. + + - `type ResponseOutputItemAdditionalTools struct{…}` + + - `ID string` + + The unique ID of the additional tools item. + + - `Role string` + + The role that provided the additional tools. + + - `const ResponseOutputItemAdditionalToolsRoleUnknown ResponseOutputItemAdditionalToolsRole = "unknown"` + + - `const ResponseOutputItemAdditionalToolsRoleUser ResponseOutputItemAdditionalToolsRole = "user"` + + - `const ResponseOutputItemAdditionalToolsRoleAssistant ResponseOutputItemAdditionalToolsRole = "assistant"` + + - `const ResponseOutputItemAdditionalToolsRoleSystem ResponseOutputItemAdditionalToolsRole = "system"` + + - `const ResponseOutputItemAdditionalToolsRoleCritic ResponseOutputItemAdditionalToolsRole = "critic"` + + - `const ResponseOutputItemAdditionalToolsRoleDiscriminator ResponseOutputItemAdditionalToolsRole = "discriminator"` + + - `const ResponseOutputItemAdditionalToolsRoleDeveloper ResponseOutputItemAdditionalToolsRole = "developer"` + + - `const ResponseOutputItemAdditionalToolsRoleTool ResponseOutputItemAdditionalToolsRole = "tool"` + + - `Tools []ToolUnion` + + The additional tool definitions made available at this item. + + - `type FunctionTool struct{…}` + + Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). + + - `type FileSearchTool struct{…}` + + A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). + + - `type ComputerTool struct{…}` + + A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + + - `type ComputerUsePreviewTool struct{…}` + + A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + + - `type WebSearchTool struct{…}` + + Search the Internet for sources related to the prompt. Learn more about the + [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + + - `type ToolMcp struct{…}` + + Give the model access to additional tools via remote Model Context Protocol + (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + + - `type ToolCodeInterpreter struct{…}` + + A tool that runs Python code to help generate a response to a prompt. + + - `type ToolProgrammaticToolCalling struct{…}` - `type ToolImageGeneration struct{…}` @@ -57224,6 +63718,26 @@ func main() { - `const ShellCallShellCall ShellCall = "shell_call"` + - `Caller ResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -57304,6 +63818,26 @@ func main() { - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + - `Caller ResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -57388,6 +63922,26 @@ func main() { - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + - `Caller ResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -57418,6 +63972,26 @@ func main() { - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + - `Caller ResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call output. @@ -57751,6 +64325,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `type ResponseToolChoiceSpecificProgrammaticToolCallingParam struct{…}` + + - `Type ProgrammaticToolCalling` + + The tool to call. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolChoiceApplyPatch struct{…}` Forces the model to call the apply_patch tool when executing a tool call. @@ -57821,6 +64403,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -58047,9 +64631,32 @@ func main() { Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `PromptCacheOptions ResponsePromptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode string` + + Whether implicit prompt-cache breakpoints were enabled. + + - `const ResponsePromptCacheOptionsModeImplicit ResponsePromptCacheOptionsMode = "implicit"` + + - `const ResponsePromptCacheOptionsModeExplicit ResponsePromptCacheOptionsMode = "explicit"` + + - `Ttl string` + + The minimum lifetime applied to each cache breakpoint. + + - `const ResponsePromptCacheOptionsTtl30m ResponsePromptCacheOptionsTtl = "30m"` + - `PromptCacheRetention ResponsePromptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -58082,16 +64689,13 @@ func main() { - `Effort ReasoningEffort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + Constrains effort on reasoning for reasoning models. Currently supported + values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. + Reducing reasoning effort can result in faster responses and fewer tokens + used on reasoning in a response. Not all reasoning models support every + value. See the + [reasoning guide](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `const ReasoningEffortNone ReasoningEffort = "none"` @@ -58105,6 +64709,8 @@ func main() { - `const ReasoningEffortXhigh ReasoningEffort = "xhigh"` + - `const ReasoningEffortMax ReasoningEffort = "max"` + - `GenerateSummary ReasoningGenerateSummary` **Deprecated:** use `summary` instead. @@ -58119,6 +64725,24 @@ func main() { - `const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"` + - `Mode ReasoningMode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `string` + + - `type ReasoningMode string` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `const ReasoningModeStandard ReasoningMode = "standard"` + + - `const ReasoningModePro ReasoningMode = "pro"` + - `Summary ReasoningSummary` A summary of the reasoning performed by the model. This can be @@ -58303,6 +64927,10 @@ func main() { A detailed breakdown of the input tokens. + - `CacheWriteTokens int64` + + The number of input tokens that were written to the cache. + - `CachedTokens int64` The number of tokens that were retrieved from the cache. @@ -58403,6 +65031,8 @@ func main() { - `const ResponseErrorCodeInvalidPrompt ResponseErrorCode = "invalid_prompt"` + - `const ResponseErrorCodeBioPolicy ResponseErrorCode = "bio_policy"` + - `const ResponseErrorCodeVectorStoreTimeout ResponseErrorCode = "vector_store_timeout"` - `const ResponseErrorCodeInvalidImage ResponseErrorCode = "invalid_image"` @@ -58498,6 +65128,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -58528,6 +65168,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -58540,7 +65190,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -58562,6 +65214,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role EasyInputMessageRole` The role of the message input. One of `user`, `assistant`, `system`, or @@ -59509,6 +66171,26 @@ func main() { The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -59556,6 +66238,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImageContent struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -59586,6 +66278,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFileContent struct{…}` A file input to the model. @@ -59598,7 +66300,9 @@ func main() { - `Detail ResponseInputFileContentDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"` - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"` @@ -59620,6 +66324,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Type FunctionCallOutput` The type of the function tool call output. Always `function_call_output`. @@ -59630,6 +66344,30 @@ func main() { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemFunctionCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemFunctionCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemFunctionCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Status string` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -59698,7 +66436,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -59706,6 +66444,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -59714,6 +66460,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -59779,11 +66529,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -59954,6 +66700,14 @@ func main() { - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -60170,6 +66924,22 @@ func main() { - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -60329,6 +67099,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -60469,6 +67247,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -60537,16 +67323,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -60647,6 +67447,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The item type. Always `tool_search_output`. @@ -60721,6 +67529,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -61061,6 +67871,30 @@ func main() { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Environment ResponseInputItemShellCallEnvironmentUnion` The environment to execute the shell commands in. @@ -61137,6 +67971,30 @@ func main() { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `MaxOutputLength int64` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -61231,6 +68089,30 @@ func main() { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseInputItemApplyPatchCallOutput struct{…}` The streamed output emitted by an apply patch tool call. @@ -61257,6 +68139,30 @@ func main() { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Output string` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -61449,6 +68355,30 @@ func main() { The unique ID of the custom tool call output in the OpenAI platform. + - `Caller ResponseCustomToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseCustomToolCall struct{…}` A call to a custom tool created by the model. @@ -61475,6 +68405,26 @@ func main() { The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -61503,6 +68453,58 @@ func main() { - `const ResponseInputItemItemReferenceTypeItemReference ResponseInputItemItemReferenceType = "item_reference"` + - `type ResponseInputItemProgram struct{…}` + + - `ID string` + + The unique ID of this program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The item type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseInputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of this program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output. + + - `const ResponseInputItemProgramOutputStatusCompleted ResponseInputItemProgramOutputStatus = "completed"` + + - `const ResponseInputItemProgramOutputStatusIncomplete ResponseInputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The item type. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `Metadata Metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -61523,6 +68525,12 @@ func main() { - `type ChatModel string` + - `const ChatModelGPT5_6Sol ChatModel = "gpt-5.6-sol"` + + - `const ChatModelGPT5_6Terra ChatModel = "gpt-5.6-terra"` + + - `const ChatModelGPT5_6Luna ChatModel = "gpt-5.6-luna"` + - `const ChatModelGPT5_4 ChatModel = "gpt-5.4"` - `const ChatModelGPT5_4Mini ChatModel = "gpt-5.4-mini"` @@ -61790,6 +68798,30 @@ func main() { - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + - `Caller ResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -61865,6 +68897,58 @@ func main() { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `type ResponseOutputItemProgram struct{…}` + + - `ID string` + + The unique ID of the program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The type of the item. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseOutputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of the program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output item. + + - `const ResponseOutputItemProgramOutputStatusCompleted ResponseOutputItemProgramOutputStatus = "completed"` + + - `const ResponseOutputItemProgramOutputStatusIncomplete ResponseOutputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The type of the item. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `type ResponseToolSearchCall struct{…}` - `ID string` @@ -61969,6 +69053,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -62071,6 +69157,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -62319,6 +69407,26 @@ func main() { - `const ShellCallShellCall ShellCall = "shell_call"` + - `Caller ResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -62399,6 +69507,26 @@ func main() { - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + - `Caller ResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -62483,6 +69611,26 @@ func main() { - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + - `Caller ResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -62513,6 +69661,26 @@ func main() { - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + - `Caller ResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call output. @@ -62846,6 +70014,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `type ResponseToolChoiceSpecificProgrammaticToolCallingParam struct{…}` + + - `Type ProgrammaticToolCalling` + + The tool to call. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolChoiceApplyPatch struct{…}` Forces the model to call the apply_patch tool when executing a tool call. @@ -62916,6 +70092,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -63142,9 +70320,32 @@ func main() { Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `PromptCacheOptions ResponsePromptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode string` + + Whether implicit prompt-cache breakpoints were enabled. + + - `const ResponsePromptCacheOptionsModeImplicit ResponsePromptCacheOptionsMode = "implicit"` + + - `const ResponsePromptCacheOptionsModeExplicit ResponsePromptCacheOptionsMode = "explicit"` + + - `Ttl string` + + The minimum lifetime applied to each cache breakpoint. + + - `const ResponsePromptCacheOptionsTtl30m ResponsePromptCacheOptionsTtl = "30m"` + - `PromptCacheRetention ResponsePromptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -63177,16 +70378,13 @@ func main() { - `Effort ReasoningEffort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + Constrains effort on reasoning for reasoning models. Currently supported + values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. + Reducing reasoning effort can result in faster responses and fewer tokens + used on reasoning in a response. Not all reasoning models support every + value. See the + [reasoning guide](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `const ReasoningEffortNone ReasoningEffort = "none"` @@ -63200,6 +70398,8 @@ func main() { - `const ReasoningEffortXhigh ReasoningEffort = "xhigh"` + - `const ReasoningEffortMax ReasoningEffort = "max"` + - `GenerateSummary ReasoningGenerateSummary` **Deprecated:** use `summary` instead. @@ -63214,6 +70414,24 @@ func main() { - `const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"` + - `Mode ReasoningMode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `string` + + - `type ReasoningMode string` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `const ReasoningModeStandard ReasoningMode = "standard"` + + - `const ReasoningModePro ReasoningMode = "pro"` + - `Summary ReasoningSummary` A summary of the reasoning performed by the model. This can be @@ -63398,6 +70616,10 @@ func main() { A detailed breakdown of the input tokens. + - `CacheWriteTokens int64` + + The number of input tokens that were written to the cache. + - `CachedTokens int64` The number of tokens that were retrieved from the cache. @@ -63476,6 +70698,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -63506,6 +70738,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -63518,7 +70760,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -63540,6 +70784,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role EasyInputMessageRole` The role of the message input. One of `user`, `assistant`, `system`, or @@ -64487,6 +71741,26 @@ func main() { The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -64534,6 +71808,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImageContent struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -64564,6 +71848,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFileContent struct{…}` A file input to the model. @@ -64576,7 +71870,9 @@ func main() { - `Detail ResponseInputFileContentDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"` - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"` @@ -64598,6 +71894,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Type FunctionCallOutput` The type of the function tool call output. Always `function_call_output`. @@ -64608,6 +71914,30 @@ func main() { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemFunctionCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemFunctionCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemFunctionCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Status string` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -64676,7 +72006,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -64684,6 +72014,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -64692,6 +72030,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -64757,11 +72099,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -64932,6 +72270,14 @@ func main() { - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -65148,6 +72494,22 @@ func main() { - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -65307,6 +72669,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -65447,6 +72817,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -65515,16 +72893,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -65625,6 +73017,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The item type. Always `tool_search_output`. @@ -65699,6 +73099,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -66039,6 +73441,30 @@ func main() { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Environment ResponseInputItemShellCallEnvironmentUnion` The environment to execute the shell commands in. @@ -66115,6 +73541,30 @@ func main() { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `MaxOutputLength int64` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -66209,6 +73659,30 @@ func main() { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseInputItemApplyPatchCallOutput struct{…}` The streamed output emitted by an apply patch tool call. @@ -66235,6 +73709,30 @@ func main() { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Output string` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -66427,6 +73925,30 @@ func main() { The unique ID of the custom tool call output in the OpenAI platform. + - `Caller ResponseCustomToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseCustomToolCall struct{…}` A call to a custom tool created by the model. @@ -66453,6 +73975,26 @@ func main() { The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -66481,6 +74023,58 @@ func main() { - `const ResponseInputItemItemReferenceTypeItemReference ResponseInputItemItemReferenceType = "item_reference"` + - `type ResponseInputItemProgram struct{…}` + + - `ID string` + + The unique ID of this program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The item type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseInputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of this program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output. + + - `const ResponseInputItemProgramOutputStatusCompleted ResponseInputItemProgramOutputStatus = "completed"` + + - `const ResponseInputItemProgramOutputStatusIncomplete ResponseInputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The item type. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + ### Response Input Audio - `type ResponseInputAudio struct{…}` @@ -66528,6 +74122,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -66558,6 +74162,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -66570,7 +74184,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -66592,6 +74208,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + ### Response Input File - `type ResponseInputFile struct{…}` @@ -66606,7 +74232,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -66628,6 +74256,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + ### Response Input File Content - `type ResponseInputFileContent struct{…}` @@ -66642,7 +74280,9 @@ func main() { - `Detail ResponseInputFileContentDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"` - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"` @@ -66664,6 +74304,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + ### Response Input Image - `type ResponseInputImage struct{…}` @@ -66696,6 +74346,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + ### Response Input Image Content - `type ResponseInputImageContent struct{…}` @@ -66728,6 +74388,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + ### Response Input Item - `type ResponseInputItemUnion interface{…}` @@ -66772,6 +74442,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -66802,6 +74482,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -66814,7 +74504,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -66836,6 +74528,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role EasyInputMessageRole` The role of the message input. One of `user`, `assistant`, `system`, or @@ -67783,6 +75485,26 @@ func main() { The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -67830,6 +75552,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImageContent struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -67860,6 +75592,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFileContent struct{…}` A file input to the model. @@ -67872,7 +75614,9 @@ func main() { - `Detail ResponseInputFileContentDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"` - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"` @@ -67894,6 +75638,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Type FunctionCallOutput` The type of the function tool call output. Always `function_call_output`. @@ -67904,6 +75658,30 @@ func main() { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemFunctionCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemFunctionCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemFunctionCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Status string` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -67972,7 +75750,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -67980,6 +75758,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -67988,6 +75774,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -68053,11 +75843,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -68228,6 +76014,14 @@ func main() { - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -68444,6 +76238,22 @@ func main() { - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -68603,6 +76413,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -68743,6 +76561,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -68811,16 +76637,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -68921,6 +76761,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The item type. Always `tool_search_output`. @@ -68995,6 +76843,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -69335,6 +77185,30 @@ func main() { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Environment ResponseInputItemShellCallEnvironmentUnion` The environment to execute the shell commands in. @@ -69411,6 +77285,30 @@ func main() { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `MaxOutputLength int64` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -69505,6 +77403,30 @@ func main() { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseInputItemApplyPatchCallOutput struct{…}` The streamed output emitted by an apply patch tool call. @@ -69531,6 +77453,30 @@ func main() { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Output string` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -69723,6 +77669,30 @@ func main() { The unique ID of the custom tool call output in the OpenAI platform. + - `Caller ResponseCustomToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseCustomToolCall struct{…}` A call to a custom tool created by the model. @@ -69749,6 +77719,26 @@ func main() { The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -69777,6 +77767,58 @@ func main() { - `const ResponseInputItemItemReferenceTypeItemReference ResponseInputItemItemReferenceType = "item_reference"` + - `type ResponseInputItemProgram struct{…}` + + - `ID string` + + The unique ID of this program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The item type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseInputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of this program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output. + + - `const ResponseInputItemProgramOutputStatusCompleted ResponseInputItemProgramOutputStatus = "completed"` + + - `const ResponseInputItemProgramOutputStatusIncomplete ResponseInputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The item type. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + ### Response Input Message Content List - `type ResponseInputMessageContentList []ResponseInputContentUnion` @@ -69798,6 +77840,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -69828,6 +77880,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -69840,7 +77902,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -69862,6 +77926,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + ### Response Input Message Item - `type ResponseInputMessageItem struct{…}` @@ -69889,6 +77963,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -69919,6 +78003,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -69931,7 +78025,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -69953,6 +78049,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role ResponseInputMessageItemRole` The role of the message input. One of `user`, `system`, or `developer`. @@ -69996,6 +78102,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + ### Response Input Text Content - `type ResponseInputTextContent struct{…}` @@ -70012,6 +78128,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + ### Response Item - `type ResponseItemUnion interface{…}` @@ -70043,6 +78169,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -70073,6 +78209,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -70085,7 +78231,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -70107,6 +78255,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role ResponseInputMessageItemRole` The role of the message input. One of `user`, `system`, or `developer`. @@ -71067,6 +79225,30 @@ func main() { - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + - `Caller ResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -71159,7 +79341,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -71167,6 +79349,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -71175,6 +79365,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -71240,11 +79434,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -71415,6 +79605,14 @@ func main() { - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -71631,6 +79829,22 @@ func main() { - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -71790,6 +80004,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -71930,6 +80152,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -71998,16 +80228,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -72108,6 +80352,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The type of the item. Always `tool_search_output`. @@ -72178,6 +80430,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -72277,6 +80531,58 @@ func main() { - `const ResponseReasoningItemStatusIncomplete ResponseReasoningItemStatus = "incomplete"` + - `type ResponseItemProgram struct{…}` + + - `ID string` + + The unique ID of the program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The type of the item. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of the program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output item. + + - `const ResponseItemProgramOutputStatusCompleted ResponseItemProgramOutputStatus = "completed"` + + - `const ResponseItemProgramOutputStatusIncomplete ResponseItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The type of the item. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `type ResponseCompactionItem struct{…}` A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). @@ -72552,6 +80858,26 @@ func main() { - `const ShellCallShellCall ShellCall = "shell_call"` + - `Caller ResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -72632,6 +80958,26 @@ func main() { - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + - `Caller ResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -72716,6 +81062,26 @@ func main() { - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + - `Caller ResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -72746,6 +81112,26 @@ func main() { - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + - `Caller ResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call output. @@ -73469,6 +81855,26 @@ func main() { The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -73519,6 +81925,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -73549,6 +81965,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -73561,7 +81987,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -73583,6 +82011,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Status ResponseFunctionToolCallOutputItemStatus` The status of the item. One of `in_progress`, `completed`, or @@ -73600,6 +82038,30 @@ func main() { - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + - `Caller ResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -74267,6 +82729,58 @@ func main() { - `const ResponseReasoningItemStatusIncomplete ResponseReasoningItemStatus = "incomplete"` + - `type ResponseOutputItemProgram struct{…}` + + - `ID string` + + The unique ID of the program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The type of the item. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseOutputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of the program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output item. + + - `const ResponseOutputItemProgramOutputStatusCompleted ResponseOutputItemProgramOutputStatus = "completed"` + + - `const ResponseOutputItemProgramOutputStatusIncomplete ResponseOutputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The type of the item. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `type ResponseToolSearchCall struct{…}` - `ID string` @@ -74355,7 +82869,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -74363,6 +82877,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -74371,6 +82893,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -74436,11 +82962,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -74611,6 +83133,14 @@ func main() { - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -74827,6 +83357,22 @@ func main() { - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -74986,6 +83532,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -75126,6 +83680,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -75194,16 +83756,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -75304,6 +83880,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The type of the item. Always `tool_search_output`. @@ -75374,6 +83958,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -75687,6 +84273,26 @@ func main() { - `const ShellCallShellCall ShellCall = "shell_call"` + - `Caller ResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -75767,6 +84373,26 @@ func main() { - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + - `Caller ResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -75851,6 +84477,26 @@ func main() { - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + - `Caller ResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -75881,6 +84527,26 @@ func main() { - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + - `Caller ResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call output. @@ -76062,6 +84728,26 @@ func main() { The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -76383,6 +85069,26 @@ func main() { The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -76433,6 +85139,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -76463,6 +85179,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -76475,7 +85201,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -76497,6 +85225,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Status ResponseFunctionToolCallOutputItemStatus` The status of the item. One of `in_progress`, `completed`, or @@ -76514,6 +85252,30 @@ func main() { - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + - `Caller ResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -77181,6 +85943,58 @@ func main() { - `const ResponseReasoningItemStatusIncomplete ResponseReasoningItemStatus = "incomplete"` + - `type ResponseOutputItemProgram struct{…}` + + - `ID string` + + The unique ID of the program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The type of the item. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseOutputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of the program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output item. + + - `const ResponseOutputItemProgramOutputStatusCompleted ResponseOutputItemProgramOutputStatus = "completed"` + + - `const ResponseOutputItemProgramOutputStatusIncomplete ResponseOutputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The type of the item. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `type ResponseToolSearchCall struct{…}` - `ID string` @@ -77269,7 +86083,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -77277,6 +86091,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -77285,6 +86107,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -77350,11 +86176,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -77525,6 +86347,14 @@ func main() { - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -77741,6 +86571,22 @@ func main() { - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -77900,6 +86746,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -78040,6 +86894,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -78108,16 +86970,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -78218,6 +87094,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The type of the item. Always `tool_search_output`. @@ -78288,6 +87172,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -78601,6 +87487,26 @@ func main() { - `const ShellCallShellCall ShellCall = "shell_call"` + - `Caller ResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -78681,6 +87587,26 @@ func main() { - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + - `Caller ResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -78765,6 +87691,26 @@ func main() { - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + - `Caller ResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -78795,6 +87741,26 @@ func main() { - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + - `Caller ResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call output. @@ -78976,6 +87942,26 @@ func main() { The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -79311,6 +88297,26 @@ func main() { The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -79361,6 +88367,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -79391,6 +88407,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -79403,7 +88429,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -79425,6 +88453,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Status ResponseFunctionToolCallOutputItemStatus` The status of the item. One of `in_progress`, `completed`, or @@ -79442,6 +88480,30 @@ func main() { - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + - `Caller ResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -80109,6 +89171,58 @@ func main() { - `const ResponseReasoningItemStatusIncomplete ResponseReasoningItemStatus = "incomplete"` + - `type ResponseOutputItemProgram struct{…}` + + - `ID string` + + The unique ID of the program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The type of the item. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseOutputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of the program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output item. + + - `const ResponseOutputItemProgramOutputStatusCompleted ResponseOutputItemProgramOutputStatus = "completed"` + + - `const ResponseOutputItemProgramOutputStatusIncomplete ResponseOutputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The type of the item. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `type ResponseToolSearchCall struct{…}` - `ID string` @@ -80197,7 +89311,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -80205,6 +89319,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -80213,6 +89335,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -80278,11 +89404,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -80453,6 +89575,14 @@ func main() { - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -80669,6 +89799,22 @@ func main() { - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -80828,6 +89974,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -80968,6 +90122,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -81036,16 +90198,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -81146,6 +90322,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The type of the item. Always `tool_search_output`. @@ -81216,6 +90400,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -81529,6 +90715,26 @@ func main() { - `const ShellCallShellCall ShellCall = "shell_call"` + - `Caller ResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -81609,6 +90815,26 @@ func main() { - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + - `Caller ResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -81693,6 +90919,26 @@ func main() { - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + - `Caller ResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -81723,6 +90969,26 @@ func main() { - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + - `Caller ResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call output. @@ -81904,6 +91170,26 @@ func main() { The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -82353,6 +91639,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -82383,6 +91679,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -82395,7 +91701,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -82417,6 +91725,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Version string` Optional version of the prompt template. @@ -82453,6 +91771,8 @@ func main() { - `const ResponseErrorCodeInvalidPrompt ResponseErrorCode = "invalid_prompt"` + - `const ResponseErrorCodeBioPolicy ResponseErrorCode = "bio_policy"` + - `const ResponseErrorCodeVectorStoreTimeout ResponseErrorCode = "vector_store_timeout"` - `const ResponseErrorCodeInvalidImage ResponseErrorCode = "invalid_image"` @@ -82548,6 +91868,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -82578,6 +91908,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -82590,7 +91930,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -82612,6 +91954,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role EasyInputMessageRole` The role of the message input. One of `user`, `assistant`, `system`, or @@ -83559,6 +92911,26 @@ func main() { The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -83606,6 +92978,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImageContent struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -83636,6 +93018,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFileContent struct{…}` A file input to the model. @@ -83648,7 +93040,9 @@ func main() { - `Detail ResponseInputFileContentDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"` - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"` @@ -83670,6 +93064,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Type FunctionCallOutput` The type of the function tool call output. Always `function_call_output`. @@ -83680,6 +93084,30 @@ func main() { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemFunctionCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemFunctionCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemFunctionCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Status string` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -83748,7 +93176,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -83756,6 +93184,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -83764,6 +93200,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -83829,11 +93269,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -84004,6 +93440,14 @@ func main() { - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -84220,6 +93664,22 @@ func main() { - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -84379,6 +93839,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -84519,6 +93987,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -84587,16 +94063,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -84697,6 +94187,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The item type. Always `tool_search_output`. @@ -84771,6 +94269,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -85111,6 +94611,30 @@ func main() { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Environment ResponseInputItemShellCallEnvironmentUnion` The environment to execute the shell commands in. @@ -85187,6 +94711,30 @@ func main() { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `MaxOutputLength int64` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -85281,6 +94829,30 @@ func main() { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseInputItemApplyPatchCallOutput struct{…}` The streamed output emitted by an apply patch tool call. @@ -85307,6 +94879,30 @@ func main() { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Output string` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -85499,6 +95095,30 @@ func main() { The unique ID of the custom tool call output in the OpenAI platform. + - `Caller ResponseCustomToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseCustomToolCall struct{…}` A call to a custom tool created by the model. @@ -85525,6 +95145,26 @@ func main() { The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -85553,6 +95193,58 @@ func main() { - `const ResponseInputItemItemReferenceTypeItemReference ResponseInputItemItemReferenceType = "item_reference"` + - `type ResponseInputItemProgram struct{…}` + + - `ID string` + + The unique ID of this program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The item type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseInputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of this program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output. + + - `const ResponseInputItemProgramOutputStatusCompleted ResponseInputItemProgramOutputStatus = "completed"` + + - `const ResponseInputItemProgramOutputStatusIncomplete ResponseInputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The item type. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `Metadata Metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -85573,6 +95265,12 @@ func main() { - `type ChatModel string` + - `const ChatModelGPT5_6Sol ChatModel = "gpt-5.6-sol"` + + - `const ChatModelGPT5_6Terra ChatModel = "gpt-5.6-terra"` + + - `const ChatModelGPT5_6Luna ChatModel = "gpt-5.6-luna"` + - `const ChatModelGPT5_4 ChatModel = "gpt-5.4"` - `const ChatModelGPT5_4Mini ChatModel = "gpt-5.4-mini"` @@ -85840,6 +95538,30 @@ func main() { - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + - `Caller ResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -85915,6 +95637,58 @@ func main() { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `type ResponseOutputItemProgram struct{…}` + + - `ID string` + + The unique ID of the program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The type of the item. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseOutputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of the program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output item. + + - `const ResponseOutputItemProgramOutputStatusCompleted ResponseOutputItemProgramOutputStatus = "completed"` + + - `const ResponseOutputItemProgramOutputStatusIncomplete ResponseOutputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The type of the item. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `type ResponseToolSearchCall struct{…}` - `ID string` @@ -86019,6 +95793,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -86121,6 +95897,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -86369,6 +96147,26 @@ func main() { - `const ShellCallShellCall ShellCall = "shell_call"` + - `Caller ResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -86449,6 +96247,26 @@ func main() { - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + - `Caller ResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -86533,6 +96351,26 @@ func main() { - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + - `Caller ResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -86563,6 +96401,26 @@ func main() { - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + - `Caller ResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call output. @@ -86896,6 +96754,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `type ResponseToolChoiceSpecificProgrammaticToolCallingParam struct{…}` + + - `Type ProgrammaticToolCalling` + + The tool to call. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolChoiceApplyPatch struct{…}` Forces the model to call the apply_patch tool when executing a tool call. @@ -86966,6 +96832,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -87192,9 +97060,32 @@ func main() { Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `PromptCacheOptions ResponsePromptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode string` + + Whether implicit prompt-cache breakpoints were enabled. + + - `const ResponsePromptCacheOptionsModeImplicit ResponsePromptCacheOptionsMode = "implicit"` + + - `const ResponsePromptCacheOptionsModeExplicit ResponsePromptCacheOptionsMode = "explicit"` + + - `Ttl string` + + The minimum lifetime applied to each cache breakpoint. + + - `const ResponsePromptCacheOptionsTtl30m ResponsePromptCacheOptionsTtl = "30m"` + - `PromptCacheRetention ResponsePromptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -87227,16 +97118,13 @@ func main() { - `Effort ReasoningEffort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + Constrains effort on reasoning for reasoning models. Currently supported + values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. + Reducing reasoning effort can result in faster responses and fewer tokens + used on reasoning in a response. Not all reasoning models support every + value. See the + [reasoning guide](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `const ReasoningEffortNone ReasoningEffort = "none"` @@ -87250,6 +97138,8 @@ func main() { - `const ReasoningEffortXhigh ReasoningEffort = "xhigh"` + - `const ReasoningEffortMax ReasoningEffort = "max"` + - `GenerateSummary ReasoningGenerateSummary` **Deprecated:** use `summary` instead. @@ -87264,6 +97154,24 @@ func main() { - `const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"` + - `Mode ReasoningMode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `string` + + - `type ReasoningMode string` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `const ReasoningModeStandard ReasoningMode = "standard"` + + - `const ReasoningModePro ReasoningMode = "pro"` + - `Summary ReasoningSummary` A summary of the reasoning performed by the model. This can be @@ -87448,6 +97356,10 @@ func main() { A detailed breakdown of the input tokens. + - `CacheWriteTokens int64` + + The number of input tokens that were written to the cache. + - `CachedTokens int64` The number of tokens that were retrieved from the cache. @@ -87632,6 +97544,13 @@ func main() { - `const ResponseReasoningSummaryPartDoneResponseReasoningSummaryPartDone ResponseReasoningSummaryPartDone = "response.reasoning_summary_part.done"` + - `Status ResponseReasoningSummaryPartDoneEventStatus` + + The completion status of the summary part. Omitted when the part completed + normally and set to `incomplete` when generation was interrupted. + + - `const ResponseReasoningSummaryPartDoneEventStatusIncomplete ResponseReasoningSummaryPartDoneEventStatus = "incomplete"` + ### Response Reasoning Summary Text Delta Event - `type ResponseReasoningSummaryTextDeltaEvent struct{…}` @@ -88061,6 +97980,8 @@ func main() { - `const ResponseErrorCodeInvalidPrompt ResponseErrorCode = "invalid_prompt"` + - `const ResponseErrorCodeBioPolicy ResponseErrorCode = "bio_policy"` + - `const ResponseErrorCodeVectorStoreTimeout ResponseErrorCode = "vector_store_timeout"` - `const ResponseErrorCodeInvalidImage ResponseErrorCode = "invalid_image"` @@ -88156,6 +98077,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -88186,6 +98117,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -88198,7 +98139,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -88220,6 +98163,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role EasyInputMessageRole` The role of the message input. One of `user`, `assistant`, `system`, or @@ -89167,6 +99120,26 @@ func main() { The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -89214,6 +99187,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImageContent struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -89244,6 +99227,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFileContent struct{…}` A file input to the model. @@ -89256,7 +99249,9 @@ func main() { - `Detail ResponseInputFileContentDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"` - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"` @@ -89278,6 +99273,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Type FunctionCallOutput` The type of the function tool call output. Always `function_call_output`. @@ -89288,6 +99293,30 @@ func main() { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemFunctionCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemFunctionCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemFunctionCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Status string` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -89356,7 +99385,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -89364,6 +99393,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -89372,6 +99409,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -89437,11 +99478,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -89612,6 +99649,14 @@ func main() { - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -89828,6 +99873,22 @@ func main() { - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -89987,6 +100048,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -90127,6 +100196,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -90195,16 +100272,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -90305,6 +100396,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The item type. Always `tool_search_output`. @@ -90379,6 +100478,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -90719,6 +100820,30 @@ func main() { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Environment ResponseInputItemShellCallEnvironmentUnion` The environment to execute the shell commands in. @@ -90795,6 +100920,30 @@ func main() { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `MaxOutputLength int64` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -90889,6 +101038,30 @@ func main() { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseInputItemApplyPatchCallOutput struct{…}` The streamed output emitted by an apply patch tool call. @@ -90915,6 +101088,30 @@ func main() { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Output string` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -91107,6 +101304,30 @@ func main() { The unique ID of the custom tool call output in the OpenAI platform. + - `Caller ResponseCustomToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseCustomToolCall struct{…}` A call to a custom tool created by the model. @@ -91133,6 +101354,26 @@ func main() { The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -91161,6 +101402,58 @@ func main() { - `const ResponseInputItemItemReferenceTypeItemReference ResponseInputItemItemReferenceType = "item_reference"` + - `type ResponseInputItemProgram struct{…}` + + - `ID string` + + The unique ID of this program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The item type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseInputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of this program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output. + + - `const ResponseInputItemProgramOutputStatusCompleted ResponseInputItemProgramOutputStatus = "completed"` + + - `const ResponseInputItemProgramOutputStatusIncomplete ResponseInputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The item type. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `Metadata Metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -91181,6 +101474,12 @@ func main() { - `type ChatModel string` + - `const ChatModelGPT5_6Sol ChatModel = "gpt-5.6-sol"` + + - `const ChatModelGPT5_6Terra ChatModel = "gpt-5.6-terra"` + + - `const ChatModelGPT5_6Luna ChatModel = "gpt-5.6-luna"` + - `const ChatModelGPT5_4 ChatModel = "gpt-5.4"` - `const ChatModelGPT5_4Mini ChatModel = "gpt-5.4-mini"` @@ -91448,6 +101747,30 @@ func main() { - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + - `Caller ResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -91523,6 +101846,58 @@ func main() { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `type ResponseOutputItemProgram struct{…}` + + - `ID string` + + The unique ID of the program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The type of the item. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseOutputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of the program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output item. + + - `const ResponseOutputItemProgramOutputStatusCompleted ResponseOutputItemProgramOutputStatus = "completed"` + + - `const ResponseOutputItemProgramOutputStatusIncomplete ResponseOutputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The type of the item. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `type ResponseToolSearchCall struct{…}` - `ID string` @@ -91627,6 +102002,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -91729,6 +102106,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -91977,6 +102356,26 @@ func main() { - `const ShellCallShellCall ShellCall = "shell_call"` + - `Caller ResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -92057,6 +102456,26 @@ func main() { - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + - `Caller ResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -92141,6 +102560,26 @@ func main() { - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + - `Caller ResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -92171,6 +102610,26 @@ func main() { - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + - `Caller ResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call output. @@ -92504,6 +102963,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `type ResponseToolChoiceSpecificProgrammaticToolCallingParam struct{…}` + + - `Type ProgrammaticToolCalling` + + The tool to call. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolChoiceApplyPatch struct{…}` Forces the model to call the apply_patch tool when executing a tool call. @@ -92574,6 +103041,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -92800,9 +103269,32 @@ func main() { Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `PromptCacheOptions ResponsePromptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode string` + + Whether implicit prompt-cache breakpoints were enabled. + + - `const ResponsePromptCacheOptionsModeImplicit ResponsePromptCacheOptionsMode = "implicit"` + + - `const ResponsePromptCacheOptionsModeExplicit ResponsePromptCacheOptionsMode = "explicit"` + + - `Ttl string` + + The minimum lifetime applied to each cache breakpoint. + + - `const ResponsePromptCacheOptionsTtl30m ResponsePromptCacheOptionsTtl = "30m"` + - `PromptCacheRetention ResponsePromptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -92835,16 +103327,13 @@ func main() { - `Effort ReasoningEffort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + Constrains effort on reasoning for reasoning models. Currently supported + values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. + Reducing reasoning effort can result in faster responses and fewer tokens + used on reasoning in a response. Not all reasoning models support every + value. See the + [reasoning guide](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `const ReasoningEffortNone ReasoningEffort = "none"` @@ -92858,6 +103347,8 @@ func main() { - `const ReasoningEffortXhigh ReasoningEffort = "xhigh"` + - `const ReasoningEffortMax ReasoningEffort = "max"` + - `GenerateSummary ReasoningGenerateSummary` **Deprecated:** use `summary` instead. @@ -92872,6 +103363,24 @@ func main() { - `const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"` + - `Mode ReasoningMode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `string` + + - `type ReasoningMode string` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `const ReasoningModeStandard ReasoningMode = "standard"` + + - `const ReasoningModePro ReasoningMode = "pro"` + - `Summary ReasoningSummary` A summary of the reasoning performed by the model. This can be @@ -93056,6 +103565,10 @@ func main() { A detailed breakdown of the input tokens. + - `CacheWriteTokens int64` + + The number of input tokens that were written to the cache. + - `CachedTokens int64` The number of tokens that were retrieved from the cache. @@ -93458,6 +103971,10 @@ func main() { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `type ResponseOutputItemProgram struct{…}` + + - `type ResponseOutputItemProgramOutput struct{…}` + - `type ResponseToolSearchCall struct{…}` - `type ResponseToolSearchOutputItem struct{…}` @@ -93640,6 +104157,13 @@ func main() { - `const ResponseReasoningSummaryPartDoneResponseReasoningSummaryPartDone ResponseReasoningSummaryPartDone = "response.reasoning_summary_part.done"` + - `Status ResponseReasoningSummaryPartDoneEventStatus` + + The completion status of the summary part. Omitted when the part completed + normally and set to `incomplete` when generation was interrupted. + + - `const ResponseReasoningSummaryPartDoneEventStatusIncomplete ResponseReasoningSummaryPartDoneEventStatus = "incomplete"` + - `type ResponseReasoningSummaryTextDeltaEvent struct{…}` Emitted when a delta is added to a reasoning summary text. @@ -94677,7 +105201,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -94685,6 +105209,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -94693,6 +105225,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -94758,11 +105294,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -94933,6 +105465,14 @@ func main() { - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -95149,6 +105689,22 @@ func main() { - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -95308,6 +105864,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -95448,6 +106012,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -95516,16 +106088,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -95626,6 +106212,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The type of the item. Always `tool_search_output`. @@ -95658,7 +106252,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -95666,6 +106260,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -95674,6 +106276,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -95739,11 +106345,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -95914,6 +106516,14 @@ func main() { - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -96130,6 +106740,22 @@ func main() { - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -96289,6 +106915,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -96429,6 +107063,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -96497,16 +107139,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -96607,6 +107263,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The item type. Always `tool_search_output`. @@ -96654,6 +107318,10 @@ func main() { A detailed breakdown of the input tokens. + - `CacheWriteTokens int64` + + The number of input tokens that were written to the cache. + - `CachedTokens int64` The number of tokens that were retrieved from the cache. @@ -96870,6 +107538,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -96900,6 +107578,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -96912,7 +107600,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -96934,6 +107624,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role EasyInputMessageRole` The role of the message input. One of `user`, `assistant`, `system`, or @@ -97881,6 +108581,26 @@ func main() { The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -97928,6 +108648,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImageContent struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -97958,6 +108688,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFileContent struct{…}` A file input to the model. @@ -97970,7 +108710,9 @@ func main() { - `Detail ResponseInputFileContentDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"` - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"` @@ -97992,6 +108734,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Type FunctionCallOutput` The type of the function tool call output. Always `function_call_output`. @@ -98002,6 +108754,30 @@ func main() { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemFunctionCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemFunctionCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemFunctionCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Status string` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -98070,7 +108846,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -98078,6 +108854,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -98086,6 +108870,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -98151,11 +108939,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -98326,6 +109110,14 @@ func main() { - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -98542,6 +109334,22 @@ func main() { - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -98701,6 +109509,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -98841,6 +109657,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -98909,16 +109733,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -99019,6 +109857,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The item type. Always `tool_search_output`. @@ -99093,6 +109939,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -99433,6 +110281,30 @@ func main() { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Environment ResponseInputItemShellCallEnvironmentUnion` The environment to execute the shell commands in. @@ -99509,6 +110381,30 @@ func main() { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `MaxOutputLength int64` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -99603,6 +110499,30 @@ func main() { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseInputItemApplyPatchCallOutput struct{…}` The streamed output emitted by an apply patch tool call. @@ -99629,6 +110549,30 @@ func main() { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Output string` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -99821,6 +110765,30 @@ func main() { The unique ID of the custom tool call output in the OpenAI platform. + - `Caller ResponseCustomToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseCustomToolCall struct{…}` A call to a custom tool created by the model. @@ -99847,6 +110815,26 @@ func main() { The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -99875,6 +110863,58 @@ func main() { - `const ResponseInputItemItemReferenceTypeItemReference ResponseInputItemItemReferenceType = "item_reference"` + - `type ResponseInputItemProgram struct{…}` + + - `ID string` + + The unique ID of this program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The item type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseInputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of this program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output. + + - `const ResponseInputItemProgramOutputStatusCompleted ResponseInputItemProgramOutputStatus = "completed"` + + - `const ResponseInputItemProgramOutputStatusIncomplete ResponseInputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The item type. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `Instructions string` A system (or developer) message inserted into the model's context. @@ -99911,6 +110951,12 @@ func main() { - `type ChatModel string` + - `const ChatModelGPT5_6Sol ChatModel = "gpt-5.6-sol"` + + - `const ChatModelGPT5_6Terra ChatModel = "gpt-5.6-terra"` + + - `const ChatModelGPT5_6Luna ChatModel = "gpt-5.6-luna"` + - `const ChatModelGPT5_4 ChatModel = "gpt-5.4"` - `const ChatModelGPT5_4Mini ChatModel = "gpt-5.4-mini"` @@ -100105,6 +111151,30 @@ func main() { The moderation model to use for moderated completions, e.g. 'omni-moderation-latest'. + - `Policy ResponsesClientEventModerationPolicy` + + The policy to apply to moderated response input and output. + + - `Input ResponsesClientEventModerationPolicyInput` + + The moderation policy for the response input. + + - `Mode string` + + - `const ResponsesClientEventModerationPolicyInputModeScore ResponsesClientEventModerationPolicyInputMode = "score"` + + - `const ResponsesClientEventModerationPolicyInputModeBlock ResponsesClientEventModerationPolicyInputMode = "block"` + + - `Output ResponsesClientEventModerationPolicyOutput` + + The moderation policy for the response output. + + - `Mode string` + + - `const ResponsesClientEventModerationPolicyOutputModeScore ResponsesClientEventModerationPolicyOutputMode = "score"` + + - `const ResponsesClientEventModerationPolicyOutputModeBlock ResponsesClientEventModerationPolicyOutputMode = "block"` + - `ParallelToolCalls bool` Whether to allow the model to run tool calls in parallel. @@ -100152,9 +111222,32 @@ func main() { Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `PromptCacheOptions ResponsesClientEventPromptCacheOptions` + + Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + + - `Mode string` + + Controls whether OpenAI automatically creates an implicit cache breakpoint. Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint and writes up to the latest three explicit breakpoints in the request. With `explicit`, OpenAI does not create an implicit breakpoint and writes up to the latest four explicit breakpoints. If there are no explicit breakpoints, the request does not use prompt caching. + + - `const ResponsesClientEventPromptCacheOptionsModeImplicit ResponsesClientEventPromptCacheOptionsMode = "implicit"` + + - `const ResponsesClientEventPromptCacheOptionsModeExplicit ResponsesClientEventPromptCacheOptionsMode = "explicit"` + + - `Ttl string` + + The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Defaults to `30m`, which is currently the only supported value. The backend may retain cache entries for longer. + + - `const ResponsesClientEventPromptCacheOptionsTtl30m ResponsesClientEventPromptCacheOptionsTtl = "30m"` + - `PromptCacheRetention ResponsesClientEventPromptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -100187,16 +111280,13 @@ func main() { - `Effort ReasoningEffort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + Constrains effort on reasoning for reasoning models. Currently supported + values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. + Reducing reasoning effort can result in faster responses and fewer tokens + used on reasoning in a response. Not all reasoning models support every + value. See the + [reasoning guide](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `const ReasoningEffortNone ReasoningEffort = "none"` @@ -100210,6 +111300,8 @@ func main() { - `const ReasoningEffortXhigh ReasoningEffort = "xhigh"` + - `const ReasoningEffortMax ReasoningEffort = "max"` + - `GenerateSummary ReasoningGenerateSummary` **Deprecated:** use `summary` instead. @@ -100224,6 +111316,24 @@ func main() { - `const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"` + - `Mode ReasoningMode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `string` + + - `type ReasoningMode string` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `const ReasoningModeStandard ReasoningMode = "standard"` + + - `const ReasoningModePro ReasoningMode = "pro"` + - `Summary ReasoningSummary` A summary of the reasoning performed by the model. This can be @@ -100530,6 +111640,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `ResponsesClientEventToolChoiceSpecificProgrammaticToolCallingParam` + + - `Type ProgrammaticToolCalling` + + The tool to call. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolChoiceApplyPatch struct{…}` Forces the model to call the apply_patch tool when executing a tool call. @@ -100600,6 +111718,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -100886,6 +112006,8 @@ func main() { - `const ResponseErrorCodeInvalidPrompt ResponseErrorCode = "invalid_prompt"` + - `const ResponseErrorCodeBioPolicy ResponseErrorCode = "bio_policy"` + - `const ResponseErrorCodeVectorStoreTimeout ResponseErrorCode = "vector_store_timeout"` - `const ResponseErrorCodeInvalidImage ResponseErrorCode = "invalid_image"` @@ -100981,6 +112103,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -101011,6 +112143,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -101023,7 +112165,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -101045,6 +112189,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role EasyInputMessageRole` The role of the message input. One of `user`, `assistant`, `system`, or @@ -101992,6 +113146,26 @@ func main() { The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -102039,6 +113213,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImageContent struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -102069,6 +113253,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFileContent struct{…}` A file input to the model. @@ -102081,7 +113275,9 @@ func main() { - `Detail ResponseInputFileContentDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"` - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"` @@ -102103,6 +113299,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Type FunctionCallOutput` The type of the function tool call output. Always `function_call_output`. @@ -102113,6 +113319,30 @@ func main() { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemFunctionCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemFunctionCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemFunctionCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Status string` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -102181,7 +113411,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -102189,6 +113419,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -102197,6 +113435,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -102262,11 +113504,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -102437,6 +113675,14 @@ func main() { - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -102653,6 +113899,22 @@ func main() { - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -102812,6 +114074,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -102952,6 +114222,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -103020,16 +114298,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -103130,6 +114422,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The item type. Always `tool_search_output`. @@ -103204,6 +114504,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -103544,6 +114846,30 @@ func main() { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Environment ResponseInputItemShellCallEnvironmentUnion` The environment to execute the shell commands in. @@ -103620,6 +114946,30 @@ func main() { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `MaxOutputLength int64` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -103714,6 +115064,30 @@ func main() { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseInputItemApplyPatchCallOutput struct{…}` The streamed output emitted by an apply patch tool call. @@ -103740,6 +115114,30 @@ func main() { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Output string` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -103932,6 +115330,30 @@ func main() { The unique ID of the custom tool call output in the OpenAI platform. + - `Caller ResponseCustomToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseCustomToolCall struct{…}` A call to a custom tool created by the model. @@ -103958,6 +115380,26 @@ func main() { The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -103986,6 +115428,58 @@ func main() { - `const ResponseInputItemItemReferenceTypeItemReference ResponseInputItemItemReferenceType = "item_reference"` + - `type ResponseInputItemProgram struct{…}` + + - `ID string` + + The unique ID of this program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The item type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseInputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of this program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output. + + - `const ResponseInputItemProgramOutputStatusCompleted ResponseInputItemProgramOutputStatus = "completed"` + + - `const ResponseInputItemProgramOutputStatusIncomplete ResponseInputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The item type. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `Metadata Metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -104006,6 +115500,12 @@ func main() { - `type ChatModel string` + - `const ChatModelGPT5_6Sol ChatModel = "gpt-5.6-sol"` + + - `const ChatModelGPT5_6Terra ChatModel = "gpt-5.6-terra"` + + - `const ChatModelGPT5_6Luna ChatModel = "gpt-5.6-luna"` + - `const ChatModelGPT5_4 ChatModel = "gpt-5.4"` - `const ChatModelGPT5_4Mini ChatModel = "gpt-5.4-mini"` @@ -104273,6 +115773,30 @@ func main() { - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + - `Caller ResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -104348,6 +115872,58 @@ func main() { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `type ResponseOutputItemProgram struct{…}` + + - `ID string` + + The unique ID of the program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The type of the item. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseOutputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of the program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output item. + + - `const ResponseOutputItemProgramOutputStatusCompleted ResponseOutputItemProgramOutputStatus = "completed"` + + - `const ResponseOutputItemProgramOutputStatusIncomplete ResponseOutputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The type of the item. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `type ResponseToolSearchCall struct{…}` - `ID string` @@ -104452,6 +116028,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -104554,6 +116132,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -104802,6 +116382,26 @@ func main() { - `const ShellCallShellCall ShellCall = "shell_call"` + - `Caller ResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -104882,6 +116482,26 @@ func main() { - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + - `Caller ResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -104966,6 +116586,26 @@ func main() { - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + - `Caller ResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -104996,6 +116636,26 @@ func main() { - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + - `Caller ResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call output. @@ -105329,6 +116989,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `type ResponseToolChoiceSpecificProgrammaticToolCallingParam struct{…}` + + - `Type ProgrammaticToolCalling` + + The tool to call. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolChoiceApplyPatch struct{…}` Forces the model to call the apply_patch tool when executing a tool call. @@ -105399,6 +117067,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -105625,9 +117295,32 @@ func main() { Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `PromptCacheOptions ResponsePromptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode string` + + Whether implicit prompt-cache breakpoints were enabled. + + - `const ResponsePromptCacheOptionsModeImplicit ResponsePromptCacheOptionsMode = "implicit"` + + - `const ResponsePromptCacheOptionsModeExplicit ResponsePromptCacheOptionsMode = "explicit"` + + - `Ttl string` + + The minimum lifetime applied to each cache breakpoint. + + - `const ResponsePromptCacheOptionsTtl30m ResponsePromptCacheOptionsTtl = "30m"` + - `PromptCacheRetention ResponsePromptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -105660,16 +117353,13 @@ func main() { - `Effort ReasoningEffort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + Constrains effort on reasoning for reasoning models. Currently supported + values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. + Reducing reasoning effort can result in faster responses and fewer tokens + used on reasoning in a response. Not all reasoning models support every + value. See the + [reasoning guide](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `const ReasoningEffortNone ReasoningEffort = "none"` @@ -105683,6 +117373,8 @@ func main() { - `const ReasoningEffortXhigh ReasoningEffort = "xhigh"` + - `const ReasoningEffortMax ReasoningEffort = "max"` + - `GenerateSummary ReasoningGenerateSummary` **Deprecated:** use `summary` instead. @@ -105697,6 +117389,24 @@ func main() { - `const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"` + - `Mode ReasoningMode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `string` + + - `type ReasoningMode string` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `const ReasoningModeStandard ReasoningMode = "standard"` + + - `const ReasoningModePro ReasoningMode = "pro"` + - `Summary ReasoningSummary` A summary of the reasoning performed by the model. This can be @@ -105881,6 +117591,10 @@ func main() { A detailed breakdown of the input tokens. + - `CacheWriteTokens int64` + + The number of input tokens that were written to the cache. + - `CachedTokens int64` The number of tokens that were retrieved from the cache. @@ -106283,6 +117997,10 @@ func main() { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `type ResponseOutputItemProgram struct{…}` + + - `type ResponseOutputItemProgramOutput struct{…}` + - `type ResponseToolSearchCall struct{…}` - `type ResponseToolSearchOutputItem struct{…}` @@ -106465,6 +118183,13 @@ func main() { - `const ResponseReasoningSummaryPartDoneResponseReasoningSummaryPartDone ResponseReasoningSummaryPartDone = "response.reasoning_summary_part.done"` + - `Status ResponseReasoningSummaryPartDoneEventStatus` + + The completion status of the summary part. Omitted when the part completed + normally and set to `incomplete` when generation was interrupted. + + - `const ResponseReasoningSummaryPartDoneEventStatusIncomplete ResponseReasoningSummaryPartDoneEventStatus = "incomplete"` + - `type ResponseReasoningSummaryTextDeltaEvent struct{…}` Emitted when a delta is added to a reasoning summary text. @@ -107241,7 +118966,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -107249,6 +118974,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -107257,6 +118990,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -107322,11 +119059,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -107497,6 +119230,14 @@ func main() { - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -107713,6 +119454,22 @@ func main() { - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -107872,6 +119629,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -108012,6 +119777,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -108080,16 +119853,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -108190,6 +119977,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + ### Tool Choice Allowed - `type ToolChoiceAllowed struct{…}` @@ -108516,7 +120311,7 @@ func main() { **get** `/responses/{response_id}/input_items` -Returns a list of input items for a given response. +List input items ### Parameters @@ -108596,6 +120391,16 @@ Returns a list of input items for a given response. - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -108626,6 +120431,16 @@ Returns a list of input items for a given response. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -108638,7 +120453,9 @@ Returns a list of input items for a given response. - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -108660,6 +120477,16 @@ Returns a list of input items for a given response. The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role ResponseInputMessageItemRole` The role of the message input. One of `user`, `system`, or `developer`. @@ -109620,6 +121447,30 @@ Returns a list of input items for a given response. - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + - `Caller ResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -109712,7 +121563,7 @@ Returns a list of input items for a given response. - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -109720,6 +121571,14 @@ Returns a list of input items for a given response. - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -109728,6 +121587,10 @@ Returns a list of input items for a given response. A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -109793,11 +121656,7 @@ Returns a list of input items for a given response. - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -109968,6 +121827,14 @@ Returns a list of input items for a given response. - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -110184,6 +122051,22 @@ Returns a list of input items for a given response. - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -110343,6 +122226,14 @@ Returns a list of input items for a given response. - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -110483,6 +122374,14 @@ Returns a list of input items for a given response. - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -110551,16 +122450,30 @@ Returns a list of input items for a given response. - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -110661,6 +122574,14 @@ Returns a list of input items for a given response. - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The type of the item. Always `tool_search_output`. @@ -110731,6 +122652,8 @@ Returns a list of input items for a given response. A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -110830,6 +122753,58 @@ Returns a list of input items for a given response. - `const ResponseReasoningItemStatusIncomplete ResponseReasoningItemStatus = "incomplete"` + - `type ResponseItemProgram struct{…}` + + - `ID string` + + The unique ID of the program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The type of the item. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of the program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output item. + + - `const ResponseItemProgramOutputStatusCompleted ResponseItemProgramOutputStatus = "completed"` + + - `const ResponseItemProgramOutputStatusIncomplete ResponseItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The type of the item. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `type ResponseCompactionItem struct{…}` A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). @@ -111105,6 +123080,26 @@ Returns a list of input items for a given response. - `const ShellCallShellCall ShellCall = "shell_call"` + - `Caller ResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -111185,6 +123180,26 @@ Returns a list of input items for a given response. - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + - `Caller ResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -111269,6 +123284,26 @@ Returns a list of input items for a given response. - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + - `Caller ResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -111299,6 +123334,26 @@ Returns a list of input items for a given response. - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + - `Caller ResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call output. @@ -111542,7 +123597,10 @@ func main() { "content": [ { "text": "text", - "type": "input_text" + "type": "input_text", + "prompt_cache_breakpoint": { + "mode": "explicit" + } } ], "role": "user", @@ -111594,6 +123652,16 @@ func main() { - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -111624,6 +123692,16 @@ func main() { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -111636,7 +123714,9 @@ func main() { - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -111658,6 +123738,16 @@ func main() { The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role ResponseInputMessageItemRole` The role of the message input. One of `user`, `system`, or `developer`. @@ -112618,6 +124708,30 @@ func main() { - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + - `Caller ResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -112710,7 +124824,7 @@ func main() { - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -112718,6 +124832,14 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -112726,6 +124848,10 @@ func main() { A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -112791,11 +124917,7 @@ func main() { - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -112966,6 +125088,14 @@ func main() { - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -113182,6 +125312,22 @@ func main() { - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -113341,6 +125487,14 @@ func main() { - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -113481,6 +125635,14 @@ func main() { - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -113549,16 +125711,30 @@ func main() { - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -113659,6 +125835,14 @@ func main() { - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The type of the item. Always `tool_search_output`. @@ -113729,6 +125913,8 @@ func main() { A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -113828,6 +126014,58 @@ func main() { - `const ResponseReasoningItemStatusIncomplete ResponseReasoningItemStatus = "incomplete"` + - `type ResponseItemProgram struct{…}` + + - `ID string` + + The unique ID of the program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The type of the item. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of the program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output item. + + - `const ResponseItemProgramOutputStatusCompleted ResponseItemProgramOutputStatus = "completed"` + + - `const ResponseItemProgramOutputStatusIncomplete ResponseItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The type of the item. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `type ResponseCompactionItem struct{…}` A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). @@ -114103,6 +126341,26 @@ func main() { - `const ShellCallShellCall ShellCall = "shell_call"` + - `Caller ResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -114183,6 +126441,26 @@ func main() { - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + - `Caller ResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The identifier of the actor that created the item. @@ -114267,6 +126545,26 @@ func main() { - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + - `Caller ResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call. @@ -114297,6 +126595,26 @@ func main() { - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + - `Caller ResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `CreatedBy string` The ID of the entity that created this tool call output. @@ -114524,9 +126842,7 @@ func main() { **post** `/responses/input_tokens` -Returns input token counts of the request. - -Returns an object with `object` set to `response.input_tokens` and an `input_tokens` count. +Get input token counts ### Parameters @@ -114591,6 +126907,16 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImage struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -114621,6 +126947,16 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFile struct{…}` A file input to the model. @@ -114633,7 +126969,9 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `Detail ResponseInputFileDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"` - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"` @@ -114655,6 +126993,16 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Role EasyInputMessageRole` The role of the message input. One of `user`, `assistant`, `system`, or @@ -115602,6 +127950,26 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The unique ID of the function tool call. + - `Caller ResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the function to run. @@ -115649,6 +128017,16 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `const InputTextInputText InputText = "input_text"` + - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputImageContent struct{…}` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -115679,6 +128057,16 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `type ResponseInputFileContent struct{…}` A file input to the model. @@ -115691,7 +128079,9 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `Detail ResponseInputFileContentDetail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `const ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"` - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"` @@ -115713,6 +128103,16 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The name of the file to be sent to the model. + - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + - `Type FunctionCallOutput` The type of the function tool call output. Always `function_call_output`. @@ -115723,6 +128123,30 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The unique ID of the function tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemFunctionCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemFunctionCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemFunctionCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Status string` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -115791,7 +128215,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `Strict bool` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `Type Function` @@ -115799,6 +128223,14 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"` + + - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function is deferred and loaded via tool search. @@ -115807,6 +128239,10 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok A description of the function. Used by the model to determine whether or not to call the function. + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `type FileSearchTool struct{…}` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -115872,11 +128308,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `bool` - - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion` - - - `string` - - - `float64` + - `type ComparisonFilterValueArray []any` - `type CompoundFilter struct{…}` @@ -116047,6 +128479,14 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `const McpMcp Mcp = "mcp"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"` + + - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"` + - `AllowedTools ToolMcpAllowedToolsUnion` List of allowed tool names or a filter object. @@ -116263,6 +128703,22 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"` + + - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type ToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -116422,6 +128878,14 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `const ShellShell Shell = "shell"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"` + + - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"` + - `Environment FunctionShellToolEnvironmentUnion` - `type ContainerAuto struct{…}` @@ -116562,6 +129026,14 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `const CustomCustom Custom = "custom"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"` + + - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this tool should be deferred and discovered via tool search. @@ -116630,16 +129102,30 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `const FunctionFunction Function = "function"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"` + - `DeferLoading bool` Whether this function should be deferred and discovered via tool search. - `Description string` + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Parameters any` - `Strict bool` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `type CustomTool struct{…}` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -116740,6 +129226,14 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"` + + - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "programmatic"` + - `Type ToolSearchOutput` The item type. Always `tool_search_output`. @@ -116814,6 +129308,8 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models. @@ -117154,6 +129650,30 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The unique ID of the shell tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Environment ResponseInputItemShellCallEnvironmentUnion` The environment to execute the shell commands in. @@ -117230,6 +129750,30 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemShellCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemShellCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemShellCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `MaxOutputLength int64` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -117324,6 +129868,30 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseInputItemApplyPatchCallOutput struct{…}` The streamed output emitted by an apply patch tool call. @@ -117350,6 +129918,30 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Caller ResponseInputItemApplyPatchCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseInputItemApplyPatchCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseInputItemApplyPatchCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `Output string` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -117542,6 +130134,30 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The unique ID of the custom tool call output in the OpenAI platform. + - `Caller ResponseCustomToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + - `type ResponseCustomToolCall struct{…}` A call to a custom tool created by the model. @@ -117568,6 +130184,26 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The unique ID of the custom tool call in the OpenAI platform. + - `Caller ResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type ResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type ResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + - `Namespace string` The namespace of the custom tool being called. @@ -117596,6 +130232,58 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `const ResponseInputItemItemReferenceTypeItemReference ResponseInputItemItemReferenceType = "item_reference"` + - `type ResponseInputItemProgram struct{…}` + + - `ID string` + + The unique ID of this program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The item type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type ResponseInputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of this program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output. + + - `const ResponseInputItemProgramOutputStatusCompleted ResponseInputItemProgramOutputStatus = "completed"` + + - `const ResponseInputItemProgramOutputStatusIncomplete ResponseInputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The item type. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + - `Instructions param.Field[string]` A system (or developer) message inserted into the model's context. @@ -117864,6 +130552,14 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `const CustomCustom Custom = "custom"` + - `type InputTokenCountParamsToolChoiceSpecificProgrammaticToolCallingParam struct{…}` + + - `Type ProgrammaticToolCalling` + + The tool to call. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + - `type ToolChoiceApplyPatch struct{…}` Forces the model to call the apply_patch tool when executing a tool call. @@ -117918,6 +130614,8 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok A tool that runs Python code to help generate a response to a prompt. + - `type ToolProgrammaticToolCalling struct{…}` + - `type ToolImageGeneration struct{…}` A tool that generates images using the GPT image models.