> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dreamto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 创建模型响应

> 创建模型响应。提供 [文本](https://developers.openai.com/api/docs/guides/text) 或 [图像](https://developers.openai.com/api/docs/guides/images-vision) 输入，生成 [文本](https://developers.openai.com/api/docs/guides/text) 或 [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) 输出。可以让模型调用你自己的 [自定义代码](https://developers.openai.com/api/docs/guides/function-calling)，或使用 [网页搜索](https://developers.openai.com/api/docs/guides/tools-web-search)、[文件搜索](https://developers.openai.com/api/docs/guides/tools-file-search) 等内置 [工具](https://developers.openai.com/api/docs/guides/tools)，将你自己的数据作为模型响应的输入。



## OpenAPI

````yaml /openapi/zh/openai-responses.json post /v1/responses
openapi: 3.1.0
info:
  title: OpenAI Responses
  version: v1
  description: 用 OpenAI Responses 协议调用 GPT 模型：文本与图片输入、推理强度、流式事件、函数调用和结构化输出。
servers:
  - url: https://api.dreamto.ai
security:
  - bearerAuth: []
tags:
  - name: Responses
paths:
  /v1/responses:
    post:
      tags:
        - Responses
      summary: 创建模型响应
      description: >-
        创建模型响应。提供 [文本](https://developers.openai.com/api/docs/guides/text) 或
        [图像](https://developers.openai.com/api/docs/guides/images-vision) 输入，生成
        [文本](https://developers.openai.com/api/docs/guides/text) 或
        [JSON](https://developers.openai.com/api/docs/guides/structured-outputs)
        输出。可以让模型调用你自己的
        [自定义代码](https://developers.openai.com/api/docs/guides/function-calling)，或使用
        [网页搜索](https://developers.openai.com/api/docs/guides/tools-web-search)、[文件搜索](https://developers.openai.com/api/docs/guides/tools-file-search)
        等内置
        [工具](https://developers.openai.com/api/docs/guides/tools)，将你自己的数据作为模型响应的输入。
      operationId: createResponse
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateResponse'
            examples:
              基础用法:
                summary: 基础用法
                description: '`input` 可以直接传一段文本。'
                value:
                  model: gpt-6.2-sol
                  input: 用三句话介绍一下量子计算。
              系统指令与多轮对话:
                summary: 系统指令与多轮对话
                description: '`instructions` 相当于系统提示；`input` 传消息数组即可带上历史对话。'
                value:
                  model: gpt-6.2-sol
                  instructions: 你是一个简洁、专业的助手。
                  input:
                    - role: user
                      content: 帮我想一个咖啡店的名字。
                    - role: assistant
                      content: 「晨光咖啡」怎么样？
                    - role: user
                      content: 再给这个名字配一句标语。
              流式输出:
                summary: 流式输出
                description: >-
                  `stream: true` 时返回带事件类型的 SSE，例如 `response.output_text.delta`，以
                  `response.completed` 结束。
                value:
                  model: gpt-6.2-sol
                  stream: true
                  input: 写一首关于秋天的四行诗。
              推理强度:
                summary: 推理强度
                description: '`reasoning.effort` 控制思考深度。'
                value:
                  model: gpt-6.2-astra
                  reasoning:
                    effort: high
                  input: 证明：任意五个整数中，必有三个数之和能被 3 整除。
              图片输入:
                summary: 图片输入
                description: 消息内容里用 `input_image` 传入图片地址或 Base64 Data URL。
                value:
                  model: gpt-6.1-terra
                  input:
                    - role: user
                      content:
                        - type: input_text
                          text: 这张图片里有什么？
                        - type: input_image
                          image_url: https://your-cdn.example.com/photo.jpg
              函数调用:
                summary: 函数调用
                description: >-
                  模型需要外部数据时在 `output` 中返回 `function_call`；执行后用
                  `function_call_output` 把结果传回。
                value:
                  model: gpt-6.2-sol
                  input: 杭州今天天气怎么样？
                  tools:
                    - type: function
                      name: get_weather
                      description: 查询指定城市的实时天气
                      parameters:
                        type: object
                        properties:
                          city:
                            type: string
                            description: 城市名，例如：杭州
                          unit:
                            type: string
                            enum:
                              - celsius
                              - fahrenheit
                        required:
                          - city
              结构化输出:
                summary: 结构化输出
                description: 用 `text.format` 约束模型按 JSON Schema 输出。
                value:
                  model: gpt-6.2-sol
                  input: 从这段话里提取联系人：我是星河科技的李雷，邮箱 lilei@example.com。
                  text:
                    format:
                      type: json_schema
                      name: contact
                      strict: true
                      schema:
                        type: object
                        properties:
                          name:
                            type: string
                          company:
                            type: string
                          email:
                            type: string
                        required:
                          - name
                          - company
                          - email
                        additionalProperties: false
      responses:
        '200':
          description: >-
            非流式请求返回 Response 对象；`stream` 为 `true` 时返回 SSE
            事件流（`text/event-stream`），每个事件都是一个 `ResponseStreamEvent`。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/ResponseStreamEvent'
        '400':
          description: 请求无效：JSON 格式错误、缺少必填字段，或参数不被所选模型支持。按 `message` 修改后重试。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: invalid_request
                      http_status: 400
                      message: Invalid request.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: invalid_request_error
        '401':
          description: API Key 缺失或无效。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: unauthorized
                      http_status: 401
                      message: Unauthorized.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: authentication_error
        '402':
          description: 账户余额不足，充值后重试。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: insufficient_balance
                      http_status: 402
                      message: Insufficient balance.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: insufficient_balance_error
        '403':
          description: 当前 API Key 无权使用该模型。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: forbidden
                      http_status: 403
                      message: Access denied.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: permission_error
        '404':
          description: 模型不存在或尚未开放。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: not_found
                      http_status: 404
                      message: The requested model was not found.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: invalid_request_error
        '429':
          description: 请求频率超过限制，退避后重试。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: rate_limit_exceeded
                      http_status: 429
                      message: Rate limit exceeded. Please try again later.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: rate_limit_error
        '500':
          description: 服务内部错误，稍后重试。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: api_error
                      http_status: 500
                      message: Internal server error.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: api_error
        '503':
          description: 服务暂时不可用或处理超时，稍后重试。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              examples:
                example:
                  value:
                    error:
                      code: service_unavailable
                      http_status: 503
                      message: Service temporarily unavailable. Please try again later.
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                      type: api_error
components:
  schemas:
    CreateResponse:
      allOf:
        - $ref: '#/components/schemas/CreateModelResponseProperties'
        - $ref: '#/components/schemas/ResponseProperties'
        - type: object
          properties:
            access_programs:
              $ref: '#/components/schemas/AccessProgramsParam'
            image:
              $ref: '#/components/schemas/ImageOptionsParam'
            prompt_cache_options:
              $ref: '#/components/schemas/ResponsePromptCacheOptionsParam'
            service_tier:
              $ref: '#/components/schemas/ServiceTierResponses'
            truncation:
              deprecated: true
              anyOf:
                - type: string
                  description: >-
                    模型响应所用的截断策略。

                    - `auto`：如果此 Response
                    的输入超出模型的上下文窗口大小，模型将从对话开头丢弃项，以截断响应使其适应上下文窗口。在某些模型上，截断可能更早开始，因为
                    API 会从输入上限中减去模型的最大输出额度，即使设置了更低的 `max_output_tokens` 也是如此。

                    - `disabled`（默认）：如果输入大小将超出模型的上下文窗口大小，请求将失败并返回 400 错误。
                  enum:
                    - auto
                    - disabled
                  default: disabled
                - type: 'null'
            reasoning:
              anyOf:
                - $ref: '#/components/schemas/Reasoning'
                - type: 'null'
            input:
              $ref: '#/components/schemas/InputParam'
            include:
              anyOf:
                - type: array
                  description: >-
                    指定要在模型响应中包含的额外输出数据。目前支持的值有：

                    - `web_search_call.action.sources`：包含网页搜索工具调用的来源。

                    - `code_interpreter_call.outputs`：在代码解释器工具调用项中包含 Python
                    代码执行的输出。

                    - `computer_call_output.output.image_url`：包含计算机调用输出中的图像 URL。

                    - `file_search_call.results`：包含文件搜索工具调用的搜索结果。

                    - `message.input_image.image_url`：包含输入消息中的图像 URL。

                    - `message.output_text.logprobs`：在助手消息中包含对数概率。

                    - `reasoning.encrypted_content`：在推理项输出中包含推理 Token
                    的加密版本。这样在无状态使用 Responses API 时（例如 `store` 参数设为
                    `false`，或组织已加入零数据保留计划时），推理项也可用于多轮对话。
                  items:
                    $ref: '#/components/schemas/IncludeEnum'
                - type: 'null'
            parallel_tool_calls:
              anyOf:
                - type: boolean
                  description: 是否允许模型并行执行工具调用。
                  default: true
                - type: 'null'
            store:
              anyOf:
                - type: boolean
                  description: >-
                    是否存储生成的模型响应，以便之后通过 API 检索。省略时默认为 true。设为 true 时，响应数据将至少存储 30
                    天，但需遵守
                    [数据保留例外情况](https://developers.openai.com/api/docs/guides/your-data#v1responses)。
                  default: true
                - type: 'null'
            instructions:
              anyOf:
                - type: string
                  description: >-
                    插入模型上下文中的系统（或开发者）消息。


                    与 `previous_response_id`
                    一起使用时，上一个响应的指令不会延续到下一个响应。这样可以方便地在新响应中替换系统（或开发者）消息。
                - type: 'null'
            moderation:
              anyOf:
                - $ref: '#/components/schemas/ModerationParam'
                  description: 对此响应的输入和输出执行内容审核的配置。
                - type: 'null'
            stream:
              anyOf:
                - description: >-
                    设为 true 时，模型响应数据将在生成过程中通过
                    [服务器发送事件（SSE）](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)
                    流式传输给客户端。更多信息请参阅
                    [下文的流式部分](https://developers.openai.com/api/reference/resources/responses/streaming-events)。
                  type: boolean
                  default: false
                - type: 'null'
            stream_options:
              $ref: '#/components/schemas/ResponseStreamOptions'
            conversation:
              anyOf:
                - $ref: '#/components/schemas/ConversationParam'
                - type: 'null'
            context_management:
              anyOf:
                - type: array
                  example:
                    - type: compaction
                      compact_threshold: 1000
                  description: 此请求的上下文管理配置。
                  minItems: 1
                  items:
                    $ref: '#/components/schemas/ContextManagementParam'
                - type: 'null'
            max_output_tokens:
              anyOf:
                - description: >-
                    响应可生成的 Token 数上限，包括可见的输出 Token 和 [推理
                    Token](https://developers.openai.com/api/docs/guides/reasoning)。
                  type: integer
                  minimum: 16
                - type: 'null'
    Response:
      title: 响应对象
      allOf:
        - $ref: '#/components/schemas/ModelResponseProperties'
        - $ref: '#/components/schemas/ResponseProperties'
        - type: object
          properties:
            image:
              $ref: '#/components/schemas/ResolvedImageOptions'
            service_tier:
              $ref: '#/components/schemas/ServiceTierResponses'
            truncation:
              anyOf:
                - type: string
                  description: >-
                    模型响应所用的截断策略。

                    - `auto`：如果此 Response
                    的输入超出模型的上下文窗口大小，模型将从对话开头丢弃项，以截断响应使其适应上下文窗口。在某些模型上，截断可能更早开始，因为
                    API 会从输入上限中减去模型的最大输出额度，即使设置了更低的 `max_output_tokens` 也是如此。

                    - `disabled`（默认）：如果输入大小将超出模型的上下文窗口大小，请求将失败并返回 400 错误。
                  enum:
                    - auto
                    - disabled
                  default: disabled
                - type: 'null'
            id:
              type: string
              description: 此 Response 的唯一标识符。
            object:
              type: string
              description: 此资源的对象类型，始终设为 `response`。
              const: response
            status:
              type: string
              description: >-
                响应生成的状态。可选值为
                `completed`、`failed`、`in_progress`、`cancelled`、`queued` 或
                `incomplete`。
              enum:
                - completed
                - failed
                - in_progress
                - cancelled
                - queued
                - incomplete
            access_programs:
              anyOf:
                - $ref: '#/components/schemas/AccessProgramsBody'
                - type: 'null'
            created_at:
              type: number
              format: unixtime
              description: 此 Response 的创建时间，以 Unix 时间戳（秒）表示。
            completed_at:
              anyOf:
                - type: number
                  format: unixtime
                  description: 此 Response 的完成时间，以 Unix 时间戳（秒）表示。仅在状态为 `completed` 时出现。
                - type: 'null'
            error:
              $ref: '#/components/schemas/ResponseError'
            incomplete_details:
              anyOf:
                - type: object
                  description: 响应未完成的原因详情。
                  properties:
                    reason:
                      type: string
                      description: >-
                        响应未完成的原因。`steered` 表示响应在收到 WebSocket `response.steer`
                        事件后于安全的输出边界处停止。随后服务器可以使用排队的输入自动创建后续响应。
                      enum:
                        - max_output_tokens
                        - max_messages
                        - content_filter
                        - steered
                - type: 'null'
            input_transformations:
              type: array
              description: 未提供给模型的推理输入，按输入顺序排列。
              items:
                $ref: '#/components/schemas/ReasoningInputTransformation'
            output:
              type: array
              description: >-
                模型生成的内容项数组。


                - `output` 数组中项的数量和顺序取决于模型的响应。

                - 与其访问 `output` 数组中的第一项并假定它是包含模型生成内容的 `assistant` 消息，不如在 SDK
                支持时使用 `output_text` 属性。
              items:
                $ref: '#/components/schemas/OutputItem'
            reasoning:
              anyOf:
                - $ref: '#/components/schemas/Reasoning'
                - type: 'null'
            instructions:
              anyOf:
                - description: >-
                    插入模型上下文中的系统（或开发者）消息。


                    与 `previous_response_id`
                    一起使用时，上一个响应的指令不会延续到下一个响应。这样可以方便地在新响应中替换系统（或开发者）消息。
                  oneOf:
                    - type: string
                      description: 输入模型的文本，等同于 `developer` 角色的文本输入。
                    - type: array
                      title: 输入项列表
                      description: 输入模型的一个或多个输入项的列表，包含不同的内容类型。
                      items:
                        $ref: '#/components/schemas/InputItem'
                - type: 'null'
            output_text:
              anyOf:
                - type: string
                  description: >-
                    仅限 SDK 的便捷属性，包含 `output` 数组中所有 `output_text`
                    项（如有）聚合后的文本输出。Python 和 JavaScript SDK 支持。
                - type: 'null'
            usage:
              anyOf:
                - $ref: '#/components/schemas/ResponseUsage'
                - type: 'null'
            tool_usage:
              $ref: '#/components/schemas/ResponseToolUsage'
              description: >-
                托管工具报告的用量，独立于基础模型的 `usage`。工具用量不可用时可省略该字段。出现时，没有记录用量的工具系列计数为零。


                `image_gen` 汇总各次图像生成调用中可用的 Token 计数。用量记录缺失或不完整的调用可能被跳过。输出 Token
                明细和缓存输入计数可能被省略。缓存计数被省略表示缓存用量未知。


                `web_search.num_requests`
                统计计费的搜索次数，不包括折扣搜索以及打开页面等操作。请以账单记录核对最终费用。
            prompt_cache_options:
              $ref: '#/components/schemas/PromptCacheOptions'
            prompt_cache_diagnostics:
              $ref: '#/components/schemas/PromptCacheDiagnostics'
            moderation:
              anyOf:
                - $ref: '#/components/schemas/Moderation'
                  description: 如果请求了经内容审核的补全，则为针对响应输入和输出的内容审核结果。
                - type: 'null'
            parallel_tool_calls:
              type: boolean
              description: 是否允许模型并行执行工具调用。
              default: true
            conversation:
              anyOf:
                - $ref: '#/components/schemas/ResponseConversation'
                  default: null
                - type: 'null'
            max_output_tokens:
              anyOf:
                - description: >-
                    响应可生成的 Token 数上限，包括可见的输出 Token 和 [推理
                    Token](https://developers.openai.com/api/docs/guides/reasoning)。
                  type: integer
                - type: 'null'
          required:
            - access_programs
            - id
            - object
            - created_at
            - error
            - incomplete_details
            - instructions
            - model
            - tools
            - output
            - parallel_tool_calls
            - metadata
            - tool_choice
            - temperature
            - top_p
      example:
        id: resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41
        object: response
        access_programs: null
        created_at: 1741476777
        status: completed
        completed_at: 1741476778
        error: null
        incomplete_details: null
        instructions: null
        max_output_tokens: null
        model: gpt-6.2-astra
        output:
          - type: message
            id: msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41
            status: completed
            role: assistant
            content:
              - type: output_text
                text: >-
                  The image depicts a scenic landscape with a wooden boardwalk
                  or pathway leading through lush, green grass under a blue sky
                  with some clouds. The setting suggests a peaceful natural
                  area, possibly a park or nature reserve. There are trees and
                  shrubs in the background.
                annotations: []
                logprobs: []
        parallel_tool_calls: true
        previous_response_id: null
        reasoning:
          effort: null
          summary: null
          context: null
        store: true
        temperature: 1
        text:
          format:
            type: text
        tool_choice: auto
        tools: []
        top_p: 1
        truncation: disabled
        usage:
          input_tokens: 328
          input_tokens_details:
            cached_tokens: 0
            cache_write_tokens: 0
          output_tokens: 52
          output_tokens_details:
            reasoning_tokens: 0
          total_tokens: 380
        tool_usage:
          image_gen:
            input_tokens: 0
            input_tokens_details:
              text_tokens: 0
              image_tokens: 0
            output_tokens: 0
            output_tokens_details:
              text_tokens: 0
              image_tokens: 0
            total_tokens: 0
          web_search:
            num_requests: 0
        user: null
        metadata: {}
    ResponseStreamEvent:
      description: 流式传输响应时触发的事件。
      anyOf:
        - $ref: '#/components/schemas/ResponseAudioDeltaEvent'
        - $ref: '#/components/schemas/ResponseAudioDoneEvent'
        - $ref: '#/components/schemas/ResponseAudioTranscriptDeltaEvent'
        - $ref: '#/components/schemas/ResponseAudioTranscriptDoneEvent'
        - $ref: '#/components/schemas/ResponseCodeInterpreterCallCodeDeltaEvent'
        - $ref: '#/components/schemas/ResponseCodeInterpreterCallCodeDoneEvent'
        - $ref: '#/components/schemas/ResponseCodeInterpreterCallCompletedEvent'
        - $ref: '#/components/schemas/ResponseCodeInterpreterCallInProgressEvent'
        - $ref: '#/components/schemas/ResponseCodeInterpreterCallInterpretingEvent'
        - $ref: '#/components/schemas/ResponseCompactionCompactingStreamingEvent'
        - $ref: '#/components/schemas/ResponseCompletedEvent'
        - $ref: '#/components/schemas/ResponseContentPartAddedEvent'
        - $ref: '#/components/schemas/ResponseContentPartDoneEvent'
        - $ref: '#/components/schemas/ResponseCreatedEvent'
        - $ref: '#/components/schemas/ResponseErrorEvent'
        - $ref: '#/components/schemas/ResponseFileSearchCallCompletedEvent'
        - $ref: '#/components/schemas/ResponseFileSearchCallInProgressEvent'
        - $ref: '#/components/schemas/ResponseFileSearchCallSearchingEvent'
        - $ref: '#/components/schemas/ResponseFunctionCallArgumentsDeltaEvent'
        - $ref: '#/components/schemas/ResponseFunctionCallArgumentsDoneEvent'
        - $ref: '#/components/schemas/ResponseShellCallCommandAddedStreamingEvent'
        - $ref: '#/components/schemas/ResponseShellCallCommandDeltaStreamingEvent'
        - $ref: '#/components/schemas/ResponseShellCallCommandDoneStreamingEvent'
        - $ref: >-
            #/components/schemas/ResponseShellCallOutputContentDeltaStreamingEvent
        - $ref: >-
            #/components/schemas/ResponseShellCallOutputContentDoneStreamingEvent
        - $ref: '#/components/schemas/ResponseInProgressEvent'
        - $ref: '#/components/schemas/ResponseFailedEvent'
        - $ref: '#/components/schemas/ResponseIncompleteEvent'
        - $ref: '#/components/schemas/ResponseOutputItemAddedEvent'
        - $ref: '#/components/schemas/ResponseOutputItemDoneEvent'
        - $ref: '#/components/schemas/ResponseReasoningSummaryPartAddedEvent'
        - $ref: '#/components/schemas/ResponseReasoningSummaryPartDoneEvent'
        - $ref: '#/components/schemas/ResponseReasoningSummaryTextDeltaEvent'
        - $ref: '#/components/schemas/ResponseReasoningSummaryTextDoneEvent'
        - $ref: '#/components/schemas/ResponseReasoningTextDeltaEvent'
        - $ref: '#/components/schemas/ResponseReasoningTextDoneEvent'
        - $ref: '#/components/schemas/ResponseRefusalDeltaEvent'
        - $ref: '#/components/schemas/ResponseRefusalDoneEvent'
        - $ref: '#/components/schemas/ResponseTextDeltaEvent'
        - $ref: '#/components/schemas/ResponseTextDoneEvent'
        - $ref: '#/components/schemas/ResponseWebSearchCallCompletedEvent'
        - $ref: '#/components/schemas/ResponseWebSearchCallInProgressEvent'
        - $ref: '#/components/schemas/ResponseWebSearchCallSearchingEvent'
        - $ref: '#/components/schemas/ResponseImageGenCallCompletedEvent'
        - $ref: '#/components/schemas/ResponseImageGenCallGeneratingEvent'
        - $ref: '#/components/schemas/ResponseImageGenCallInProgressEvent'
        - $ref: '#/components/schemas/ResponseImageGenCallPartialImageEvent'
        - $ref: '#/components/schemas/ResponseMCPCallArgumentsDeltaEvent'
        - $ref: '#/components/schemas/ResponseMCPCallArgumentsDoneEvent'
        - $ref: '#/components/schemas/ResponseMCPCallCompletedEvent'
        - $ref: '#/components/schemas/ResponseMCPCallFailedEvent'
        - $ref: '#/components/schemas/ResponseMCPCallInProgressEvent'
        - $ref: '#/components/schemas/ResponseMCPListToolsCompletedEvent'
        - $ref: '#/components/schemas/ResponseMCPListToolsFailedEvent'
        - $ref: '#/components/schemas/ResponseMCPListToolsInProgressEvent'
        - $ref: '#/components/schemas/ResponseOutputTextAnnotationAddedEvent'
        - $ref: '#/components/schemas/ResponseQueuedEvent'
        - $ref: '#/components/schemas/ResponseCustomToolCallInputDeltaEvent'
        - $ref: '#/components/schemas/ResponseCustomToolCallInputDoneEvent'
      discriminator:
        propertyName: type
    GatewayError:
      type: object
      description: 错误响应。
      properties:
        error:
          type: object
          description: 错误信息。
          properties:
            code:
              type: string
              description: >-
                错误码，例如
                `invalid_request`、`unauthorized`、`insufficient_balance`、`rate_limit_exceeded`。个别由模型侧直接返回的参数错误里，这里是数字形式的状态码。
            http_status:
              type: integer
              description: 与响应的 HTTP 状态码相同；个别由模型侧直接返回的错误不带这个字段。
            message:
              type: string
              description: 错误描述（英文）。程序逻辑请依据状态码和 `code` 判断，不要依赖这段文字。
            request_id:
              type: string
              description: 本次请求的 ID，与响应头 `X-Request-Id` 相同，反馈问题时请提供；个别错误不带这个字段，请以响应头为准。
            type:
              type: string
              description: >-
                错误大类，例如
                `invalid_request_error`、`authentication_error`、`rate_limit_error`、`api_error`；个别错误不带这个字段。
          required:
            - code
            - message
      required:
        - error
    CreateModelResponseProperties:
      allOf:
        - $ref: '#/components/schemas/ModelResponseProperties'
        - type: object
          properties:
            top_logprobs:
              description: >-
                0 到 20 之间的整数，指定在每个 Token 位置返回的最可能 Token 的最大数量，每个 Token
                都附带对数概率。某些情况下，返回的 Token 数可能少于请求的数量。
              type: integer
              minimum: 0
              maximum: 20
    ResponseProperties:
      type: object
      properties:
        previous_response_id:
          anyOf:
            - type: string
              description: >-
                模型上一个响应的唯一 ID。用于创建多轮对话。详见
                [对话状态](https://developers.openai.com/api/docs/guides/conversation-state)。不能与
                `conversation` 同时使用。
            - type: 'null'
        model:
          type: string
          description: 要使用的模型 ID，例如 `gpt-6.2-sol`。可用模型见[模型介绍](/llm/openai-responses)。
          example: gpt-6.2-sol
        background:
          anyOf:
            - type: boolean
              description: >-
                是否在后台运行模型响应。[了解更多](https://developers.openai.com/api/docs/guides/background)。
              default: false
            - type: 'null'
        max_tool_calls:
          anyOf:
            - description: >-
                一个响应中可处理的内置工具调用总次数上限。该上限适用于所有内置工具调用的总和，而不是针对单个工具。模型之后再尝试调用工具都将被忽略。
              type: integer
            - type: 'null'
        text:
          $ref: '#/components/schemas/ResponseTextParam'
        tools:
          $ref: '#/components/schemas/ToolsArray'
        tool_choice:
          $ref: '#/components/schemas/ToolChoiceParam'
        prompt:
          $ref: '#/components/schemas/Prompt'
    AccessProgramsParam:
      properties:
        cyber:
          $ref: '#/components/schemas/CyberAccessProgramEnum'
          description: >-
            本次请求使用的 Cyber 访问计划。支持的值为 `standard`、`daybreak_blue` 和
            `daybreak_red`。省略时，API 会根据模型的 Cyber
            等级以及你的组织和项目访问权限确定计划，并受模型特定的资格限制约束。默认情况下，没有 Cyber 等级的模型使用
            Standard。Blue 等级模型在获得授权时使用 Daybreak Blue，否则回退为 Standard，除非该模型要求
            Daybreak 访问权限。Red 等级模型使用 Daybreak Red，且需要授权。需要 Daybreak
            访问权限但不可用的请求会返回 403。隐式回退到 Standard 时，响应的 access_programs 字段中以 null
            表示，而非显式的 Standard 选择。
      additionalProperties: false
      type: object
      required: []
      description: 本次请求使用的特定领域访问计划。
    ImageOptionsParam:
      properties:
        context_compression:
          $ref: '#/components/schemas/ImageContextCompression'
          description: >-
            控制图片上下文优化。默认为 `auto`，即根据模型、传输方式和输入选择策略。使用 `enabled` 要求支持压缩，或使用
            `disabled` 关闭该功能。
      additionalProperties: false
      type: object
      required: []
      description: 请求级别的图片选项。
    ResponsePromptCacheOptionsParam:
      properties:
        ttl:
          type: string
          enum:
            - 30m
            - 12h
          description: >-
            应用于本次请求写入的每个隐式和显式缓存断点的最短存活时间。支持的值为 `30m`（默认）和
            `12h`。后端可能会将缓存条目保留更长时间。
        mode:
          $ref: '#/components/schemas/PromptCacheModeEnum'
          description: >-
            控制 OpenAI 是否自动创建隐式缓存断点。默认为 `implicit`。使用 `implicit` 时，OpenAI
            会创建一个隐式断点，并写入请求中最近的最多三个显式断点。使用 `explicit` 时，OpenAI
            不创建隐式断点，并写入最近的最多四个显式断点。如果没有显式断点，请求将不使用提示缓存。
        prewarm:
          type: boolean
          description: 预热提示缓存而不生成输出。默认为 `false`。设为 `true` 时，会将 `generate` 字段覆盖为 `false`。
        comparison_response_id:
          anyOf:
            - type: string
              description: 诊断提示缓存复用情况时用于对比的响应 ID。在该功能启用时，提供此字段即表示请求提示缓存诊断。
              example: resp_123
            - type: 'null'
      type: object
      required: []
      title: 提示缓存选项
      description: >-
        提示缓存的选项。`gpt-5.6` 及更新的模型支持。默认情况下，OpenAI 会自动选择一个隐式缓存断点。可以通过
        `prompt_cache_breakpoint` 为内容块添加显式断点。每个请求最多可写入四个断点。进行缓存匹配时，OpenAI
        最多考虑对话中最近的 80 个断点，不限制内容块的回溯范围。将 `mode` 设为 `explicit` 可禁用隐式断点。`ttl` 默认为
        `30m`。支持的生命周期取决于所用 API。最新详情请参阅
        [提示缓存指南](https://developers.openai.com/api/docs/guides/prompt-caching)。
    ServiceTierResponses:
      anyOf:
        - type: string
          description: |-
            指定处理该请求所使用的服务类型。
              - 设为 'auto' 时，请求将使用项目设置中配置的服务层级处理。除非另行配置，项目默认使用 'default'。
              - 设为 'default' 时，请求将按所选模型的标准价格和性能处理。
              - 设为 '[flex](https://developers.openai.com/api/docs/guides/flex-processing)' 时，请求将使用 Flex Processing 服务层级处理。
              - 如需在请求级别启用 [Fast 模式](https://developers.openai.com/api/docs/guides/fast-mode)，可在 Responses 或 Chat Completions 请求中传入 `service_tier=fast` 或 `service_tier=priority` 参数。无论请求中指定的是 `service_tier=fast` 还是 `priority`，响应中都会显示 `service_tier=priority`。
              - 设为 'ultrafast' 时，请求将使用受访问控制的 Ultrafast Processing 服务层级处理。该层级目前适用于 `gpt-5.6-sol`；通过该层级处理的响应会显示 `service_tier=ultrafast`。
              - 未设置时，默认行为为 'auto'。

              设置了 `service_tier` 参数时，响应体中会包含 `service_tier` 值，该值取决于实际处理请求所用的处理模式，可能与参数中设置的值不同。
          enum:
            - auto
            - default
            - flex
            - scale
            - priority
            - fast
            - ultrafast
          default: auto
        - type: 'null'
    Reasoning:
      type: object
      description: '[推理模型](https://developers.openai.com/api/docs/guides/reasoning) 的配置选项。'
      title: 推理
      properties:
        mode:
          $ref: '#/components/schemas/ReasoningModeEnum'
          description: |-
            控制请求的推理执行模式。

            在响应中返回时，表示实际生效的执行模式。
        effort:
          $ref: '#/components/schemas/ReasoningEffort'
        summary:
          anyOf:
            - type: string
              description: |-
                模型所执行推理的摘要。有助于调试和理解模型的推理过程。可选值为 `auto`、`concise` 或 `detailed`。

                `computer-use-preview` 模型以及 `gpt-5` 之后的所有推理模型支持 `concise`。
              enum:
                - auto
                - concise
                - detailed
            - type: 'null'
        context:
          anyOf:
            - type: string
              description: >-
                控制在后续轮次中将哪些推理项回传给模型。如果省略或设为 `auto`，由模型决定上下文模式。`gpt-5.6` 模型系列默认为
                `all_turns`；更早的模型默认为 `current_turn`。


                在响应中返回时，表示该响应实际使用的推理上下文模式。
              enum:
                - auto
                - current_turn
                - all_turns
            - type: 'null'
        generate_summary:
          anyOf:
            - type: string
              deprecated: true
              description: |-
                **已弃用：** 请改用 `summary`。

                模型所执行推理的摘要。有助于调试和理解模型的推理过程。可选值为 `auto`、`concise` 或 `detailed`。
              enum:
                - auto
                - concise
                - detailed
            - type: 'null'
    InputParam:
      description: >-
        输入模型的文本、图像或文件，用于生成响应。


        了解更多：

        - [文本输入和输出](https://developers.openai.com/api/docs/guides/text)

        - [图像输入](https://developers.openai.com/api/docs/guides/images-vision)

        - [文件输入](https://developers.openai.com/api/docs/guides/file-inputs)

        -
        [对话状态](https://developers.openai.com/api/docs/guides/conversation-state)

        - [函数调用](https://developers.openai.com/api/docs/guides/function-calling)
      oneOf:
        - type: string
          title: 文本输入
          description: 输入模型的文本，等同于 `user` 角色的文本输入。
        - type: array
          title: 输入项列表
          description: 输入模型的一个或多个输入项的列表，包含不同的内容类型。
          items:
            $ref: '#/components/schemas/InputItem'
    IncludeEnum:
      type: string
      enum:
        - file_search_call.results
        - web_search_call.results
        - web_search_call.action.sources
        - message.input_image.image_url
        - computer_call_output.output.image_url
        - code_interpreter_call.outputs
        - reasoning.encrypted_content
        - message.output_text.logprobs
      description: >-
        指定要在模型响应中包含的额外输出数据。目前支持的值有：

        - `web_search_call.results`：包含网页搜索工具调用的搜索结果。

        - `web_search_call.action.sources`：包含网页搜索工具调用的来源。

        - `code_interpreter_call.outputs`：在代码解释器工具调用项中包含 Python 代码执行的输出。

        - `computer_call_output.output.image_url`：包含计算机调用输出中的图片 URL。

        - `file_search_call.results`：包含文件搜索工具调用的搜索结果。

        - `message.input_image.image_url`：包含输入消息中的图片 URL。

        - `message.output_text.logprobs`：在助手消息中包含对数概率。

        - `reasoning.encrypted_content`：在推理项输出中包含推理 Token 的加密版本。这样在无状态使用
        Responses API 时（例如 `store` 参数设为 `false`，或组织已加入零数据保留计划时），推理项也可用于多轮对话。
    ModerationParam:
      properties:
        model:
          type: string
          description: 用于经内容审核补全的内容审核模型，例如 'omni-moderation-latest'。
        policy:
          anyOf:
            - $ref: '#/components/schemas/ModerationPolicyParam'
              description: 应用于经内容审核的响应输入和输出的策略。
            - type: 'null'
      type: object
      required:
        - model
      description: 对此响应的输入和输出执行内容审核的配置。
    ResponseStreamOptions:
      anyOf:
        - description: '流式响应的选项。仅在设置了 `stream: true` 时设置此项。'
          type: object
          properties:
            include_obfuscation:
              type: boolean
              description: >-
                为 true 时启用流混淆。流混淆会在流式增量事件的 `obfuscation`
                字段中添加随机字符，使负载大小趋于一致，以缓解某些侧信道攻击。这些混淆字段默认包含，但会给数据流带来少量额外开销。如果信任应用与
                OpenAI API 之间的网络链路，可将 `include_obfuscation` 设为 false 以节省带宽。
        - type: 'null'
    ConversationParam:
      description: 此响应所属的对话。该对话中的项会被添加到此响应请求的 `input_items` 之前。此响应完成后，其输入项和输出项会自动添加到该对话中。
      default: null
      oneOf:
        - type: string
          title: 对话 ID
          description: 对话的唯一 ID。
        - $ref: '#/components/schemas/ConversationParam-2'
    ContextManagementParam:
      properties:
        type:
          type: string
          description: 上下文管理条目类型。目前仅支持 'compaction'。
        compact_threshold:
          anyOf:
            - type: integer
              minimum: 1000
              description: 该条目触发压缩的 Token 阈值。
            - type: 'null'
      type: object
      required:
        - type
    ModelResponseProperties:
      type: object
      properties:
        metadata:
          $ref: '#/components/schemas/Metadata'
        top_logprobs:
          anyOf:
            - description: >-
                0 到 20 之间的整数，指定在每个 Token 位置返回的最可能 Token 的最大数量，每个 Token
                都附带对数概率。某些情况下，返回的 Token 数可能少于请求的数量。
              type: integer
              minimum: 0
              maximum: 20
            - type: 'null'
        temperature:
          anyOf:
            - type: number
              minimum: 0
              maximum: 2
              default: 1
              example: 1
              description: >-
                使用的采样温度，取值范围为 0 到 2。较高的值（如 0.8）会使输出更随机，较低的值（如
                0.2）会使输出更集中、更确定。通常建议只调整此参数或 `top_p` 其中之一，不要同时调整。
            - type: 'null'
        top_p:
          anyOf:
            - type: number
              minimum: 0
              maximum: 1
              default: 1
              example: 1
              description: >-
                温度采样的替代方法，称为核采样：模型只考虑累计概率质量达到 top_p 的 Token 结果。因此 0.1 表示只考虑构成前
                10% 概率质量的 Token。


                通常建议只调整此参数或 `temperature` 其中之一，不要同时调整。
            - type: 'null'
        user:
          type:
            - string
            - 'null'
          example: user-1234
          deprecated: true
          description: >-
            此字段正在被 `safety_identifier` 和 `prompt_cache_key` 取代。请改用
            `prompt_cache_key` 以保持缓存优化。终端用户的稳定标识符。用于更好地对相似请求进行分桶以提高缓存命中率，并帮助
            OpenAI
            检测和防止滥用。[了解更多](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers)。
        safety_identifier:
          anyOf:
            - type: string
              maxLength: 128
              example: safety-identifier-1234
              description: >-
                稳定标识符，用于帮助检测应用中可能违反 OpenAI 使用政策的用户。ID 应为唯一标识每个用户的字符串，最大长度为 128
                个字符。建议对用户名或电子邮件地址进行哈希处理，以避免向我们发送任何身份识别信息。[了解更多](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers)。
            - type: 'null'
        prompt_cache_key:
          anyOf:
            - type: string
              example: prompt-cache-key-1234
              description: >-
                OpenAI 用于缓存相似请求的响应，以优化缓存命中率。取代 `user`
                字段。[了解更多](https://developers.openai.com/api/docs/guides/prompt-caching)。
            - type: 'null'
        prompt_cache_retention:
          deprecated: true
          anyOf:
            - type: string
              enum:
                - in_memory
                - 24h
              description: >-
                已弃用。请改用 `prompt_cache_options.ttl`。


                提示缓存的保留策略。设为 `24h` 可启用扩展提示缓存，使缓存的前缀保持活跃更长时间，最长 24
                小时。[了解更多](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention)。此字段表示最长保留策略，而
                `prompt_cache_options.ttl` 表示最短缓存生命周期。这两个字段相互独立，互不影响。对于
                `gpt-5.5`、`gpt-5.5-pro` 及未来的模型，仅支持 `24h`。


                对于同时支持 `in_memory` 和 `24h` 的较旧模型，默认值取决于组织的数据保留策略：
                  - 未启用 ZDR 的组织默认为 `24h`。
                  - 已启用 ZDR 的组织在未指定 `prompt_cache_retention` 时默认为 `in_memory`。
            - type: 'null'
    ResolvedImageOptions:
      properties:
        context_compression:
          $ref: '#/components/schemas/ResolvedImageContextCompressionEnum'
          description: 实际生效的图片上下文优化策略。
      type: object
      required:
        - context_compression
    AccessProgramsBody:
      properties:
        cyber:
          $ref: '#/components/schemas/CyberAccessProgramEnum'
          description: 该响应实际使用的 Cyber 访问计划。
      type: object
      required:
        - cyber
    ResponseError:
      anyOf:
        - type: object
          description: 模型未能生成 Response 时返回的错误对象。
          properties:
            type:
              anyOf:
                - type: string
                - type: 'null'
              description: 原始错误类型；如未记录则为 null。
            param:
              anyOf:
                - type: string
                - type: 'null'
              description: 与错误关联的请求参数；如未记录则为 null。
            code:
              $ref: '#/components/schemas/ResponseErrorCode'
            message:
              type: string
              description: 人类可读的错误描述。
            misalignment:
              $ref: '#/components/schemas/MisalignmentErrorDetailsResource'
          required:
            - code
            - message
        - type: 'null'
    ReasoningInputTransformation:
      properties:
        type:
          type: string
          enum:
            - reasoning
          default: reasoning
        id:
          type: string
          description: 原始推理项 ID。
        action:
          type: string
          enum:
            - removed
          default: removed
        reason:
          $ref: '#/components/schemas/InputRemovalReason'
      type: object
      required:
        - type
        - id
        - action
        - reason
    OutputItem:
      oneOf:
        - $ref: '#/components/schemas/OutputMessage'
        - $ref: '#/components/schemas/FileSearchToolCall'
        - $ref: '#/components/schemas/FunctionToolCall'
        - $ref: '#/components/schemas/FunctionToolCallOutputResource'
        - $ref: '#/components/schemas/WebSearchToolCall'
        - $ref: '#/components/schemas/ComputerToolCall'
        - $ref: '#/components/schemas/ComputerToolCallOutputResource'
        - $ref: '#/components/schemas/ReasoningItem'
        - $ref: '#/components/schemas/Program'
        - $ref: '#/components/schemas/ProgramOutput'
        - $ref: '#/components/schemas/ToolSearchCall'
        - $ref: '#/components/schemas/ToolSearchOutput'
        - $ref: '#/components/schemas/AdditionalTools'
        - $ref: '#/components/schemas/CompactionBody'
        - $ref: '#/components/schemas/ImageGenToolCall'
        - $ref: '#/components/schemas/CodeInterpreterToolCall'
        - $ref: '#/components/schemas/LocalShellToolCall'
        - $ref: '#/components/schemas/LocalShellToolCallOutput'
        - $ref: '#/components/schemas/FunctionShellCall'
        - $ref: '#/components/schemas/FunctionShellCallOutput'
        - $ref: '#/components/schemas/ApplyPatchToolCall'
        - $ref: '#/components/schemas/ApplyPatchToolCallOutput'
        - $ref: '#/components/schemas/MCPToolCall'
        - $ref: '#/components/schemas/MCPListTools'
        - $ref: '#/components/schemas/MCPApprovalRequest'
        - $ref: '#/components/schemas/MCPApprovalResponseResource'
        - $ref: '#/components/schemas/CustomToolCall'
        - $ref: '#/components/schemas/CustomToolCallOutputResource'
      discriminator:
        propertyName: type
    InputItem:
      oneOf:
        - $ref: '#/components/schemas/EasyInputMessage'
        - $ref: '#/components/schemas/Item'
          type: object
          title: 项
          description: 表示模型待生成响应的部分上下文的项。可以包含文本、图像和音频输入，以及之前的助手响应和工具调用输出。
        - $ref: '#/components/schemas/CompactionTriggerItemParam'
        - $ref: '#/components/schemas/ItemReferenceParam'
        - $ref: '#/components/schemas/ProgramItemParam'
        - $ref: '#/components/schemas/ProgramOutputItemParam'
      discriminator:
        propertyName: type
    ResponseUsage:
      type: object
      description: 表示 Token 用量详情，包括输入 Token、输出 Token、输出 Token 明细以及使用的 Token 总数。
      properties:
        input_tokens:
          type: integer
          description: 输入 Token 数。
        input_tokens_details:
          type: object
          description: 输入 Token 的详细明细。
          properties:
            cached_tokens:
              type: integer
              description: >-
                从缓存中读取的 Token
                数。[了解更多关于提示缓存的信息](https://developers.openai.com/api/docs/guides/prompt-caching)。
            cache_write_tokens:
              type: integer
              description: 写入缓存的输入 Token 数。
            cache_write_tokens_details:
              $ref: '#/components/schemas/CacheWriteTokensDetails'
          required:
            - cached_tokens
            - cache_write_tokens
        output_tokens:
          type: integer
          description: 输出 Token 数。
        output_tokens_details:
          type: object
          description: 输出 Token 的详细明细。
          properties:
            reasoning_tokens:
              type: integer
              description: 推理 Token 数。
          required:
            - reasoning_tokens
        total_tokens:
          type: integer
          description: 使用的 Token 总数。
      required:
        - input_tokens
        - input_tokens_details
        - output_tokens
        - output_tokens_details
        - total_tokens
    ResponseToolUsage:
      properties:
        image_gen:
          $ref: '#/components/schemas/ImageGenToolUsage'
          description: 图像生成工具调用的汇总用量统计。
        web_search:
          $ref: '#/components/schemas/WebSearchUsage'
          description: 网页搜索工具调用的计费汇总用量统计。
      type: object
      required:
        - image_gen
        - web_search
      title: 响应工具用量
      description: 生成响应期间运行的计费工具的汇总用量明细。
    PromptCacheOptions:
      properties:
        ttl:
          type: string
          enum:
            - 30m
            - 12h
          description: 应用于每个缓存断点的最短存活时间。
        mode:
          $ref: '#/components/schemas/PromptCacheModeEnum'
          description: 是否启用了隐式提示缓存断点。
        comparison_response_id:
          anyOf:
            - type: string
              description: 作为提示缓存诊断对比对象提供的响应 ID。
            - type: 'null'
      type: object
      required:
        - ttl
        - mode
      title: 提示缓存选项
      description: 应用于该响应的提示缓存选项。适用于 `gpt-5.6` 及更新的模型。
    PromptCacheDiagnostics:
      oneOf:
        - $ref: '#/components/schemas/PromptCacheMissDiagnosticsBody'
        - $ref: '#/components/schemas/PromptCacheHitDiagnosticsBody'
        - $ref: >-
            #/components/schemas/PromptCacheComparisonResponseNotFoundDiagnosticsBody
        - $ref: '#/components/schemas/PromptCacheUnavailableDiagnosticsBody'
      description: 为该响应请求的提示缓存诊断。
      discriminator:
        propertyName: type
    Moderation:
      properties:
        input:
          oneOf:
            - $ref: '#/components/schemas/ModerationResultBody'
            - $ref: '#/components/schemas/ModerationErrorBody'
          description: 对响应输入的内容审核。
          discriminator:
            propertyName: type
        output:
          oneOf:
            - $ref: '#/components/schemas/ModerationResultBody'
            - $ref: '#/components/schemas/ModerationErrorBody'
          description: 对响应输出的内容审核。
          discriminator:
            propertyName: type
      type: object
      required:
        - input
        - output
      title: 内容审核
      description: 响应输入和输出的内容审核结果或错误。
    ResponseConversation:
      properties:
        id:
          type: string
          description: 与该响应关联的对话的唯一 ID。
      type: object
      required:
        - id
      title: 对话
      description: 该响应所属的对话。该响应的输入项和输出项已自动添加到此对话中。
    ResponseAudioDeltaEvent:
      type: object
      description: 出现部分音频响应时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.audio.delta`。
          const: response.audio.delta
        sequence_number:
          type: integer
          description: 此流式响应数据块的序列号。
        delta:
          type: string
          description: Base64 编码的响应音频字节数据块。
      required:
        - type
        - delta
        - sequence_number
    ResponseAudioDoneEvent:
      type: object
      description: 音频响应完成时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.audio.done`。
          const: response.audio.done
        sequence_number:
          type: integer
          description: 增量的序列号。
      required:
        - type
        - sequence_number
        - response_id
    ResponseAudioTranscriptDeltaEvent:
      type: object
      description: 出现部分音频转录文本时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.audio.transcript.delta`。
          const: response.audio.transcript.delta
        delta:
          type: string
          description: 音频响应的部分转录文本。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - response_id
        - delta
        - sequence_number
    ResponseAudioTranscriptDoneEvent:
      type: object
      description: 完整音频转录完成时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.audio.transcript.done`。
          const: response.audio.transcript.done
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - response_id
        - sequence_number
    ResponseCodeInterpreterCallCodeDeltaEvent:
      type: object
      description: 代码解释器流式传输部分代码片段时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.code_interpreter_call_code.delta`。
          const: response.code_interpreter_call_code.delta
        output_index:
          type: integer
          description: 正在流式传输代码的输出项在响应中的索引。
        item_id:
          type: string
          description: 代码解释器工具调用项的唯一标识符。
        delta:
          type: string
          description: 代码解释器正在流式传输的部分代码片段。
        sequence_number:
          type: integer
          description: 此事件的序列号，用于对流式事件排序。
      required:
        - type
        - output_index
        - item_id
        - delta
        - sequence_number
    ResponseCodeInterpreterCallCodeDoneEvent:
      type: object
      description: 代码解释器确定最终代码片段时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.code_interpreter_call_code.done`。
          const: response.code_interpreter_call_code.done
        output_index:
          type: integer
          description: 代码已确定的输出项在响应中的索引。
        item_id:
          type: string
          description: 代码解释器工具调用项的唯一标识符。
        code:
          type: string
          description: 代码解释器输出的最终代码片段。
        sequence_number:
          type: integer
          description: 此事件的序列号，用于对流式事件排序。
      required:
        - type
        - output_index
        - item_id
        - code
        - sequence_number
    ResponseCodeInterpreterCallCompletedEvent:
      type: object
      description: 代码解释器调用完成时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.code_interpreter_call.completed`。
          const: response.code_interpreter_call.completed
        output_index:
          type: integer
          description: 代码解释器调用已完成的输出项在响应中的索引。
        item_id:
          type: string
          description: 代码解释器工具调用项的唯一标识符。
        sequence_number:
          type: integer
          description: 此事件的序列号，用于对流式事件排序。
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseCodeInterpreterCallInProgressEvent:
      type: object
      description: 代码解释器调用进行中时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.code_interpreter_call.in_progress`。
          const: response.code_interpreter_call.in_progress
        output_index:
          type: integer
          description: 代码解释器调用正在进行的输出项在响应中的索引。
        item_id:
          type: string
          description: 代码解释器工具调用项的唯一标识符。
        sequence_number:
          type: integer
          description: 此事件的序列号，用于对流式事件排序。
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseCodeInterpreterCallInterpretingEvent:
      type: object
      description: 代码解释器正在解释代码片段时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.code_interpreter_call.interpreting`。
          const: response.code_interpreter_call.interpreting
        output_index:
          type: integer
          description: 代码解释器正在解释代码的输出项在响应中的索引。
        item_id:
          type: string
          description: 代码解释器工具调用项的唯一标识符。
        sequence_number:
          type: integer
          description: 此事件的序列号，用于对流式事件排序。
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseCompactionCompactingStreamingEvent:
      properties:
        type:
          type: string
          enum:
            - response.compaction.compacting
          description: 事件类型，始终为 `response.compaction.compacting`。
          default: response.compaction.compacting
        sequence_number:
          type: integer
          description: 所发出事件的序号。
        output_index:
          type: integer
          description: 压缩输出项的索引。
        item_id:
          type: string
          description: 压缩输出项的 ID。
      type: object
      required:
        - type
        - sequence_number
        - output_index
        - item_id
      title: 响应压缩进行中事件
      description: 为压缩触发器采样到新的摘要内容时触发。不包含摘要内容。
    ResponseCompletedEvent:
      type: object
      description: 模型响应完成时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.completed`。
          const: response.completed
        response:
          $ref: '#/components/schemas/Response'
          description: 已完成响应的属性。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - response
        - sequence_number
    ResponseContentPartAddedEvent:
      type: object
      description: 添加新的内容部分时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.content_part.added`。
          const: response.content_part.added
        item_id:
          type: string
          description: 添加了该内容部分的输出项 ID。
        output_index:
          type: integer
          description: 添加了该内容部分的输出项索引。
        content_index:
          type: integer
          description: 所添加内容部分的索引。
        part:
          $ref: '#/components/schemas/OutputContent'
          description: 所添加的内容部分。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - item_id
        - output_index
        - content_index
        - part
        - sequence_number
    ResponseContentPartDoneEvent:
      type: object
      description: 内容部分完成时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.content_part.done`。
          const: response.content_part.done
        item_id:
          type: string
          description: 添加了该内容部分的输出项 ID。
        output_index:
          type: integer
          description: 添加了该内容部分的输出项索引。
        content_index:
          type: integer
          description: 已完成内容部分的索引。
        sequence_number:
          type: integer
          description: 此事件的序列号。
        part:
          $ref: '#/components/schemas/OutputContent'
          description: 已完成的内容部分。
      required:
        - type
        - item_id
        - output_index
        - content_index
        - part
        - sequence_number
    ResponseCreatedEvent:
      type: object
      description: 创建响应时触发的事件。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.created`。
          const: response.created
        response:
          $ref: '#/components/schemas/Response'
          description: 已创建的响应。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - response
        - sequence_number
    ResponseErrorEvent:
      type: object
      description: 发生错误时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `error`。
          const: error
        code:
          anyOf:
            - type: string
              description: 错误码。
            - type: 'null'
        message:
          type: string
          description: 错误信息。
        param:
          anyOf:
            - type: string
              description: 错误参数。
            - type: 'null'
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - code
        - message
        - param
        - sequence_number
    ResponseFileSearchCallCompletedEvent:
      type: object
      description: 文件搜索调用完成（已找到结果）时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.file_search_call.completed`。
          const: response.file_search_call.completed
        output_index:
          type: integer
          description: 发起文件搜索调用的输出项索引。
        item_id:
          type: string
          description: 发起文件搜索调用的输出项 ID。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseFileSearchCallInProgressEvent:
      type: object
      description: 发起文件搜索调用时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.file_search_call.in_progress`。
          const: response.file_search_call.in_progress
        output_index:
          type: integer
          description: 发起文件搜索调用的输出项索引。
        item_id:
          type: string
          description: 发起文件搜索调用的输出项 ID。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseFileSearchCallSearchingEvent:
      type: object
      description: 文件搜索正在进行搜索时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.file_search_call.searching`。
          const: response.file_search_call.searching
        output_index:
          type: integer
          description: 文件搜索调用正在搜索的输出项索引。
        item_id:
          type: string
          description: 发起文件搜索调用的输出项 ID。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseFunctionCallArgumentsDeltaEvent:
      type: object
      description: 出现部分函数调用参数增量时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.function_call_arguments.delta`。
          const: response.function_call_arguments.delta
        item_id:
          type: string
          description: 添加了函数调用参数增量的输出项 ID。
        output_index:
          type: integer
          description: 添加了函数调用参数增量的输出项索引。
        sequence_number:
          type: integer
          description: 此事件的序列号。
        delta:
          type: string
          description: 所添加的函数调用参数增量。
      required:
        - type
        - item_id
        - output_index
        - delta
        - sequence_number
    ResponseFunctionCallArgumentsDoneEvent:
      type: object
      description: 函数调用参数确定后触发。
      properties:
        type:
          type: string
          const: response.function_call_arguments.done
        item_id:
          type: string
          description: 项的 ID。
        output_index:
          type: integer
          description: 输出项的索引。
        sequence_number:
          type: integer
          description: 此事件的序列号。
        arguments:
          type: string
          description: 函数调用参数。
      required:
        - type
        - item_id
        - output_index
        - arguments
        - sequence_number
    ResponseShellCallCommandAddedStreamingEvent:
      properties:
        type:
          type: string
          enum:
            - response.shell_call_command.added
          description: 事件类型，始终为 `response.shell_call_command.added`。
          default: response.shell_call_command.added
        sequence_number:
          type: integer
          description: 所发出事件的序号。
        output_index:
          type: integer
          description: 被更新的输出项的索引。
        command_index:
          type: integer
          description: 所添加 shell 命令的索引。
        command:
          type: string
          description: 所添加的 shell 命令。
      type: object
      required:
        - type
        - sequence_number
        - output_index
        - command_index
        - command
      title: 响应 Shell 命令已添加事件
      description: 表示已向工具调用添加 shell 命令的流式事件。
    ResponseShellCallCommandDeltaStreamingEvent:
      properties:
        type:
          type: string
          enum:
            - response.shell_call_command.delta
          description: 事件类型，始终为 `response.shell_call_command.delta`。
          default: response.shell_call_command.delta
        sequence_number:
          type: integer
          description: 所发出事件的序号。
        output_index:
          type: integer
          description: 被更新的输出项的索引。
        command_index:
          type: integer
          description: 被更新的 shell 命令的索引。
        delta:
          type: string
          description: 追加的 shell 命令增量。
        obfuscation:
          type: string
          description: 为填充事件载荷而添加的混淆字符串。
      type: object
      required:
        - type
        - sequence_number
        - output_index
        - command_index
        - delta
      title: 响应 Shell 命令增量事件
      description: 表示 shell 命令已增量更新的流式事件。
    ResponseShellCallCommandDoneStreamingEvent:
      properties:
        type:
          type: string
          enum:
            - response.shell_call_command.done
          description: 事件类型，始终为 `response.shell_call_command.done`。
          default: response.shell_call_command.done
        sequence_number:
          type: integer
          description: 所发出事件的序号。
        output_index:
          type: integer
          description: 被更新的输出项的索引。
        command_index:
          type: integer
          description: 已完成的 shell 命令的索引。
        command:
          type: string
          description: 最终输出的 shell 命令。
      type: object
      required:
        - type
        - sequence_number
        - output_index
        - command_index
        - command
      title: 响应 Shell 命令完成事件
      description: 表示 shell 命令已完成的流式事件。
    ResponseShellCallOutputContentDeltaStreamingEvent:
      properties:
        type:
          type: string
          enum:
            - response.shell_call_output_content.delta
          description: 事件类型，始终为 `response.shell_call_output_content.delta`。
          default: response.shell_call_output_content.delta
        sequence_number:
          type: integer
          description: 所发出事件的序号。
        item_id:
          type: string
          description: 被更新的输出项的 ID。
        output_index:
          type: integer
          description: 被更新的输出项的索引。
        command_index:
          type: integer
          description: 产生输出的 shell 命令的索引。
        delta:
          $ref: '#/components/schemas/ShellCallOutputDelta'
          description: 输出的 stdout/stderr 增量。
      type: object
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - command_index
        - delta
      title: 响应 Shell 调用输出内容增量事件
      description: 表示 Shell 调用输出已增量添加的流式事件。
    ResponseShellCallOutputContentDoneStreamingEvent:
      properties:
        type:
          type: string
          enum:
            - response.shell_call_output_content.done
          description: 事件类型，始终为 `response.shell_call_output_content.done`。
          default: response.shell_call_output_content.done
        sequence_number:
          type: integer
          description: 所发出事件的序号。
        item_id:
          type: string
          description: 被更新的输出项的 ID。
        output_index:
          type: integer
          description: 被更新的输出项的索引。
        command_index:
          type: integer
          description: 产生输出的 shell 命令的索引。
        output:
          items:
            $ref: '#/components/schemas/FunctionShellCallOutputContent'
          type: array
          description: 为该 shell 命令输出的内容。
      type: object
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - command_index
        - output
      title: 响应 Shell 调用输出内容完成事件
      description: 表示 Shell 调用输出已完成的流式事件。
    ResponseInProgressEvent:
      type: object
      description: 响应进行中时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.in_progress`。
          const: response.in_progress
        response:
          $ref: '#/components/schemas/Response'
          description: 进行中的响应。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - response
        - sequence_number
    ResponseFailedEvent:
      type: object
      description: 响应失败时触发的事件。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.failed`。
          const: response.failed
        sequence_number:
          type: integer
          description: 此事件的序列号。
        response:
          $ref: '#/components/schemas/Response'
          description: 失败的响应。
      required:
        - type
        - response
        - sequence_number
    ResponseIncompleteEvent:
      type: object
      description: >-
        响应以未完成状态结束时触发的事件。


        通过 WebSocket 时，引导（steering）可能使响应结束并将
        `response.incomplete_details.reason` 设为 `steered`，随后会自动产生一个后续的
        `response.created`，提交排队的引导输入。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.incomplete`。
          const: response.incomplete
        response:
          $ref: '#/components/schemas/Response'
          description: 未完成的响应。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - response
        - sequence_number
    ResponseOutputItemAddedEvent:
      type: object
      description: 添加新的输出项时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.output_item.added`。
          const: response.output_item.added
        output_index:
          type: integer
          description: 所添加输出项的索引。
        sequence_number:
          type: integer
          description: 此事件的序列号。
        item:
          $ref: '#/components/schemas/OutputItem'
          description: >-
            所添加的输出项。对于推理项，在该项进行中时 `encrypted_content` 可能不完整。将推理项作为后续请求的输入时，请使用对应
            `response.output_item.done` 事件中的推理项。
      required:
        - type
        - output_index
        - item
        - sequence_number
    ResponseOutputItemDoneEvent:
      type: object
      description: 输出项被标记为完成时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.output_item.done`。
          const: response.output_item.done
        output_index:
          type: integer
          description: 被标记为完成的输出项索引。
        sequence_number:
          type: integer
          description: 此事件的序列号。
        item:
          $ref: '#/components/schemas/OutputItem'
          description: 被标记为完成的输出项。
      required:
        - type
        - output_index
        - item
        - sequence_number
    ResponseReasoningSummaryPartAddedEvent:
      type: object
      description: 添加新的推理摘要部分时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.reasoning_summary_part.added`。
          const: response.reasoning_summary_part.added
        item_id:
          type: string
          description: 与此摘要部分关联的项 ID。
        output_index:
          type: integer
          description: 与此摘要部分关联的输出项索引。
        summary_index:
          type: integer
          description: 摘要部分在推理摘要中的索引。
        sequence_number:
          type: integer
          description: 此事件的序列号。
        part:
          type: object
          description: 所添加的摘要部分。
          properties:
            type:
              type: string
              description: 摘要部分的类型。始终为 `summary_text`。
              const: summary_text
            text:
              type: string
              description: 摘要部分的文本。
          required:
            - type
            - text
      required:
        - type
        - item_id
        - output_index
        - summary_index
        - part
        - sequence_number
    ResponseReasoningSummaryPartDoneEvent:
      type: object
      description: 推理摘要部分完成时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.reasoning_summary_part.done`。
          const: response.reasoning_summary_part.done
        item_id:
          type: string
          description: 与此摘要部分关联的项 ID。
        output_index:
          type: integer
          description: 与此摘要部分关联的输出项索引。
        summary_index:
          type: integer
          description: 摘要部分在推理摘要中的索引。
        status:
          type: string
          description: 摘要部分的完成状态。正常完成时省略；生成被中断时设为 `incomplete`。
          enum:
            - incomplete
        sequence_number:
          type: integer
          description: 此事件的序列号。
        part:
          type: object
          description: 已完成的摘要部分。
          properties:
            type:
              type: string
              description: 摘要部分的类型。始终为 `summary_text`。
              const: summary_text
            text:
              type: string
              description: 摘要部分的文本。
          required:
            - type
            - text
      required:
        - type
        - item_id
        - output_index
        - summary_index
        - part
        - sequence_number
    ResponseReasoningSummaryTextDeltaEvent:
      type: object
      description: 向推理摘要文本添加增量时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.reasoning_summary_text.delta`。
          const: response.reasoning_summary_text.delta
        item_id:
          type: string
          description: 与此摘要文本增量关联的项 ID。
        output_index:
          type: integer
          description: 与此摘要文本增量关联的输出项索引。
        summary_index:
          type: integer
          description: 摘要部分在推理摘要中的索引。
        delta:
          type: string
          description: 添加到摘要中的文本增量。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - item_id
        - output_index
        - summary_index
        - delta
        - sequence_number
    ResponseReasoningSummaryTextDoneEvent:
      type: object
      description: 推理摘要文本完成时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.reasoning_summary_text.done`。
          const: response.reasoning_summary_text.done
        item_id:
          type: string
          description: 与此摘要文本关联的项 ID。
        output_index:
          type: integer
          description: 与此摘要文本关联的输出项索引。
        summary_index:
          type: integer
          description: 摘要部分在推理摘要中的索引。
        text:
          type: string
          description: 已完成推理摘要的完整文本。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - item_id
        - output_index
        - summary_index
        - text
        - sequence_number
    ResponseReasoningTextDeltaEvent:
      type: object
      description: 向推理文本添加增量时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.reasoning_text.delta`。
          const: response.reasoning_text.delta
        item_id:
          type: string
          description: 与此推理文本增量关联的项 ID。
        output_index:
          type: integer
          description: 与此推理文本增量关联的输出项索引。
        content_index:
          type: integer
          description: 与此增量关联的推理内容部分的索引。
        delta:
          type: string
          description: 添加到推理内容中的文本增量。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - item_id
        - output_index
        - content_index
        - delta
        - sequence_number
    ResponseReasoningTextDoneEvent:
      type: object
      description: 推理文本完成时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.reasoning_text.done`。
          const: response.reasoning_text.done
        item_id:
          type: string
          description: 与此推理文本关联的项 ID。
        output_index:
          type: integer
          description: 与此推理文本关联的输出项索引。
        content_index:
          type: integer
          description: 推理内容部分的索引。
        text:
          type: string
          description: 已完成推理内容的完整文本。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - item_id
        - output_index
        - content_index
        - text
        - sequence_number
    ResponseRefusalDeltaEvent:
      type: object
      description: 出现部分拒绝文本时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.refusal.delta`。
          const: response.refusal.delta
        item_id:
          type: string
          description: 添加了拒绝文本的输出项 ID。
        output_index:
          type: integer
          description: 添加了拒绝文本的输出项索引。
        content_index:
          type: integer
          description: 添加了拒绝文本的内容部分索引。
        delta:
          type: string
          description: 所添加的拒绝文本。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - item_id
        - output_index
        - content_index
        - delta
        - sequence_number
    ResponseRefusalDoneEvent:
      type: object
      description: 拒绝文本确定后触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.refusal.done`。
          const: response.refusal.done
        item_id:
          type: string
          description: 拒绝文本已确定的输出项 ID。
        output_index:
          type: integer
          description: 拒绝文本已确定的输出项索引。
        content_index:
          type: integer
          description: 拒绝文本已确定的内容部分索引。
        refusal:
          type: string
          description: 已确定的拒绝文本。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - item_id
        - output_index
        - content_index
        - refusal
        - sequence_number
    ResponseTextDeltaEvent:
      type: object
      description: 出现新的文本增量时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.output_text.delta`。
          const: response.output_text.delta
        item_id:
          type: string
          description: 添加了文本增量的输出项 ID。
        output_index:
          type: integer
          description: 添加了文本增量的输出项索引。
        content_index:
          type: integer
          description: 添加了文本增量的内容部分索引。
        delta:
          type: string
          description: 所添加的文本增量。
        sequence_number:
          type: integer
          description: 此事件的序列号。
        logprobs:
          type: array
          description: 增量中各 Token 的对数概率。
          items:
            $ref: '#/components/schemas/ResponseLogProb'
      required:
        - type
        - item_id
        - output_index
        - content_index
        - delta
        - sequence_number
        - logprobs
    ResponseTextDoneEvent:
      type: object
      description: 文本内容确定后触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.output_text.done`。
          const: response.output_text.done
        item_id:
          type: string
          description: 文本内容已确定的输出项 ID。
        output_index:
          type: integer
          description: 文本内容已确定的输出项索引。
        content_index:
          type: integer
          description: 文本内容已确定的内容部分索引。
        text:
          type: string
          description: 已确定的文本内容。
        sequence_number:
          type: integer
          description: 此事件的序列号。
        logprobs:
          type: array
          description: 增量中各 Token 的对数概率。
          items:
            $ref: '#/components/schemas/ResponseLogProb'
      required:
        - type
        - item_id
        - output_index
        - content_index
        - text
        - sequence_number
        - logprobs
    ResponseWebSearchCallCompletedEvent:
      type: object
      description: 网页搜索调用完成时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.web_search_call.completed`。
          const: response.web_search_call.completed
        output_index:
          type: integer
          description: 与网页搜索调用关联的输出项索引。
        item_id:
          type: string
          description: 与网页搜索调用关联的输出项唯一 ID。
        sequence_number:
          type: integer
          description: 正在处理的网页搜索调用的序列号。
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseWebSearchCallInProgressEvent:
      type: object
      description: 发起网页搜索调用时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.web_search_call.in_progress`。
          const: response.web_search_call.in_progress
        output_index:
          type: integer
          description: 与网页搜索调用关联的输出项索引。
        item_id:
          type: string
          description: 与网页搜索调用关联的输出项唯一 ID。
        sequence_number:
          type: integer
          description: 正在处理的网页搜索调用的序列号。
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseWebSearchCallSearchingEvent:
      type: object
      description: 网页搜索调用正在执行时触发。
      properties:
        type:
          type: string
          description: 事件类型。始终为 `response.web_search_call.searching`。
          const: response.web_search_call.searching
        output_index:
          type: integer
          description: 与网页搜索调用关联的输出项索引。
        item_id:
          type: string
          description: 与网页搜索调用关联的输出项唯一 ID。
        sequence_number:
          type: integer
          description: 正在处理的网页搜索调用的序列号。
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseImageGenCallCompletedEvent:
      type: object
      title: ResponseImageGenCallCompletedEvent
      description: 图像生成工具调用完成且最终图像可用时触发。
      properties:
        type:
          type: string
          const: response.image_generation_call.completed
          description: 事件类型。始终为 'response.image_generation_call.completed'。
        output_index:
          type: integer
          description: 输出项在响应 output 数组中的索引。
        sequence_number:
          type: integer
          description: 此事件的序列号。
        item_id:
          type: string
          description: 正在处理的图像生成项的唯一标识符。
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseImageGenCallGeneratingEvent:
      type: object
      title: ResponseImageGenCallGeneratingEvent
      description: 图像生成工具调用正在生成图像时触发（中间状态）。
      properties:
        type:
          type: string
          const: response.image_generation_call.generating
          description: 事件类型。始终为 'response.image_generation_call.generating'。
        output_index:
          type: integer
          description: 输出项在响应 output 数组中的索引。
        item_id:
          type: string
          description: 正在处理的图像生成项的唯一标识符。
        sequence_number:
          type: integer
          description: 正在处理的图像生成项的序列号。
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseImageGenCallInProgressEvent:
      type: object
      title: ResponseImageGenCallInProgressEvent
      description: 图像生成工具调用进行中时触发。
      properties:
        type:
          type: string
          const: response.image_generation_call.in_progress
          description: 事件类型。始终为 'response.image_generation_call.in_progress'。
        output_index:
          type: integer
          description: 输出项在响应 output 数组中的索引。
        item_id:
          type: string
          description: 正在处理的图像生成项的唯一标识符。
        sequence_number:
          type: integer
          description: 正在处理的图像生成项的序列号。
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseImageGenCallPartialImageEvent:
      type: object
      title: ResponseImageGenCallPartialImageEvent
      description: 在图像生成流式传输过程中有部分图像可用时触发。
      properties:
        type:
          type: string
          const: response.image_generation_call.partial_image
          description: 事件类型。始终为 'response.image_generation_call.partial_image'。
        output_index:
          type: integer
          description: 输出项在响应 output 数组中的索引。
        item_id:
          type: string
          description: 正在处理的图像生成项的唯一标识符。
        sequence_number:
          type: integer
          description: 正在处理的图像生成项的序列号。
        partial_image_index:
          type: integer
          description: 部分图像的索引，从 0 开始（后端从 1 开始，但对用户从 0 开始）。
        partial_image_b64:
          type: string
          description: Base64 编码的部分图像数据，可直接渲染为图像。
        size:
          type: string
          description: 所使用的图像尺寸。
        quality:
          type: string
          description: 所使用的图像质量。
        background:
          type: string
          description: 所使用的背景设置。
        output_format:
          type: string
          description: 所使用的输出格式。
      required:
        - type
        - output_index
        - item_id
        - sequence_number
        - partial_image_index
        - partial_image_b64
    ResponseMCPCallArgumentsDeltaEvent:
      type: object
      title: ResponseMCPCallArgumentsDeltaEvent
      description: MCP 工具调用的参数出现增量（部分更新）时触发。
      properties:
        type:
          type: string
          const: response.mcp_call_arguments.delta
          description: 事件类型。始终为 'response.mcp_call_arguments.delta'。
        output_index:
          type: integer
          description: 输出项在响应 output 数组中的索引。
        item_id:
          type: string
          description: 正在处理的 MCP 工具调用项的唯一标识符。
        delta:
          type: string
          description: 包含 MCP 工具调用参数部分更新的 JSON 字符串。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - output_index
        - item_id
        - delta
        - sequence_number
    ResponseMCPCallArgumentsDoneEvent:
      type: object
      title: ResponseMCPCallArgumentsDoneEvent
      description: MCP 工具调用的参数确定后触发。
      properties:
        type:
          type: string
          const: response.mcp_call_arguments.done
          description: 事件类型。始终为 'response.mcp_call_arguments.done'。
        output_index:
          type: integer
          description: 输出项在响应 output 数组中的索引。
        item_id:
          type: string
          description: 正在处理的 MCP 工具调用项的唯一标识符。
        arguments:
          type: string
          description: 包含 MCP 工具调用最终参数的 JSON 字符串。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - output_index
        - item_id
        - arguments
        - sequence_number
    ResponseMCPCallCompletedEvent:
      type: object
      title: ResponseMCPCallCompletedEvent
      description: MCP 工具调用成功完成时触发。
      properties:
        type:
          type: string
          const: response.mcp_call.completed
          description: 事件类型。始终为 'response.mcp_call.completed'。
        item_id:
          type: string
          description: 已完成的 MCP 工具调用项的 ID。
        output_index:
          type: integer
          description: 已完成的输出项索引。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - item_id
        - output_index
        - sequence_number
    ResponseMCPCallFailedEvent:
      type: object
      title: ResponseMCPCallFailedEvent
      description: MCP 工具调用失败时触发。
      properties:
        type:
          type: string
          const: response.mcp_call.failed
          description: 事件类型。始终为 'response.mcp_call.failed'。
        item_id:
          type: string
          description: 失败的 MCP 工具调用项的 ID。
        output_index:
          type: integer
          description: 失败的输出项索引。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - item_id
        - output_index
        - sequence_number
    ResponseMCPCallInProgressEvent:
      type: object
      title: ResponseMCPCallInProgressEvent
      description: MCP 工具调用进行中时触发。
      properties:
        type:
          type: string
          const: response.mcp_call.in_progress
          description: 事件类型。始终为 'response.mcp_call.in_progress'。
        sequence_number:
          type: integer
          description: 此事件的序列号。
        output_index:
          type: integer
          description: 输出项在响应 output 数组中的索引。
        item_id:
          type: string
          description: 正在处理的 MCP 工具调用项的唯一标识符。
      required:
        - type
        - output_index
        - item_id
        - sequence_number
    ResponseMCPListToolsCompletedEvent:
      type: object
      title: ResponseMCPListToolsCompletedEvent
      description: 成功获取可用 MCP 工具列表时触发。
      properties:
        type:
          type: string
          const: response.mcp_list_tools.completed
          description: 事件类型。始终为 'response.mcp_list_tools.completed'。
        item_id:
          type: string
          description: 产生此输出的 MCP 工具调用项的 ID。
        output_index:
          type: integer
          description: 已处理的输出项索引。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - item_id
        - output_index
        - sequence_number
    ResponseMCPListToolsFailedEvent:
      type: object
      title: ResponseMCPListToolsFailedEvent
      description: 尝试列出可用 MCP 工具失败时触发。
      properties:
        type:
          type: string
          const: response.mcp_list_tools.failed
          description: 事件类型。始终为 'response.mcp_list_tools.failed'。
        item_id:
          type: string
          description: 失败的 MCP 工具调用项的 ID。
        output_index:
          type: integer
          description: 失败的输出项索引。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - item_id
        - output_index
        - sequence_number
    ResponseMCPListToolsInProgressEvent:
      type: object
      title: ResponseMCPListToolsInProgressEvent
      description: 系统正在获取可用 MCP 工具列表时触发。
      properties:
        type:
          type: string
          const: response.mcp_list_tools.in_progress
          description: 事件类型。始终为 'response.mcp_list_tools.in_progress'。
        item_id:
          type: string
          description: 正在处理的 MCP 工具调用项的 ID。
        output_index:
          type: integer
          description: 正在处理的输出项索引。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - item_id
        - output_index
        - sequence_number
    ResponseOutputTextAnnotationAddedEvent:
      type: object
      title: ResponseOutputTextAnnotationAddedEvent
      description: 向输出文本内容添加注释时触发。
      properties:
        type:
          type: string
          const: response.output_text.annotation.added
          description: 事件类型。始终为 'response.output_text.annotation.added'。
        item_id:
          type: string
          description: 正在添加注释的项的唯一标识符。
        output_index:
          type: integer
          description: 输出项在响应 output 数组中的索引。
        content_index:
          type: integer
          description: 内容部分在输出项中的索引。
        annotation_index:
          type: integer
          description: 注释在内容部分中的索引。
        sequence_number:
          type: integer
          description: 此事件的序列号。
        annotation:
          anyOf:
            - $ref: '#/components/schemas/Annotation'
            - type: 'null'
          description: 正在添加的注释对象。（详见注释 schema。）
      required:
        - type
        - item_id
        - output_index
        - content_index
        - annotation_index
        - annotation
        - sequence_number
    ResponseQueuedEvent:
      type: object
      title: ResponseQueuedEvent
      description: 响应进入队列、等待处理时触发。
      properties:
        type:
          type: string
          const: response.queued
          description: 事件类型。始终为 'response.queued'。
        response:
          $ref: '#/components/schemas/Response'
          description: 处于排队状态的完整响应对象。
        sequence_number:
          type: integer
          description: 此事件的序列号。
      required:
        - type
        - response
        - sequence_number
    ResponseCustomToolCallInputDeltaEvent:
      title: ResponseCustomToolCallInputDelta
      type: object
      description: 表示自定义工具调用输入的增量（部分更新）的事件。
      properties:
        type:
          type: string
          const: response.custom_tool_call_input.delta
          description: 事件类型标识符。
        sequence_number:
          type: integer
          description: 此事件的序列号。
        output_index:
          type: integer
          description: 此增量所对应输出的索引。
        item_id:
          type: string
          description: 与此事件关联的 API 项的唯一标识符。
        delta:
          type: string
          description: 自定义工具调用的增量输入数据。
      required:
        - type
        - output_index
        - item_id
        - delta
        - sequence_number
    ResponseCustomToolCallInputDoneEvent:
      title: ResponseCustomToolCallInputDone
      type: object
      description: 表示自定义工具调用输入已完成的事件。
      properties:
        type:
          type: string
          const: response.custom_tool_call_input.done
          description: 事件类型标识符。
        sequence_number:
          type: integer
          description: 此事件的序列号。
        output_index:
          type: integer
          description: 此事件所对应输出的索引。
        item_id:
          type: string
          description: 与此事件关联的 API 项的唯一标识符。
        input:
          type: string
          description: 自定义工具调用的完整输入数据。
      required:
        - type
        - output_index
        - item_id
        - input
        - sequence_number
    ResponseTextParam:
      type: object
      description: >-
        模型文本响应的配置选项。可以是纯文本或结构化 JSON 数据。了解更多：

        - [文本输入和输出](https://developers.openai.com/api/docs/guides/text)

        -
        [结构化输出](https://developers.openai.com/api/docs/guides/structured-outputs)
      properties:
        format:
          $ref: '#/components/schemas/TextResponseFormatConfiguration'
        verbosity:
          $ref: '#/components/schemas/Verbosity'
    ToolsArray:
      type: array
      description: >-
        模型在生成响应时可调用的工具数组。可通过设置 `tool_choice` 参数指定要使用的工具。


        支持以下几类工具：

        - **内置工具**：由 OpenAI
        提供、用于扩展模型能力的工具，例如[网页搜索](https://developers.openai.com/api/docs/guides/tools-web-search)或[文件搜索](https://developers.openai.com/api/docs/guides/tools-file-search)。详见[内置工具](https://developers.openai.com/api/docs/guides/tools)。

        - **MCP 工具**：通过自定义 MCP 服务器或预定义连接器（如 Google Drive 和
        SharePoint）与第三方系统集成。详见 [MCP
        工具](https://developers.openai.com/api/docs/guides/tools-connectors-mcp)。

        -
        **函数调用（自定义工具）**：由你定义的函数，使模型能够以强类型的参数和输出调用你自己的代码。详见[函数调用](https://developers.openai.com/api/docs/guides/function-calling)。你也可以使用自定义工具调用自己的代码。
      items:
        $ref: '#/components/schemas/Tool'
    ToolChoiceParam:
      description: 模型在生成响应时应如何选择要使用的工具。关于如何指定模型可调用的工具，请参阅 `tools` 参数。
      oneOf:
        - $ref: '#/components/schemas/ToolChoiceOptions'
        - $ref: '#/components/schemas/ToolChoiceAllowed'
        - $ref: '#/components/schemas/ToolChoiceTypes'
        - $ref: '#/components/schemas/ToolChoiceFunction'
        - $ref: '#/components/schemas/ToolChoiceMCP'
        - $ref: '#/components/schemas/ToolChoiceCustom'
        - $ref: '#/components/schemas/SpecificProgrammaticToolCallingParam'
        - $ref: '#/components/schemas/SpecificApplyPatchParam'
        - $ref: '#/components/schemas/SpecificFunctionShellParam'
    Prompt:
      anyOf:
        - type: object
          description: >-
            对提示词模板及其变量的引用。[了解更多](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code)。
          required:
            - id
          properties:
            id:
              type: string
              description: 要使用的提示词模板的唯一标识符。
            version:
              anyOf:
                - type: string
                  description: 提示词模板的可选版本。
                - type: 'null'
            variables:
              $ref: '#/components/schemas/ResponsePromptVariables'
        - type: 'null'
    CyberAccessProgramEnum:
      type: string
      enum:
        - standard
        - daybreak_blue
        - daybreak_red
    ImageContextCompression:
      type: string
      enum:
        - auto
        - enabled
        - disabled
    PromptCacheModeEnum:
      type: string
      enum:
        - implicit
        - explicit
    ReasoningModeEnum:
      anyOf:
        - type: string
        - type: string
          enum:
            - standard
            - pro
    ReasoningEffort:
      anyOf:
        - type: string
          enum:
            - none
            - minimal
            - low
            - medium
            - high
            - xhigh
            - max
          default: medium
          description: >-
            限制推理模型的推理强度。目前支持的值为 `none`、`minimal`、`low`、`medium`、`high`、`xhigh` 和
            `max`。降低推理强度可以加快响应速度，并减少响应中用于推理的 Token。并非所有推理模型都支持每个值。各模型的支持情况请参阅
            [推理指南](https://developers.openai.com/api/docs/guides/reasoning)。
        - type: 'null'
    ModerationPolicyParam:
      properties:
        input:
          anyOf:
            - $ref: '#/components/schemas/ModerationConfigParam'
              description: 响应输入的内容审核策略。
            - type: 'null'
        output:
          anyOf:
            - $ref: '#/components/schemas/ModerationConfigParam'
              description: 响应输出的内容审核策略。
            - type: 'null'
      type: object
      required: []
      description: 应用于经内容审核的响应输入和输出的策略。
    ConversationParam-2:
      properties:
        id:
          type: string
          description: 对话的唯一 ID。
          example: conv_123
      type: object
      required:
        - id
      title: 对话对象
      description: 该响应所属的对话。
    Metadata:
      anyOf:
        - type: object
          description: |-
            可附加到对象上的 16 个键值对。可用于以结构化格式存储对象的附加信息，并通过 API 或控制台查询对象。

            键为字符串，最大长度为 64 个字符。值为字符串，最大长度为 512 个字符。
          additionalProperties:
            type: string
        - type: 'null'
    ResolvedImageContextCompressionEnum:
      type: string
      enum:
        - enabled
        - disabled
    ResponseErrorCode:
      type: string
      description: 响应的错误码。
      enum:
        - server_error
        - rate_limit_exceeded
        - invalid_prompt
        - data_residency_mismatch
        - bio_policy
        - misalignment_policy_violation
        - vector_store_timeout
        - invalid_image
        - invalid_image_format
        - invalid_base64_image
        - invalid_image_url
        - image_too_large
        - image_too_small
        - image_parse_error
        - image_content_policy_violation
        - invalid_image_mode
        - image_file_too_large
        - unsupported_image_media_type
        - empty_image_file
        - failed_to_download_image
        - image_file_not_found
    MisalignmentErrorDetailsResource:
      properties:
        review_target:
          anyOf:
            - not:
                pattern: '[^A-Za-z0-9._~:-]'
              type: string
              maxLength: 96
              minLength: 1
              pattern: ^[A-Za-z0-9._~:-]+$
              description: 用于显式继续此审查的不透明目标；不可用时为 null。
            - type: 'null'
        error_type:
          $ref: '#/components/schemas/_MisalignmentErrorType'
          description: 可选的分类；客户端必须能够接受其他取值。
        detailed_explanation:
          type: string
          description: 该块的公开说明。
        steer:
          $ref: '#/components/schemas/_MisalignmentSteer'
          description: 可选的公开继续执行指令。
      type: object
      required: []
    InputRemovalReason:
      type: string
      enum:
        - organization_mismatch
        - end_user_mismatch
        - model_mismatch
        - prefix_mismatch
        - turn_boundary
    OutputMessage:
      type: object
      title: 输出消息
      description: 模型的输出消息。
      properties:
        id:
          type: string
          description: 输出消息的唯一 ID。
        type:
          type: string
          description: 输出消息的类型。始终为 `message`。
          const: message
        role:
          type: string
          description: 输出消息的角色。始终为 `assistant`。
          const: assistant
        content:
          type: array
          description: 输出消息的内容。
          items:
            $ref: '#/components/schemas/OutputMessageContent'
        phase:
          anyOf:
            - $ref: '#/components/schemas/MessagePhase'
            - type: 'null'
        status:
          type: string
          description: >-
            消息输入的状态。可选值为 `in_progress`、`completed` 或 `incomplete`。通过 API
            返回输入项时填充。
          enum:
            - in_progress
            - completed
            - incomplete
      required:
        - id
        - type
        - role
        - content
        - status
    FileSearchToolCall:
      type: object
      title: 文件搜索工具调用
      description: >-
        文件搜索工具调用的结果。更多信息请参阅
        [文件搜索指南](https://developers.openai.com/api/docs/guides/tools-file-search)。
      properties:
        id:
          type: string
          description: 文件搜索工具调用的唯一 ID。
        type:
          type: string
          enum:
            - file_search_call
          description: 文件搜索工具调用的类型。始终为 `file_search_call`。
        status:
          type: string
          description: 文件搜索工具调用的状态。可选值为 `in_progress`、`searching`、`incomplete` 或 `failed`。
          enum:
            - in_progress
            - searching
            - completed
            - incomplete
            - failed
        queries:
          type: array
          items:
            type: string
          description: 用于搜索文件的查询。
        results:
          anyOf:
            - type: array
              description: 文件搜索工具调用的结果。
              items:
                type: object
                properties:
                  file_id:
                    type: string
                    description: 文件的唯一 ID。
                  text:
                    type: string
                    description: 从文件中检索到的文本。
                  filename:
                    type: string
                    description: 文件名。
                  attributes:
                    $ref: '#/components/schemas/VectorStoreFileAttributes'
                  score:
                    type: number
                    format: float
                    description: 文件的相关性分数，取值范围为 0 到 1。
            - type: 'null'
      required:
        - id
        - type
        - status
        - queries
    FunctionToolCall:
      type: object
      title: 函数工具调用
      description: >-
        运行函数的工具调用。更多信息请参阅
        [函数调用指南](https://developers.openai.com/api/docs/guides/function-calling)。
      properties:
        id:
          type: string
          description: 函数工具调用的唯一 ID。
        type:
          type: string
          const: function_call
          description: 函数工具调用的类型。始终为 `function_call`。
        call_id:
          type: string
          description: 模型生成的函数工具调用唯一 ID。
        caller:
          anyOf:
            - $ref: '#/components/schemas/ToolCallCaller'
            - type: 'null'
        namespace:
          type: string
          description: 要运行的函数所属的命名空间。
        name:
          type: string
          description: 要运行的函数名称。
        arguments:
          type: string
          description: 传给函数的参数，为 JSON 字符串。
        status:
          type: string
          description: 该项的状态。可选值为 `in_progress`、`completed` 或 `incomplete`。通过 API 返回项时填充。
          enum:
            - in_progress
            - completed
            - incomplete
        async:
          type: boolean
          description: 函数工具调用是否异步运行。
      required:
        - type
        - call_id
        - name
        - arguments
    FunctionToolCallOutputResource:
      allOf:
        - $ref: '#/components/schemas/FunctionToolCallOutput'
        - type: object
          properties:
            id:
              type: string
              description: 函数调用工具输出的唯一 ID。
            status:
              $ref: '#/components/schemas/FunctionCallOutputStatusEnum'
              description: >-
                该项的状态。可选值为 `in_progress`、`completed` 或 `incomplete`。通过 API
                返回项时填充。
            created_by:
              type: string
              description: 创建该项的参与方的标识符。
          required:
            - id
            - status
    WebSearchToolCall:
      type: object
      title: 网页搜索工具调用
      description: >-
        网页搜索工具调用的结果。更多信息请参阅[网页搜索指南](https://developers.openai.com/api/docs/guides/tools-web-search)。
      properties:
        id:
          type: string
          description: 网页搜索工具调用的唯一 ID。
        type:
          type: string
          const: web_search_call
          description: 网页搜索工具调用的类型，始终为 `web_search_call`。
        status:
          $ref: '#/components/schemas/WebSearchCallStatus'
          description: 网页搜索工具调用的状态。
        action:
          type: object
          description: >-
            描述本次网页搜索调用中所执行具体操作的对象。包含模型如何使用网页的详细信息（search、open_page、find_in_page）。
          oneOf:
            - $ref: '#/components/schemas/WebSearchActionSearch'
            - $ref: '#/components/schemas/WebSearchActionOpenPage'
            - $ref: '#/components/schemas/WebSearchActionFind'
          discriminator:
            propertyName: type
      required:
        - id
        - type
        - status
    ComputerToolCall:
      type: object
      title: 计算机工具调用
      description: >-
        对计算机使用工具的工具调用。更多信息请参阅
        [计算机使用指南](https://developers.openai.com/api/docs/guides/tools-computer-use)。
      properties:
        type:
          type: string
          description: 计算机调用的类型。始终为 `computer_call`。
          enum:
            - computer_call
          default: computer_call
        id:
          type: string
          description: 计算机调用的唯一 ID。
        call_id:
          type: string
          description: 使用输出响应该工具调用时所用的标识符。
        action:
          $ref: '#/components/schemas/ComputerAction'
        actions:
          $ref: '#/components/schemas/ComputerActionList'
        pending_safety_checks:
          type: array
          items:
            $ref: '#/components/schemas/ComputerCallSafetyCheckParam'
          description: 计算机调用待处理的安全检查。
        status:
          type: string
          description: 该项的状态。可选值为 `in_progress`、`completed` 或 `incomplete`。通过 API 返回项时填充。
          enum:
            - in_progress
            - completed
            - incomplete
      required:
        - type
        - id
        - call_id
        - pending_safety_checks
        - status
    ComputerToolCallOutputResource:
      allOf:
        - $ref: '#/components/schemas/ComputerToolCallOutput'
        - type: object
          properties:
            status:
              $ref: '#/components/schemas/ComputerCallOutputStatus'
              description: >-
                消息输入的状态。可选值为 `in_progress`、`completed` 或 `incomplete`。通过 API
                返回输入项时填充。
            created_by:
              type: string
              description: 创建该项的参与方的标识符。
          required:
            - id
            - status
    ReasoningItem:
      type: object
      description: >-
        推理模型在生成响应时所用思维链的描述。如果你在手动
        [管理上下文](https://developers.openai.com/api/docs/guides/conversation-state)，请务必在对话后续轮次中将这些项包含在发给
        Responses API 的 `input` 中。
      title: 推理
      properties:
        type:
          type: string
          description: 对象类型。始终为 `reasoning`。
          enum:
            - reasoning
        id:
          type: string
          description: 推理内容的唯一标识符。
        encrypted_content:
          anyOf:
            - type: string
              description: >-
                推理项的加密内容。对于 `POST /v1/responses` 和 WebSocket `response.create`
                请求返回的推理项，默认会填充此字段。


                流式传输时，请在后续请求中使用 `response.output_item.done` 事件中已完成的推理项及其
                `encrypted_content`。`response.output_item.added` 中的
                `encrypted_content` 可能不完整。当 `store` 为 `false` 或使用零数据保留时，这一点尤其重要。
            - type: 'null'
        summary:
          type: array
          description: 推理摘要内容。
          items:
            $ref: '#/components/schemas/SummaryTextContent'
        content:
          type: array
          description: 推理文本内容。
          items:
            $ref: '#/components/schemas/ReasoningTextContent'
        status:
          type: string
          description: 该项的状态。可选值为 `in_progress`、`completed` 或 `incomplete`。通过 API 返回项时填充。
          enum:
            - in_progress
            - completed
            - incomplete
      required:
        - id
        - summary
        - type
    Program:
      properties:
        type:
          type: string
          enum:
            - program
          description: 项的类型，始终为 `program`。
          default: program
        id:
          type: string
          description: 程序项的唯一 ID。
        call_id:
          type: string
          description: 程序项的稳定调用 ID。
        code:
          type: string
          description: 程序化工具调用所执行的 JavaScript 源代码。
        fingerprint:
          type: string
          description: 不透明的程序重放指纹，必须原样回传。
      type: object
      required:
        - type
        - id
        - call_id
        - code
        - fingerprint
    ProgramOutput:
      properties:
        type:
          type: string
          enum:
            - program_output
          description: 项的类型，始终为 `program_output`。
          default: program_output
        id:
          type: string
          description: 程序输出项的唯一 ID。
        call_id:
          type: string
          description: 程序项的调用 ID。
        result:
          type: string
          description: 程序项产生的结果。
        status:
          $ref: '#/components/schemas/ProgramOutputStatus'
          description: 程序输出项的终止状态。
      type: object
      required:
        - type
        - id
        - call_id
        - result
        - status
    ToolSearchCall:
      properties:
        type:
          type: string
          enum:
            - tool_search_call
          description: 项的类型，始终为 `tool_search_call`。
          default: tool_search_call
        id:
          type: string
          description: 工具搜索调用项的唯一 ID。
        call_id:
          anyOf:
            - type: string
              description: 模型生成的工具搜索调用的唯一 ID。
            - type: 'null'
        execution:
          $ref: '#/components/schemas/ToolSearchExecutionType'
          description: 工具搜索是由服务端执行还是由客户端执行。
        arguments:
          description: 工具搜索调用所使用的参数。
        status:
          $ref: '#/components/schemas/FunctionCallStatus'
          description: 所记录的工具搜索调用项的状态。
        created_by:
          type: string
          description: 创建该项的执行者的标识符。
      type: object
      required:
        - type
        - id
        - call_id
        - execution
        - arguments
        - status
    ToolSearchOutput:
      properties:
        type:
          type: string
          enum:
            - tool_search_output
          description: 项的类型，始终为 `tool_search_output`。
          default: tool_search_output
        id:
          type: string
          description: 工具搜索输出项的唯一 ID。
        call_id:
          anyOf:
            - type: string
              description: 模型生成的工具搜索调用的唯一 ID。
            - type: 'null'
        execution:
          $ref: '#/components/schemas/ToolSearchExecutionType'
          description: 工具搜索是由服务端执行还是由客户端执行。
        tools:
          items:
            $ref: '#/components/schemas/Tool'
          type: array
          description: 工具搜索返回的已加载工具定义。
        status:
          $ref: '#/components/schemas/FunctionCallOutputStatusEnum'
          description: 所记录的工具搜索输出项的状态。
        created_by:
          type: string
          description: 创建该项的执行者的标识符。
      type: object
      required:
        - type
        - id
        - call_id
        - execution
        - tools
        - status
    AdditionalTools:
      properties:
        type:
          type: string
          enum:
            - additional_tools
          description: 项的类型，始终为 `additional_tools`。
          default: additional_tools
        id:
          type: string
          description: 附加工具项的唯一 ID。
        role:
          $ref: '#/components/schemas/MessageRole'
          description: 提供附加工具的角色。
        tools:
          items:
            $ref: '#/components/schemas/Tool'
          type: array
          description: 在该项处可用的附加工具定义。
      type: object
      required:
        - type
        - id
        - role
        - tools
    CompactionBody:
      properties:
        type:
          type: string
          enum:
            - compaction
          description: 项的类型，始终为 `compaction`。
          default: compaction
        id:
          type: string
          description: 压缩项的唯一 ID。
        encrypted_content:
          type: string
          description: 压缩生成的加密内容。
        created_by:
          type: string
          description: 创建该项的执行者的标识符。
      type: object
      required:
        - type
        - id
        - encrypted_content
      title: 压缩项
      description: >-
        由 [`v1/responses/compact`
        API](https://developers.openai.com/api/reference/resources/responses/methods/compact)
        生成的压缩项。
    ImageGenToolCall:
      properties:
        type:
          type: string
          enum:
            - image_generation_call
          description: 图像生成调用的类型，始终为 `image_generation_call`。
        id:
          type: string
          description: 图像生成调用的唯一 ID。
        status:
          type: string
          enum:
            - in_progress
            - completed
            - generating
            - failed
          description: 图像生成调用的状态。
        result:
          anyOf:
            - type: string
              description: 以 base64 编码的生成图片。
            - type: 'null'
        error:
          $ref: '#/components/schemas/ImageGenToolCallError'
          description: 内容审核失败的详情（如可用）。
        size:
          anyOf:
            - anyOf:
                - type: string
                - type: string
                  enum:
                    - 1024x1024
                    - 1024x1536
                    - 1536x1024
              description: 以 `WIDTHxHEIGHT` 字符串表示的图片尺寸，例如 `1536x864`。
            - type: 'null'
        quality:
          anyOf:
            - type: string
              enum:
                - low
                - medium
                - high
                - xhigh
                - max
                - auto
              description: >-
                图像生成工具调用所生成图片的质量。可选值为
                `low`、`medium`、`high`、`xhigh`、`max`、`auto`。
            - type: 'null'
        action:
          anyOf:
            - $ref: '#/components/schemas/ImageGenActionEnum'
              description: 图像生成所使用的操作。
            - type: 'null'
        background:
          anyOf:
            - $ref: '#/components/schemas/ImageBackground'
              description: 生成时使用的背景设置。
            - type: 'null'
        output_format:
          anyOf:
            - $ref: '#/components/schemas/ImageOutputFormat'
              description: 生成时使用的输出格式。
            - type: 'null'
        svg_usage:
          $ref: '#/components/schemas/SvgUsage'
        revised_prompt:
          anyOf:
            - type: string
              description: 经模型改写提示词后实际使用的提示词。
            - type: 'null'
      type: object
      required:
        - type
        - id
        - status
        - result
      title: 图像生成调用
      description: 模型发起的图像生成请求。
    CodeInterpreterToolCall:
      type: object
      title: 代码解释器工具调用
      description: 运行代码的工具调用。
      properties:
        type:
          type: string
          enum:
            - code_interpreter_call
          default: code_interpreter_call
          description: 代码解释器工具调用的类型。始终为 `code_interpreter_call`。
        id:
          type: string
          description: 代码解释器工具调用的唯一 ID。
        status:
          type: string
          enum:
            - in_progress
            - completed
            - incomplete
            - interpreting
            - failed
          description: >-
            代码解释器工具调用的状态。有效值为
            `in_progress`、`completed`、`incomplete`、`interpreting` 和 `failed`。
        container_id:
          type: string
          description: 用于运行代码的容器 ID。
        code:
          anyOf:
            - type: string
              description: 要运行的代码；如果不可用则为 null。
            - type: 'null'
        outputs:
          anyOf:
            - type: array
              items:
                oneOf:
                  - $ref: '#/components/schemas/CodeInterpreterOutputLogs'
                  - $ref: '#/components/schemas/CodeInterpreterOutputImage'
                discriminator:
                  propertyName: type
              discriminator:
                propertyName: type
              description: 代码解释器生成的输出，例如日志或图像。如果没有可用输出，可以为 null。
            - type: 'null'
      required:
        - type
        - id
        - status
        - container_id
        - code
        - outputs
    LocalShellToolCall:
      type: object
      title: 本地 shell 调用
      description: 在本地 shell 上运行命令的工具调用。
      properties:
        type:
          type: string
          enum:
            - local_shell_call
          description: 本地 shell 调用的类型。始终为 `local_shell_call`。
        id:
          type: string
          description: 本地 shell 调用的唯一 ID。
        call_id:
          type: string
          description: 模型生成的本地 shell 工具调用唯一 ID。
        action:
          $ref: '#/components/schemas/LocalShellExecAction'
        status:
          type: string
          enum:
            - in_progress
            - completed
            - incomplete
          description: 本地 shell 调用的状态。
      required:
        - type
        - id
        - call_id
        - action
        - status
    LocalShellToolCallOutput:
      type: object
      title: 本地 shell 调用输出
      description: 本地 shell 工具调用的输出。
      properties:
        type:
          type: string
          enum:
            - local_shell_call_output
          description: 本地 shell 工具调用输出的类型。始终为 `local_shell_call_output`。
        id:
          type: string
          description: 模型生成的本地 shell 工具调用唯一 ID。
        output:
          type: string
          description: 本地 shell 工具调用的输出，为 JSON 字符串。
        status:
          anyOf:
            - type: string
              enum:
                - in_progress
                - completed
                - incomplete
              description: 该项的状态。可选值为 `in_progress`、`completed` 或 `incomplete`。
            - type: 'null'
      required:
        - id
        - type
        - call_id
        - output
    FunctionShellCall:
      properties:
        type:
          type: string
          enum:
            - shell_call
          description: 项的类型，始终为 `shell_call`。
          default: shell_call
        id:
          type: string
          description: Shell 工具调用的唯一 ID。通过 API 返回该项时填充。
        call_id:
          type: string
          description: 模型生成的 Shell 工具调用的唯一 ID。
        caller:
          anyOf:
            - $ref: '#/components/schemas/ToolCallCaller'
              description: 产生此工具调用的执行上下文。
            - type: 'null'
        action:
          $ref: '#/components/schemas/FunctionShellAction'
          description: 描述如何运行该工具调用的 shell 命令及限制。
        status:
          $ref: '#/components/schemas/FunctionShellCallStatus'
          description: Shell 调用的状态。可选值为 `in_progress`、`completed`、`incomplete`。
        environment:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/LocalEnvironmentResource'
                - $ref: '#/components/schemas/ContainerReferenceResource'
              discriminator:
                propertyName: type
            - type: 'null'
        created_by:
          type: string
          description: 创建该工具调用的实体的 ID。
      type: object
      required:
        - type
        - id
        - call_id
        - action
        - status
        - environment
      title: Shell 工具调用
      description: 在托管环境中执行一条或多条 shell 命令的工具调用。
    FunctionShellCallOutput:
      properties:
        type:
          type: string
          enum:
            - shell_call_output
          description: Shell 调用输出的类型，始终为 `shell_call_output`。
          default: shell_call_output
        id:
          type: string
          description: Shell 调用输出的唯一 ID。通过 API 返回该项时填充。
        call_id:
          type: string
          description: 模型生成的 Shell 工具调用的唯一 ID。
        caller:
          anyOf:
            - $ref: '#/components/schemas/ToolCallCaller'
              description: 产生此工具调用的执行上下文。
            - type: 'null'
        status:
          $ref: '#/components/schemas/FunctionShellCallOutputStatusEnum'
          description: Shell 调用输出的状态。可选值为 `in_progress`、`completed`、`incomplete`。
        output:
          items:
            $ref: '#/components/schemas/FunctionShellCallOutputContent'
          type: array
          description: Shell 调用输出内容的数组
        max_output_length:
          anyOf:
            - type: integer
              description: Shell 命令输出的最大长度。该值由模型生成，应与原始输出一并回传。
            - type: 'null'
        created_by:
          type: string
          description: 创建该项的执行者的标识符。
      type: object
      required:
        - type
        - id
        - call_id
        - status
        - output
        - max_output_length
      title: Shell 调用输出
      description: 已输出的 Shell 工具调用输出。
    ApplyPatchToolCall:
      properties:
        type:
          type: string
          enum:
            - apply_patch_call
          description: 项的类型，始终为 `apply_patch_call`。
          default: apply_patch_call
        id:
          type: string
          description: 应用补丁工具调用的唯一 ID。通过 API 返回该项时填充。
        call_id:
          type: string
          description: 模型生成的应用补丁工具调用的唯一 ID。
        caller:
          anyOf:
            - $ref: '#/components/schemas/ToolCallCaller'
              description: 产生此工具调用的执行上下文。
            - type: 'null'
        status:
          $ref: '#/components/schemas/ApplyPatchCallStatus'
          description: 应用补丁工具调用的状态。可选值为 `in_progress`、`completed`。
        operation:
          oneOf:
            - $ref: '#/components/schemas/ApplyPatchCreateFileOperation'
            - $ref: '#/components/schemas/ApplyPatchDeleteFileOperation'
            - $ref: '#/components/schemas/ApplyPatchUpdateFileOperation'
          title: 应用补丁操作
          description: 通过 apply_patch 应用的 create_file、delete_file 或 update_file 操作之一。
          discriminator:
            propertyName: type
        created_by:
          type: string
          description: 创建该工具调用的实体的 ID。
      type: object
      required:
        - type
        - id
        - call_id
        - status
        - operation
      title: 应用补丁工具调用
      description: 通过创建、删除或更新文件来应用文件 diff 的工具调用。
    ApplyPatchToolCallOutput:
      properties:
        type:
          type: string
          enum:
            - apply_patch_call_output
          description: 项的类型，始终为 `apply_patch_call_output`。
          default: apply_patch_call_output
        id:
          type: string
          description: 应用补丁工具调用输出的唯一 ID。通过 API 返回该项时填充。
        call_id:
          type: string
          description: 模型生成的应用补丁工具调用的唯一 ID。
        caller:
          anyOf:
            - $ref: '#/components/schemas/ToolCallCaller'
              description: 产生此工具调用的执行上下文。
            - type: 'null'
        status:
          $ref: '#/components/schemas/ApplyPatchCallOutputStatus'
          description: 应用补丁工具调用输出的状态。可选值为 `completed`、`failed`。
        output:
          anyOf:
            - type: string
              description: 应用补丁工具返回的可选文本输出。
            - type: 'null'
        created_by:
          type: string
          description: 创建该工具调用输出的实体的 ID。
      type: object
      required:
        - type
        - id
        - call_id
        - status
      title: 应用补丁工具调用输出
      description: 应用补丁工具调用产生的输出。
    MCPToolCall:
      type: object
      title: MCP 工具调用
      description: 对 MCP 服务器上某个工具的一次调用。
      properties:
        type:
          type: string
          const: mcp_call
          description: 项的类型。始终为 `mcp_call`。
        id:
          type: string
          description: 工具调用的唯一 ID。
        server_label:
          type: string
          description: 运行该工具的 MCP 服务器的标签。
        name:
          type: string
          description: 已运行的工具名称。
        arguments:
          type: string
          description: 传给工具的参数，为 JSON 字符串。
        output:
          anyOf:
            - type: string
              description: 工具调用的输出。
            - type: 'null'
        error:
          description: 工具调用的错误（如有）。
          anyOf:
            - $ref: '#/components/schemas/MCPToolCallError'
            - type: 'null'
        status:
          $ref: '#/components/schemas/MCPToolCallStatus'
          description: >-
            工具调用的状态。可选值为 `in_progress`、`completed`、`incomplete`、`calling` 或
            `failed`。
        approval_request_id:
          anyOf:
            - type: string
              description: >-
                MCP 工具调用审批请求的唯一标识符。在后续的 `mcp_approval_response`
                输入中包含此值，以批准或拒绝相应的工具调用。
            - type: 'null'
      required:
        - type
        - id
        - server_label
        - name
        - arguments
    MCPListTools:
      type: object
      title: MCP 工具列表
      description: MCP 服务器上可用的工具列表。
      properties:
        type:
          type: string
          const: mcp_list_tools
          description: 项的类型。始终为 `mcp_list_tools`。
        id:
          type: string
          description: 列表的唯一 ID。
        server_label:
          type: string
          description: MCP 服务器的标签。
        tools:
          type: array
          items:
            $ref: '#/components/schemas/MCPListToolsTool'
          description: 服务器上可用的工具。
        error:
          anyOf:
            - type: string
              description: 服务器无法列出工具时的错误信息。
            - type: 'null'
      required:
        - type
        - id
        - server_label
        - tools
    MCPApprovalRequest:
      type: object
      title: MCP 审批请求
      description: 请求人工批准某次工具调用。
      properties:
        type:
          type: string
          const: mcp_approval_request
          description: 项的类型。始终为 `mcp_approval_request`。
        id:
          type: string
          description: 审批请求的唯一 ID。
        server_label:
          type: string
          description: 发出请求的 MCP 服务器的标签。
        name:
          type: string
          description: 要运行的工具名称。
        arguments:
          type: string
          description: 工具参数，为 JSON 字符串。
      required:
        - type
        - id
        - server_label
        - name
        - arguments
    MCPApprovalResponseResource:
      type: object
      title: MCP 审批响应
      description: 对 MCP 审批请求的响应。
      properties:
        type:
          type: string
          const: mcp_approval_response
          description: 项的类型。始终为 `mcp_approval_response`。
        id:
          type: string
          description: 审批响应的唯一 ID
        approval_request_id:
          type: string
          description: 所答复的审批请求的 ID。
        approve:
          type: boolean
          description: 请求是否获得批准。
        reason:
          anyOf:
            - type: string
              description: 做出该决定的可选原因。
            - type: 'null'
      required:
        - type
        - id
        - request_id
        - approve
        - approval_request_id
    CustomToolCall:
      type: object
      title: 自定义工具调用
      description: 模型发起的自定义工具调用。
      properties:
        type:
          type: string
          enum:
            - custom_tool_call
          description: 自定义工具调用的类型。始终为 `custom_tool_call`。
        id:
          type: string
          description: 自定义工具调用在 OpenAI 平台中的唯一 ID。
        call_id:
          type: string
          description: 用于将此自定义工具调用映射到工具调用输出的标识符。
        caller:
          anyOf:
            - $ref: '#/components/schemas/ToolCallCaller'
            - type: 'null'
        namespace:
          type: string
          description: 被调用的自定义工具所属的命名空间。
        name:
          type: string
          description: 被调用的自定义工具名称。
        input:
          type: string
          description: 模型为自定义工具调用生成的输入。
        async:
          type: boolean
          description: 自定义工具调用是否异步运行。
      required:
        - type
        - call_id
        - name
        - input
    CustomToolCallOutputResource:
      title: ResponseCustomToolCallOutputItem
      allOf:
        - $ref: '#/components/schemas/CustomToolCallOutput'
        - type: object
          properties:
            id:
              type: string
              description: 自定义工具调用输出项的唯一 ID。
            status:
              $ref: '#/components/schemas/FunctionCallOutputStatusEnum'
              description: >-
                该项的状态。可选值为 `in_progress`、`completed` 或 `incomplete`。通过 API
                返回项时填充。
            created_by:
              type: string
              description: 创建该项的参与方的标识符。
          required:
            - id
            - status
    EasyInputMessage:
      type: object
      title: 输入消息
      description: >-
        输入模型的消息，其角色表示指令遵循的层级。以 `developer` 或 `system` 角色给出的指令优先于以 `user`
        角色给出的指令。`assistant` 角色的消息被视为模型在之前的交互中生成的。
      properties:
        role:
          type: string
          description: 消息输入的角色。可选值为 `user`、`assistant`、`system` 或 `developer`。
          enum:
            - user
            - assistant
            - system
            - developer
        content:
          description: 输入模型的文本、图像或音频，用于生成响应。也可以包含之前的助手响应。
          oneOf:
            - type: string
              title: 文本输入
              description: 输入模型的文本。
            - $ref: '#/components/schemas/InputMessageContentList'
        phase:
          anyOf:
            - $ref: '#/components/schemas/MessagePhase'
            - type: 'null'
        type:
          type: string
          description: 消息输入的类型。始终为 `message`。
          enum:
            - message
      required:
        - role
        - content
    Item:
      type: object
      description: 用于生成响应的内容项。
      oneOf:
        - $ref: '#/components/schemas/InputMessage'
        - $ref: '#/components/schemas/OutputMessage'
        - $ref: '#/components/schemas/FileSearchToolCall'
        - $ref: '#/components/schemas/ComputerToolCall'
        - $ref: '#/components/schemas/ComputerCallOutputItemParam'
        - $ref: '#/components/schemas/WebSearchToolCall'
        - $ref: '#/components/schemas/FunctionToolCall'
        - $ref: '#/components/schemas/FunctionCallOutputItemParam'
        - $ref: '#/components/schemas/ToolSearchCallItemParam'
        - $ref: '#/components/schemas/ToolSearchOutputItemParam'
        - $ref: '#/components/schemas/AdditionalToolsItemParam'
        - $ref: '#/components/schemas/ResponseConfigurationUpdateItemParam'
        - $ref: '#/components/schemas/ReasoningItem'
        - $ref: '#/components/schemas/CompactionSummaryItemParam'
        - $ref: '#/components/schemas/ImageGenToolCall'
        - $ref: '#/components/schemas/CodeInterpreterToolCall'
        - $ref: '#/components/schemas/LocalShellToolCall'
        - $ref: '#/components/schemas/LocalShellToolCallOutput'
        - $ref: '#/components/schemas/FunctionShellCallItemParam'
        - $ref: '#/components/schemas/FunctionShellCallOutputItemParam'
        - $ref: '#/components/schemas/ApplyPatchToolCallItemParam'
        - $ref: '#/components/schemas/ApplyPatchToolCallOutputItemParam'
        - $ref: '#/components/schemas/MCPListTools'
        - $ref: '#/components/schemas/MCPApprovalRequest'
        - $ref: '#/components/schemas/MCPApprovalResponse'
        - $ref: '#/components/schemas/MCPToolCall'
        - $ref: '#/components/schemas/CustomToolCallOutput'
        - $ref: '#/components/schemas/CustomToolCall'
      discriminator:
        propertyName: type
    CompactionTriggerItemParam:
      properties:
        id:
          anyOf:
            - type: string
              description: 该压缩触发器的唯一 ID。
              example: msg_123
            - type: 'null'
        type:
          type: string
          enum:
            - compaction_trigger
          description: 项的类型，始终为 `compaction_trigger`。
          default: compaction_trigger
      type: object
      required:
        - type
      title: 压缩触发器
      description: 压缩当前上下文。必须是最后一个输入项。
    ItemReferenceParam:
      properties:
        type:
          anyOf:
            - type: string
              enum:
                - item_reference
              description: 要引用的项的类型，始终为 `item_reference`。
              default: item_reference
            - type: 'null'
        id:
          type: string
          description: 要引用的项的 ID。
      type: object
      required:
        - id
      title: 项引用
      description: 用于引用某个项的内部标识符。
    ProgramItemParam:
      properties:
        id:
          type: string
          description: 该程序项的唯一 ID。
          example: cm_123
        type:
          type: string
          enum:
            - program
          description: 项类型，始终为 `program`。
          default: program
        call_id:
          type: string
          maxLength: 64
          minLength: 1
          description: 程序项的稳定调用 ID。
        code:
          type: string
          maxLength: 10485760
          description: 程序化工具调用所执行的 JavaScript 源代码。
        fingerprint:
          type: string
          maxLength: 10485760
          description: 不透明的程序重放指纹，必须原样回传。
      type: object
      required:
        - id
        - type
        - call_id
        - code
        - fingerprint
    ProgramOutputItemParam:
      properties:
        id:
          type: string
          description: 该程序输出项的唯一 ID。
          example: cmo_123
        type:
          type: string
          enum:
            - program_output
          description: 项类型，始终为 `program_output`。
          default: program_output
        call_id:
          type: string
          maxLength: 64
          minLength: 1
          description: 程序项的调用 ID。
        result:
          type: string
          maxLength: 10485760
          description: 程序项产生的结果。
        status:
          $ref: '#/components/schemas/ProgramOutputItemStatus'
          description: 程序输出的终止状态。
      type: object
      required:
        - id
        - type
        - call_id
        - result
        - status
    CacheWriteTokensDetails:
      properties:
        ttl_30m_tokens:
          type: integer
          description: 以 30 分钟保留期写入的输入 Token 数。
        ttl_12h_tokens:
          type: integer
          description: 以 12 小时保留期写入的输入 Token 数。
      type: object
      required:
        - ttl_30m_tokens
        - ttl_12h_tokens
    ImageGenToolUsage:
      properties:
        input_tokens:
          type: integer
          description: 输入提示词中的 Token 数（图片和文本）。
        total_tokens:
          type: integer
          description: 图像生成所用的 Token 总数（图片和文本）。
        output_tokens:
          type: integer
          description: 模型生成的输出 Token 数。
        output_tokens_details:
          $ref: '#/components/schemas/ImageGenOutputTokensDetails'
        input_tokens_details:
          $ref: '#/components/schemas/ImageGenInputUsageDetails'
        cached_tokens:
          type: integer
        cached_tokens_details:
          $ref: '#/components/schemas/CachedUsageDetails'
      type: object
      required:
        - input_tokens
        - total_tokens
        - output_tokens
        - input_tokens_details
      title: 图像生成工具用量
      description: 响应中图像生成工具调用的 Token 用量。
    WebSearchUsage:
      properties:
        num_requests:
          type: integer
          description: 发出的计费网页搜索请求数。
      type: object
      required:
        - num_requests
      title: 网页搜索用量
      description: 生成响应期间执行的网页搜索请求的用量明细。
    PromptCacheMissDiagnosticsBody:
      properties:
        type:
          type: string
          enum:
            - cache_miss
          default: cache_miss
        reason:
          $ref: '#/components/schemas/CacheMissReasonTypeEnum'
          description: 未能复用提示缓存的原因。
        cache_missed_tokens:
          type: integer
          description: 首次检测到差异之后受影响的输入 Token 估算数量。
        comparison_reusable_tokens:
          type: integer
          description: 被对比响应中可复用前缀的原始 Token 数。
      type: object
      required:
        - type
        - reason
        - cache_missed_tokens
    PromptCacheHitDiagnosticsBody:
      properties:
        type:
          type: string
          enum:
            - cache_hit
          default: cache_hit
      type: object
      required:
        - type
    PromptCacheComparisonResponseNotFoundDiagnosticsBody:
      properties:
        type:
          type: string
          enum:
            - comparison_response_not_found
          default: comparison_response_not_found
      type: object
      required:
        - type
    PromptCacheUnavailableDiagnosticsBody:
      properties:
        type:
          type: string
          enum:
            - unavailable
          default: unavailable
      type: object
      required:
        - type
    ModerationResultBody:
      properties:
        type:
          type: string
          enum:
            - moderation_result
          description: 对象类型，对于成功的内容审核结果始终为 `moderation_result`。
          default: moderation_result
        model:
          type: string
          description: 生成此结果的内容审核模型。
        flagged:
          type: boolean
          description: 布尔值，表示内容是否被任一类别标记。
        categories:
          additionalProperties:
            type: boolean
          type: object
          description: 内容审核类别到布尔值的字典；如果输入在该类别下被标记，则为 True。
        category_scores:
          additionalProperties:
            type: number
          type: object
          description: 内容审核类别到分数的字典。
        category_applied_input_types:
          additionalProperties:
            items:
              $ref: '#/components/schemas/ModerationInputType'
            type: array
          type: object
          description: 每个类别的分数所反映的输入模态。
      type: object
      required:
        - type
        - model
        - flagged
        - categories
        - category_scores
        - category_applied_input_types
      title: 内容审核结果
      description: 针对响应输入或输出生成的内容审核结果。
    ModerationErrorBody:
      properties:
        type:
          type: string
          enum:
            - error
          description: 对象类型，内容审核失败时始终为 `error`。
          default: error
        code:
          type: string
          description: 错误码。
        message:
          type: string
          description: 错误信息。
      type: object
      required:
        - type
        - code
        - message
      title: 内容审核错误
      description: 对响应输入或输出进行内容审核时产生的错误。
    OutputContent:
      oneOf:
        - $ref: '#/components/schemas/OutputTextContent'
        - $ref: '#/components/schemas/RefusalContent'
        - $ref: '#/components/schemas/ReasoningTextContent'
      discriminator:
        propertyName: type
    ShellCallOutputDelta:
      properties:
        stdout:
          type: string
          description: 输出的 stdout 增量。
        stderr:
          type: string
          description: 输出的 stderr 增量。
      type: object
      required: []
      title: Shell 调用输出增量
      description: Shell 调用运行期间输出的 stdout/stderr 增量。
    FunctionShellCallOutputContent:
      properties:
        stdout:
          type: string
          description: 捕获的标准输出。
        stderr:
          type: string
          description: 捕获的标准错误输出。
        outcome:
          oneOf:
            - $ref: '#/components/schemas/FunctionShellCallOutputTimeoutOutcome'
            - $ref: '#/components/schemas/FunctionShellCallOutputExitOutcome'
          title: Shell 调用结果
          description: 表示 Shell 调用输出数据块的退出结果（含退出码）或超时结果。
          discriminator:
            propertyName: type
        created_by:
          type: string
          description: 创建该项的执行者的标识符。
      type: object
      required:
        - stdout
        - stderr
        - outcome
      title: Shell 调用输出内容
      description: 已输出的 Shell 工具调用输出内容。
    ResponseLogProb:
      type: object
      description: 对数概率是模型在序列中给定位置生成某个特定 Token 的概率的对数。对数概率值越接近 0（越大），表示模型对该 Token 选择的置信度越高。
      properties:
        token:
          description: 一个可能的文本 Token。
          type: string
        logprob:
          description: 该 Token 的对数概率。
          type: number
        top_logprobs:
          description: 最多 20 个最可能 Token 的对数概率。
          type: array
          items:
            type: object
            properties:
              token:
                description: 一个可能的文本 Token。
                type: string
              logprob:
                description: 该 Token 的对数概率。
                type: number
      required:
        - token
        - logprob
    Annotation:
      oneOf:
        - $ref: '#/components/schemas/FileCitationBody'
        - $ref: '#/components/schemas/UrlCitationBody'
        - $ref: '#/components/schemas/ContainerFileCitationBody'
        - $ref: '#/components/schemas/FilePath'
      description: 作用于一段输出文本的注释。
      discriminator:
        propertyName: type
    TextResponseFormatConfiguration:
      description: >-
        指定模型必须输出的格式的对象。


        配置 `{ "type": "json_schema" }` 可启用结构化输出，确保模型输出与你提供的 JSON Schema
        匹配。详见[结构化输出指南](https://developers.openai.com/api/docs/guides/structured-outputs)。


        默认格式为 `{ "type": "text" }`，无其他选项。


        **不建议 gpt-4o 及更新的模型使用：**


        设为 `{ "type": "json_object" }` 会启用旧版 JSON 模式，确保模型生成的消息是有效的 JSON。对于支持
        `json_schema` 的模型，建议优先使用 `json_schema`。
      oneOf:
        - $ref: '#/components/schemas/ResponseFormatText'
        - $ref: '#/components/schemas/TextResponseFormatJsonSchema'
        - $ref: '#/components/schemas/ResponseFormatJsonObject'
      discriminator:
        propertyName: type
    Verbosity:
      anyOf:
        - type: string
          enum:
            - low
            - medium
            - high
          default: medium
          description: >-
            限制模型响应的详细程度。值越低，响应越简洁；值越高，响应越详细。目前支持的值为 `low`、`medium` 和 `high`。默认为
            `medium`。
        - type: 'null'
    Tool:
      description: 可用于生成响应的工具。
      discriminator:
        propertyName: type
      oneOf:
        - $ref: '#/components/schemas/FunctionTool'
        - $ref: '#/components/schemas/FileSearchTool'
        - $ref: '#/components/schemas/ComputerTool'
        - $ref: '#/components/schemas/ComputerUsePreviewTool'
        - $ref: '#/components/schemas/WebSearchTool'
        - $ref: '#/components/schemas/MCPTool'
        - $ref: '#/components/schemas/CodeInterpreterTool'
        - $ref: '#/components/schemas/ProgrammaticToolCallingParam'
        - $ref: '#/components/schemas/ImageGenTool'
        - $ref: '#/components/schemas/LocalShellToolParam'
        - $ref: '#/components/schemas/FunctionShellToolParam'
        - $ref: '#/components/schemas/CustomToolParam'
        - $ref: '#/components/schemas/NamespaceToolParam'
        - $ref: '#/components/schemas/ToolSearchToolParam'
        - $ref: '#/components/schemas/WebSearchPreviewTool'
        - $ref: '#/components/schemas/ApplyPatchToolParam'
    ToolChoiceOptions:
      type: string
      title: 工具选择模式
      description: |-
        控制模型调用哪个工具（或不调用工具）。

        `none` 表示模型不调用任何工具，而是生成一条消息。

        `auto` 表示模型可以自行选择生成消息或调用一个或多个工具。

        `required` 表示模型必须调用一个或多个工具。
      enum:
        - none
        - auto
        - required
    ToolChoiceAllowed:
      type: object
      title: 允许的工具
      description: 将模型可用的工具限制为预定义的集合。
      properties:
        type:
          type: string
          enum:
            - allowed_tools
          description: 允许的工具配置类型。始终为 `allowed_tools`。
        mode:
          type: string
          enum:
            - auto
            - required
          description: |-
            将模型可用的工具限制为预定义的集合。

            `auto` 允许模型从允许的工具中选择，也可以生成消息。

            `required` 要求模型调用一个或多个允许的工具。
        tools:
          type: array
          description: |-
            允许模型调用的工具定义列表。

            对于 Responses API，工具定义列表可能如下所示：
            ```json
            [
              { "type": "function", "name": "get_weather" },
              { "type": "mcp", "server_label": "deepwiki" },
              { "type": "image_generation" }
            ]
            ```
          items:
            type: object
            description: 允许模型调用的工具定义。
            additionalProperties: true
      required:
        - type
        - mode
        - tools
    ToolChoiceTypes:
      type: object
      title: 托管工具
      description: >-
        表示模型应使用内置工具生成响应。[了解更多关于内置工具的信息](https://developers.openai.com/api/docs/guides/tools)。
      properties:
        type:
          type: string
          description: >-
            模型应使用的托管工具类型。详见[内置工具](https://developers.openai.com/api/docs/guides/tools)。


            可选值为：

            - `file_search`

            - `web_search_preview`

            - `computer`

            - `computer_use_preview`

            - `computer_use`

            - `code_interpreter`

            - `image_generation`
          enum:
            - file_search
            - web_search_preview
            - computer
            - computer_use_preview
            - computer_use
            - web_search_preview_2025_03_11
            - image_generation
            - code_interpreter
      required:
        - type
    ToolChoiceFunction:
      type: object
      title: 函数工具
      description: 使用此选项强制模型调用指定的函数。
      properties:
        type:
          type: string
          enum:
            - function
          description: 对于函数调用，类型始终为 `function`。
        name:
          type: string
          description: 要调用的函数名称。
      required:
        - type
        - name
    ToolChoiceMCP:
      type: object
      title: MCP 工具
      description: 使用此选项强制模型调用远程 MCP 服务器上的指定工具。
      properties:
        type:
          type: string
          enum:
            - mcp
          description: 对于 MCP 工具，类型始终为 `mcp`。
        server_label:
          type: string
          description: 要使用的 MCP 服务器的标签。
        name:
          anyOf:
            - type: string
              description: 要在服务器上调用的工具名称。
            - type: 'null'
      required:
        - type
        - server_label
    ToolChoiceCustom:
      type: object
      title: 自定义工具
      description: 使用此选项强制模型调用指定的自定义工具。
      properties:
        type:
          type: string
          enum:
            - custom
          description: 对于自定义工具调用，类型始终为 `custom`。
        name:
          type: string
          description: 要调用的自定义工具名称。
      required:
        - type
        - name
    SpecificProgrammaticToolCallingParam:
      properties:
        type:
          type: string
          enum:
            - programmatic_tool_calling
          description: 要调用的工具，始终为 `programmatic_tool_calling`。
          default: programmatic_tool_calling
      type: object
      required:
        - type
    SpecificApplyPatchParam:
      properties:
        type:
          type: string
          enum:
            - apply_patch
          description: 要调用的工具，始终为 `apply_patch`。
          default: apply_patch
      type: object
      required:
        - type
      title: 指定应用补丁工具选择
      description: 在执行工具调用时强制模型调用 apply_patch 工具。
    SpecificFunctionShellParam:
      properties:
        type:
          type: string
          enum:
            - shell
          description: 要调用的工具，始终为 `shell`。
          default: shell
      type: object
      required:
        - type
      title: 指定 Shell 工具选择
      description: 在需要工具调用时强制模型调用 Shell 工具。
    ResponsePromptVariables:
      anyOf:
        - type: object
          title: 提示词变量
          description: 可选映射，包含用于替换提示词中变量的值。替换值可以是字符串，也可以是图像或文件等其他 Response 输入类型。
          additionalProperties:
            oneOf:
              - type: string
              - $ref: '#/components/schemas/InputTextContent'
              - $ref: '#/components/schemas/InputImageContent'
              - $ref: '#/components/schemas/InputFileContent'
        - type: 'null'
    ModerationConfigParam:
      properties:
        mode:
          $ref: '#/components/schemas/ModerationMode'
      type: object
      required:
        - mode
      description: 响应输入的内容审核策略。
    _MisalignmentErrorType:
      anyOf:
        - type: string
        - type: string
          enum:
            - potentially_unintended_data_transfer
            - potentially_unintended_data_access
            - potentially_unintended_destructive_activity
            - other
    _MisalignmentSteer:
      properties:
        message:
          type: string
          description: 公开的继续执行指令。
      type: object
      required:
        - message
    OutputMessageContent:
      oneOf:
        - $ref: '#/components/schemas/OutputTextContent'
        - $ref: '#/components/schemas/RefusalContent'
      discriminator:
        propertyName: type
    MessagePhase:
      type: string
      description: >-
        将 `assistant` 消息标记为中间说明（`commentary`）或最终答案（`final_answer`）。对于
        `gpt-5.3-codex` 及更新的模型，发送后续请求时，请在所有助手消息上保留并重新发送
        phase，丢弃它可能会降低性能。不用于用户消息。
      enum:
        - commentary
        - final_answer
    VectorStoreFileAttributes:
      anyOf:
        - type: object
          description: >-
            可附加到对象上的 16 个键值对集合。可用于以结构化格式存储对象的附加信息，并通过 API 或控制台查询对象。键为字符串，最大长度为
            64 个字符；值可以是最大长度为 512 个字符的字符串、布尔值或数字。
          maxProperties: 16
          propertyNames:
            type: string
            maxLength: 64
          additionalProperties:
            oneOf:
              - type: string
                maxLength: 512
              - type: number
              - type: boolean
        - type: 'null'
    ToolCallCaller:
      oneOf:
        - $ref: '#/components/schemas/DirectToolCallCaller'
        - $ref: '#/components/schemas/ProgramToolCallCaller'
      description: 产生此工具调用的执行上下文。
      discriminator:
        propertyName: type
    FunctionToolCallOutput:
      type: object
      title: 函数工具调用输出
      description: 函数工具调用的输出。
      properties:
        id:
          type: string
          description: 函数工具调用输出的唯一 ID。通过 API 返回该项时填充。
        type:
          type: string
          const: function_call_output
          description: 函数工具调用输出的类型。始终为 `function_call_output`。
        call_id:
          type: string
          description: 模型生成的函数工具调用唯一 ID。
        name:
          type: string
          description: 产生该输出的工具名称。
        namespace:
          type: string
          description: 产生该输出的工具所属的命名空间。
        caller:
          anyOf:
            - $ref: '#/components/schemas/ToolCallCallerParam'
            - type: 'null'
        output:
          description: 由你的代码生成的函数调用输出。可以是字符串或输出内容列表。
          oneOf:
            - type: string
              description: 函数调用输出的字符串。
              title: 字符串输出
            - type: array
              items:
                $ref: '#/components/schemas/FunctionAndCustomToolCallOutput'
              title: 输出内容列表
              description: 函数调用的文本、图像或文件输出。
        status:
          type: string
          description: 该项的状态。可选值为 `in_progress`、`completed` 或 `incomplete`。通过 API 返回项时填充。
          enum:
            - in_progress
            - completed
            - incomplete
      required:
        - type
        - output
    FunctionCallOutputStatusEnum:
      type: string
      enum:
        - in_progress
        - completed
        - incomplete
    WebSearchCallStatus:
      type: string
      enum:
        - in_progress
        - searching
        - completed
        - failed
        - incomplete
    WebSearchActionSearch:
      type: object
      title: 搜索操作
      description: 操作类型 "search"：执行网页搜索查询。
      properties:
        type:
          type: string
          const: search
          description: 操作类型。
        query:
          type: string
          deprecated: true
          description: 搜索查询。
        queries:
          type: array
          title: 搜索查询列表
          description: 搜索查询列表。
          items:
            type: string
            description: 一条搜索查询。
        sources:
          type: array
          title: 网页搜索来源列表
          description: 搜索中使用的来源。
          items:
            type: object
            title: 网页搜索来源
            description: 搜索中使用的一个来源。
            properties:
              type:
                type: string
                const: url
                description: 来源类型，始终为 `url`。
              url:
                type: string
                format: uri
                description: 来源的 URL。
            required:
              - type
              - url
      required:
        - type
    WebSearchActionOpenPage:
      type: object
      title: 打开页面操作
      description: 操作类型 "open_page"：打开搜索结果中的指定 URL。
      properties:
        type:
          type: string
          const: open_page
          description: 操作类型。
        url:
          description: 模型打开的 URL。
          anyOf:
            - type: string
              format: uri
            - type: 'null'
      required:
        - type
    WebSearchActionFind:
      type: object
      title: 页内查找操作
      description: 操作类型 "find_in_page"：在已加载的页面中搜索指定模式。
      properties:
        type:
          type: string
          const: find_in_page
          description: 操作类型。
        url:
          anyOf:
            - type: string
              format: uri
            - type: 'null'
          description: 被搜索的页面 URL（如可用）。
        pattern:
          type: string
          description: 要在页面中搜索的模式或文本。
      required:
        - type
        - pattern
    ComputerAction:
      oneOf:
        - $ref: '#/components/schemas/ClickParam'
        - $ref: '#/components/schemas/DoubleClickAction'
        - $ref: '#/components/schemas/DragParam'
        - $ref: '#/components/schemas/KeyPressAction'
        - $ref: '#/components/schemas/MoveParam'
        - $ref: '#/components/schemas/ScreenshotParam'
        - $ref: '#/components/schemas/ScrollParam'
        - $ref: '#/components/schemas/TypeParam'
        - $ref: '#/components/schemas/WaitParam'
      discriminator:
        propertyName: type
    ComputerActionList:
      title: 计算机操作列表
      type: array
      description: '`computer_use` 的扁平化批量操作。每个操作都包含 `type` 判别字段及特定于该操作的字段。'
      items:
        $ref: '#/components/schemas/ComputerAction'
    ComputerCallSafetyCheckParam:
      properties:
        id:
          type: string
          description: 待处理安全检查的 ID。
        code:
          anyOf:
            - type: string
              description: 待处理安全检查的类型。
            - type: 'null'
        message:
          anyOf:
            - type: string
              description: 待处理安全检查的详细信息。
            - type: 'null'
      type: object
      required:
        - id
      description: 计算机调用的待处理安全检查。
    ComputerToolCallOutput:
      type: object
      title: 计算机工具调用输出
      description: 计算机工具调用的输出。
      properties:
        type:
          type: string
          description: 计算机工具调用输出的类型。始终为 `computer_call_output`。
          const: computer_call_output
          default: computer_call_output
        id:
          type: string
          description: 计算机工具调用输出的 ID。
        call_id:
          type: string
          description: 产生该输出的计算机工具调用的 ID。
        acknowledged_safety_checks:
          type: array
          description: API 报告且已由开发者确认的安全检查。
          items:
            $ref: '#/components/schemas/ComputerCallSafetyCheckParam'
        output:
          $ref: '#/components/schemas/ComputerScreenshotImage'
        status:
          type: string
          description: >-
            消息输入的状态。可选值为 `in_progress`、`completed` 或 `incomplete`。通过 API
            返回输入项时填充。
          enum:
            - in_progress
            - completed
            - incomplete
      required:
        - type
        - call_id
        - output
    ComputerCallOutputStatus:
      type: string
      enum:
        - completed
        - incomplete
        - failed
    SummaryTextContent:
      properties:
        type:
          type: string
          enum:
            - summary_text
          description: 对象的类型，始终为 `summary_text`。
          default: summary_text
        text:
          type: string
          description: 模型截至目前的推理输出摘要。
      type: object
      required:
        - type
        - text
      title: 摘要文本
      description: 模型输出的摘要文本。
    ReasoningTextContent:
      properties:
        type:
          type: string
          enum:
            - reasoning_text
          description: 推理文本的类型，始终为 `reasoning_text`。
          default: reasoning_text
        text:
          type: string
          description: 模型输出的推理文本内容。
      type: object
      required:
        - type
        - text
      title: 推理文本
      description: 模型输出的推理文本。
    ProgramOutputStatus:
      type: string
      enum:
        - completed
        - incomplete
    ToolSearchExecutionType:
      type: string
      enum:
        - server
        - client
    FunctionCallStatus:
      type: string
      enum:
        - in_progress
        - completed
        - incomplete
    MessageRole:
      type: string
      enum:
        - unknown
        - user
        - assistant
        - system
        - critic
        - discriminator
        - developer
        - tool
    ImageGenToolCallError:
      properties:
        code:
          anyOf:
            - type: string
              description: 错误码。
            - type: 'null'
        type:
          type: string
          description: 错误类型。
        message:
          type: string
          description: 错误描述。
        param:
          anyOf:
            - type: string
              description: 相关的请求参数。
            - type: 'null'
        moderation_details:
          $ref: '#/components/schemas/ImageGenToolCallModerationDetails'
          description: '`moderation_blocked` 错误的公开详情（如可用）。'
      type: object
      required:
        - code
        - type
        - message
        - param
    ImageGenActionEnum:
      type: string
      enum:
        - generate
        - edit
        - auto
    ImageBackground:
      type: string
      enum:
        - transparent
        - opaque
        - auto
    ImageOutputFormat:
      type: string
      enum:
        - png
        - webp
        - jpeg
        - gif
        - svg
    SvgUsage:
      properties:
        model:
          type: string
        input_tokens:
          type: integer
        output_tokens:
          type: integer
        total_tokens:
          type: integer
        reasoning_tokens:
          type: integer
      type: object
      required:
        - model
        - input_tokens
        - output_tokens
        - total_tokens
        - reasoning_tokens
    CodeInterpreterOutputLogs:
      properties:
        type:
          type: string
          enum:
            - logs
          description: 输出的类型，始终为 `logs`。
          default: logs
        logs:
          type: string
          description: 代码解释器输出的日志。
      type: object
      required:
        - type
        - logs
      title: 代码解释器输出日志
      description: 代码解释器输出的日志。
    CodeInterpreterOutputImage:
      properties:
        type:
          type: string
          enum:
            - image
          description: 输出的类型，始终为 `image`。
          default: image
        url:
          type: string
          format: uri
          description: 代码解释器输出图片的 URL。
      type: object
      required:
        - type
        - url
      title: 代码解释器输出图片
      description: 代码解释器输出的图片。
    LocalShellExecAction:
      properties:
        type:
          type: string
          enum:
            - exec
          description: 本地 Shell 操作的类型，始终为 `exec`。
          default: exec
        command:
          items:
            type: string
          type: array
          description: 要运行的命令。
        timeout_ms:
          anyOf:
            - type: integer
              description: 命令的可选超时时间（毫秒）。
            - type: 'null'
        working_directory:
          anyOf:
            - type: string
              description: 运行命令的可选工作目录。
            - type: 'null'
        env:
          additionalProperties:
            type: string
          type: object
          description: 为命令设置的环境变量。
        user:
          anyOf:
            - type: string
              description: 运行命令的可选用户身份。
            - type: 'null'
      type: object
      required:
        - type
        - command
        - env
      title: 本地 Shell 执行操作
      description: 在服务器上执行 shell 命令。
    FunctionShellAction:
      properties:
        commands:
          items:
            type: string
            description: 要运行的命令列表。
          type: array
        timeout_ms:
          anyOf:
            - type: integer
              description: 命令的可选超时时间（毫秒）。
            - type: 'null'
        max_output_length:
          anyOf:
            - type: integer
              description: 每条命令可返回的最大字符数（可选）。
            - type: 'null'
      type: object
      required:
        - commands
        - timeout_ms
        - max_output_length
      title: Shell 执行操作
      description: 执行 shell 命令。
    FunctionShellCallStatus:
      type: string
      enum:
        - in_progress
        - completed
        - incomplete
    LocalEnvironmentResource:
      properties:
        type:
          type: string
          enum:
            - local
          description: 环境类型，始终为 `local`。
          default: local
      type: object
      required:
        - type
      title: 本地环境
      description: 表示使用本地环境执行 shell 操作。
    ContainerReferenceResource:
      properties:
        type:
          type: string
          enum:
            - container_reference
          description: 环境类型，始终为 `container_reference`。
          default: container_reference
        container_id:
          type: string
      type: object
      required:
        - type
        - container_id
      title: 容器引用
      description: 表示通过 /v1/containers 创建的容器。
    FunctionShellCallOutputStatusEnum:
      type: string
      enum:
        - in_progress
        - completed
        - incomplete
    ApplyPatchCallStatus:
      type: string
      enum:
        - in_progress
        - completed
    ApplyPatchCreateFileOperation:
      properties:
        type:
          type: string
          enum:
            - create_file
          description: 使用提供的 diff 创建新文件。
          default: create_file
        path:
          type: string
          description: 要创建的文件路径。
        diff:
          type: string
          description: 要应用的 diff。
      type: object
      required:
        - type
        - path
        - diff
      title: 应用补丁：创建文件操作
      description: 描述如何通过 apply_patch 工具创建文件的指令。
    ApplyPatchDeleteFileOperation:
      properties:
        type:
          type: string
          enum:
            - delete_file
          description: 删除指定文件。
          default: delete_file
        path:
          type: string
          description: 要删除的文件路径。
      type: object
      required:
        - type
        - path
      title: 应用补丁：删除文件操作
      description: 描述如何通过 apply_patch 工具删除文件的指令。
    ApplyPatchUpdateFileOperation:
      properties:
        type:
          type: string
          enum:
            - update_file
          description: 使用提供的 diff 更新现有文件。
          default: update_file
        path:
          type: string
          description: 要更新的文件路径。
        diff:
          type: string
          description: 要应用的 diff。
      type: object
      required:
        - type
        - path
        - diff
      title: 应用补丁：更新文件操作
      description: 描述如何通过 apply_patch 工具更新文件的指令。
    ApplyPatchCallOutputStatus:
      type: string
      enum:
        - completed
        - failed
    MCPToolCallError:
      oneOf:
        - $ref: '#/components/schemas/MCPProtocolError'
        - $ref: '#/components/schemas/MCPToolExecutionError'
        - $ref: '#/components/schemas/HTTPError'
      discriminator:
        propertyName: type
    MCPToolCallStatus:
      type: string
      enum:
        - in_progress
        - completed
        - incomplete
        - calling
        - failed
    MCPListToolsTool:
      type: object
      title: MCP 工具列表中的工具
      description: MCP 服务器上可用的工具。
      properties:
        name:
          type: string
          description: 工具名称。
        description:
          anyOf:
            - type: string
              description: 工具描述。
            - type: 'null'
        input_schema:
          type: object
          description: 描述工具输入的 JSON Schema。
        annotations:
          anyOf:
            - type: object
              description: 关于工具的附加注释。
            - type: 'null'
      required:
        - name
        - input_schema
    CustomToolCallOutput:
      type: object
      title: 自定义工具调用输出
      description: 由你的代码产生、发送回模型的自定义工具调用输出。
      properties:
        type:
          type: string
          enum:
            - custom_tool_call_output
          description: 自定义工具调用输出的类型。始终为 `custom_tool_call_output`。
        id:
          type: string
          description: 自定义工具调用输出在 OpenAI 平台中的唯一 ID。
        call_id:
          type: string
          description: 调用 ID，用于将此自定义工具调用输出映射到自定义工具调用。
        caller:
          anyOf:
            - $ref: '#/components/schemas/ToolCallCallerParam'
            - type: 'null'
        output:
          description: 由你的代码生成的自定义工具调用输出。可以是字符串或输出内容列表。
          oneOf:
            - type: string
              description: 自定义工具调用输出的字符串。
              title: 字符串输出
            - type: array
              items:
                $ref: '#/components/schemas/FunctionAndCustomToolCallOutput'
              title: 输出内容列表
              description: 自定义工具调用的文本、图像或文件输出。
      required:
        - type
        - call_id
        - output
    InputMessageContentList:
      type: array
      title: 输入项内容列表
      description: 输入模型的一个或多个输入项的列表，包含不同的内容类型。
      items:
        $ref: '#/components/schemas/InputContent'
    InputMessage:
      type: object
      title: 输入消息
      description: >-
        输入模型的消息，其角色表示指令遵循的层级。以 `developer` 或 `system` 角色给出的指令优先于以 `user`
        角色给出的指令。
      properties:
        type:
          type: string
          description: 消息输入的类型。始终设为 `message`。
          const: message
        role:
          type: string
          description: 消息输入的角色。可选值为 `user`、`system` 或 `developer`。
          enum:
            - user
            - system
            - developer
        status:
          type: string
          description: 该项的状态。可选值为 `in_progress`、`completed` 或 `incomplete`。通过 API 返回项时填充。
          enum:
            - in_progress
            - completed
            - incomplete
        content:
          $ref: '#/components/schemas/InputMessageContentList'
      required:
        - role
        - content
    ComputerCallOutputItemParam:
      properties:
        id:
          anyOf:
            - type: string
              description: 计算机工具调用输出的 ID。
              example: cuo_123
            - type: 'null'
        call_id:
          type: string
          maxLength: 64
          minLength: 1
          description: 产生该输出的计算机工具调用的 ID。
        type:
          type: string
          enum:
            - computer_call_output
          description: 计算机工具调用输出的类型，始终为 `computer_call_output`。
          default: computer_call_output
        output:
          $ref: '#/components/schemas/ComputerScreenshotImage'
        acknowledged_safety_checks:
          anyOf:
            - items:
                $ref: '#/components/schemas/ComputerCallSafetyCheckParam'
              type: array
              description: API 报告且已被开发者确认的安全检查。
            - type: 'null'
        status:
          anyOf:
            - $ref: '#/components/schemas/FunctionCallItemStatus'
              description: >-
                输入消息的状态。可选值为 `in_progress`、`completed`、`incomplete`。通过 API
                返回输入项时填充。
            - type: 'null'
      type: object
      required:
        - call_id
        - type
        - output
      title: 计算机工具调用输出
      description: 计算机工具调用的输出。
    FunctionCallOutputItemParam:
      properties:
        id:
          anyOf:
            - type: string
              description: 函数工具调用输出的唯一 ID。通过 API 返回该项时填充。
              example: fc_123
            - type: 'null'
        call_id:
          anyOf:
            - type: string
              maxLength: 64
              minLength: 1
              description: 模型生成的函数工具调用的唯一 ID。
            - type: 'null'
        type:
          type: string
          enum:
            - function_call_output
          description: 函数工具调用输出的类型，始终为 `function_call_output`。
          default: function_call_output
        output:
          oneOf:
            - type: string
              maxLength: 10485760
              description: 函数工具调用输出的 JSON 字符串。
            - items:
                oneOf:
                  - $ref: '#/components/schemas/InputTextContentParam'
                  - $ref: '#/components/schemas/InputImageContentParamAutoParam'
                  - $ref: '#/components/schemas/InputFileContentParam'
                description: 一段消息内容，例如文本、图片或文件。
                discriminator:
                  propertyName: type
              type: array
              description: 函数工具调用的内容输出数组（文本、图片、文件）。
          description: 函数工具调用的文本、图片或文件输出。
        name:
          anyOf:
            - type: string
              maxLength: 128
              minLength: 1
              description: 产生该输出的工具名称。
            - type: 'null'
        namespace:
          anyOf:
            - type: string
              maxLength: 128
              minLength: 1
              pattern: ^[a-zA-Z0-9_-]+$
              description: 产生该输出的工具所属的命名空间。
            - type: 'null'
        caller:
          anyOf:
            - $ref: '#/components/schemas/ToolCallCallerParam'
              description: 产生此工具调用的执行上下文。
            - type: 'null'
        status:
          anyOf:
            - $ref: '#/components/schemas/FunctionCallItemStatus'
              description: >-
                该项的状态。可选值为 `in_progress`、`completed`、`incomplete`。通过 API
                返回各项时填充。
            - type: 'null'
      type: object
      required:
        - type
        - output
      title: 函数工具调用输出
      description: 函数工具调用的输出。
    ToolSearchCallItemParam:
      properties:
        id:
          anyOf:
            - type: string
              description: 该工具搜索调用的唯一 ID。
              example: tsc_123
            - type: 'null'
        call_id:
          anyOf:
            - type: string
              maxLength: 64
              minLength: 1
              description: 模型生成的工具搜索调用的唯一 ID。
            - type: 'null'
        type:
          type: string
          enum:
            - tool_search_call
          description: 项类型，始终为 `tool_search_call`。
          default: tool_search_call
        execution:
          $ref: '#/components/schemas/ToolSearchExecutionType'
          description: 工具搜索是由服务端执行还是由客户端执行。
        arguments:
          $ref: '#/components/schemas/EmptyModelParam'
          description: 传给工具搜索调用的参数。
        status:
          anyOf:
            - $ref: '#/components/schemas/FunctionCallItemStatus'
              description: 工具搜索调用的状态。
            - type: 'null'
      type: object
      required:
        - type
        - arguments
    ToolSearchOutputItemParam:
      properties:
        id:
          anyOf:
            - type: string
              description: 该工具搜索输出的唯一 ID。
              example: tso_123
            - type: 'null'
        call_id:
          anyOf:
            - type: string
              maxLength: 64
              minLength: 1
              description: 模型生成的工具搜索调用的唯一 ID。
            - type: 'null'
        type:
          type: string
          enum:
            - tool_search_output
          description: 项类型，始终为 `tool_search_output`。
          default: tool_search_output
        execution:
          $ref: '#/components/schemas/ToolSearchExecutionType'
          description: 工具搜索是由服务端执行还是由客户端执行。
        tools:
          items:
            $ref: '#/components/schemas/ToolSearchOutputTool'
          type: array
          description: 工具搜索输出返回的已加载工具定义。
        status:
          anyOf:
            - $ref: '#/components/schemas/FunctionCallItemStatus'
              description: 工具搜索输出的状态。
            - type: 'null'
      type: object
      required:
        - type
        - tools
    AdditionalToolsItemParam:
      properties:
        id:
          anyOf:
            - type: string
              description: 该附加工具项的唯一 ID。
              example: at_123
            - type: 'null'
        type:
          type: string
          enum:
            - additional_tools
          description: 项类型，始终为 `additional_tools`。
          default: additional_tools
        role:
          type: string
          enum:
            - developer
          description: 提供附加工具的角色。仅支持 `developer`。
          default: developer
        tools:
          items:
            $ref: '#/components/schemas/Tool'
          type: array
          description: 在该项处可用的附加工具列表。
      type: object
      required:
        - type
        - role
        - tools
    ResponseConfigurationUpdateItemParam:
      type: object
      description: 对对话响应配置的更新。可提供 reasoning、text 或两者。每项设置持续生效，直到被之后的更新替换。
      properties:
        id:
          anyOf:
            - type: string
              description: 配置更新项的唯一 ID。
              example: cnfu_123
            - type: 'null'
        type:
          type: string
          const: configuration_update
          description: 项类型。始终为 `configuration_update`。
          default: configuration_update
        reasoning:
          type: object
          description: 对推理配置的更新。仅支持 effort。
          properties:
            effort:
              $ref: '#/components/schemas/ReasoningEffort'
              description: 后续响应使用的推理强度，直到被另一个配置更新替换。
        text:
          type: object
          description: 后续响应的文本输出配置。
          properties:
            format:
              description: 使用 JSON Schema 进行结构化输出，或使用 text 恢复为纯文本。
              oneOf:
                - $ref: '#/components/schemas/ResponseFormatText'
                - $ref: '#/components/schemas/TextResponseFormatJsonSchema'
              discriminator:
                propertyName: type
          required:
            - format
      required:
        - type
    CompactionSummaryItemParam:
      properties:
        id:
          anyOf:
            - type: string
              description: 压缩项的 ID。
              example: cmp_123
            - type: 'null'
        type:
          type: string
          enum:
            - compaction
          description: 项的类型，始终为 `compaction`。
          default: compaction
        encrypted_content:
          type: string
          maxLength: 104857600
          description: 压缩摘要的加密内容。
      type: object
      required:
        - type
        - encrypted_content
      title: 压缩项
      description: >-
        由 [`v1/responses/compact`
        API](https://developers.openai.com/api/reference/resources/responses/methods/compact)
        生成的压缩项。
    FunctionShellCallItemParam:
      properties:
        id:
          anyOf:
            - type: string
              description: Shell 工具调用的唯一 ID。通过 API 返回该项时填充。
              example: sh_123
            - type: 'null'
        call_id:
          type: string
          maxLength: 64
          minLength: 1
          description: 模型生成的 Shell 工具调用的唯一 ID。
        caller:
          anyOf:
            - $ref: '#/components/schemas/ToolCallCallerParam'
              description: 产生此工具调用的执行上下文。
            - type: 'null'
        type:
          type: string
          enum:
            - shell_call
          description: 项的类型，始终为 `shell_call`。
          default: shell_call
        action:
          $ref: '#/components/schemas/FunctionShellActionParam'
          description: 描述如何运行该工具调用的 shell 命令及限制。
        status:
          anyOf:
            - $ref: '#/components/schemas/FunctionShellCallItemStatus'
              description: Shell 调用的状态。可选值为 `in_progress`、`completed`、`incomplete`。
            - type: 'null'
        environment:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/LocalEnvironmentParam'
                - $ref: '#/components/schemas/ContainerReferenceParam'
              description: 执行 shell 命令的环境。
              discriminator:
                propertyName: type
            - type: 'null'
      type: object
      required:
        - call_id
        - type
        - action
      title: Shell 工具调用
      description: 表示请求执行一条或多条 shell 命令的工具。
    FunctionShellCallOutputItemParam:
      properties:
        id:
          anyOf:
            - type: string
              description: Shell 工具调用输出的唯一 ID。通过 API 返回该项时填充。
              example: sho_123
            - type: 'null'
        call_id:
          type: string
          maxLength: 64
          minLength: 1
          description: 模型生成的 Shell 工具调用的唯一 ID。
        caller:
          anyOf:
            - $ref: '#/components/schemas/ToolCallCallerParam'
              description: 产生此工具调用的执行上下文。
            - type: 'null'
        type:
          type: string
          enum:
            - shell_call_output
          description: 项的类型，始终为 `shell_call_output`。
          default: shell_call_output
        output:
          items:
            $ref: '#/components/schemas/FunctionShellCallOutputContentParam'
          type: array
          description: 捕获的 stdout 和 stderr 输出数据块及其关联的结果。
        status:
          anyOf:
            - $ref: '#/components/schemas/FunctionShellCallItemStatus'
              description: Shell 调用输出的状态。
            - type: 'null'
        max_output_length:
          anyOf:
            - type: integer
              description: 为该 Shell 调用合并输出捕获的最大 UTF-8 字符数。
            - type: 'null'
      type: object
      required:
        - call_id
        - type
        - output
      title: Shell 工具调用输出
      description: Shell 工具调用以流式方式输出的输出项。
    ApplyPatchToolCallItemParam:
      properties:
        type:
          type: string
          enum:
            - apply_patch_call
          description: 项的类型，始终为 `apply_patch_call`。
          default: apply_patch_call
        id:
          anyOf:
            - type: string
              description: 应用补丁工具调用的唯一 ID。通过 API 返回该项时填充。
              example: apc_123
            - type: 'null'
        call_id:
          type: string
          maxLength: 64
          minLength: 1
          description: 模型生成的应用补丁工具调用的唯一 ID。
        caller:
          anyOf:
            - $ref: '#/components/schemas/ToolCallCallerParam'
              description: 产生此工具调用的执行上下文。
            - type: 'null'
        status:
          $ref: '#/components/schemas/ApplyPatchCallStatusParam'
          description: 应用补丁工具调用的状态。可选值为 `in_progress`、`completed`。
        operation:
          $ref: '#/components/schemas/ApplyPatchOperationParam'
          description: 该 apply_patch 工具调用的具体创建、删除或更新指令。
      type: object
      required:
        - type
        - call_id
        - status
        - operation
      title: 应用补丁工具调用
      description: 表示请求使用 diff 补丁创建、删除或更新文件的工具调用。
    ApplyPatchToolCallOutputItemParam:
      properties:
        type:
          type: string
          enum:
            - apply_patch_call_output
          description: 项的类型，始终为 `apply_patch_call_output`。
          default: apply_patch_call_output
        id:
          anyOf:
            - type: string
              description: 应用补丁工具调用输出的唯一 ID。通过 API 返回该项时填充。
              example: apco_123
            - type: 'null'
        call_id:
          type: string
          maxLength: 64
          minLength: 1
          description: 模型生成的应用补丁工具调用的唯一 ID。
        caller:
          anyOf:
            - $ref: '#/components/schemas/ToolCallCallerParam'
              description: 产生此工具调用的执行上下文。
            - type: 'null'
        status:
          $ref: '#/components/schemas/ApplyPatchCallOutputStatusParam'
          description: 应用补丁工具调用输出的状态。可选值为 `completed`、`failed`。
        output:
          anyOf:
            - type: string
              maxLength: 10485760
              description: 应用补丁工具返回的可选人类可读日志文本（例如补丁结果或错误）。
            - type: 'null'
      type: object
      required:
        - type
        - call_id
        - status
      title: 应用补丁工具调用输出
      description: 应用补丁工具调用以流式方式输出的内容。
    MCPApprovalResponse:
      type: object
      title: MCP 审批响应
      description: 对 MCP 审批请求的响应。
      properties:
        type:
          type: string
          const: mcp_approval_response
          description: 项的类型。始终为 `mcp_approval_response`。
        id:
          anyOf:
            - type: string
              description: 审批响应的唯一 ID
            - type: 'null'
        approval_request_id:
          type: string
          description: 所答复的审批请求的 ID。
        approve:
          type: boolean
          description: 请求是否获得批准。
        reason:
          anyOf:
            - type: string
              description: 做出该决定的可选原因。
            - type: 'null'
      required:
        - type
        - request_id
        - approve
        - approval_request_id
    ProgramOutputItemStatus:
      type: string
      enum:
        - completed
        - incomplete
    ImageGenOutputTokensDetails:
      properties:
        image_tokens:
          type: integer
          description: 模型生成的图片输出 Token 数。
        text_tokens:
          type: integer
          description: 模型生成的文本输出 Token 数。
      type: object
      required:
        - image_tokens
        - text_tokens
      title: 图像生成输出 Token 明细
      description: 图像生成的输出 Token 明细。
    ImageGenInputUsageDetails:
      properties:
        text_tokens:
          type: integer
          description: 输入提示词中的文本 Token 数。
        image_tokens:
          type: integer
          description: 输入提示词中的图片 Token 数。
      type: object
      required:
        - text_tokens
        - image_tokens
      title: 输入用量明细
      description: 图像生成的输入 Token 明细信息。
    CachedUsageDetails:
      properties:
        cached_text_tokens:
          type: integer
        cached_image_tokens:
          type: integer
      type: object
      required:
        - cached_text_tokens
        - cached_image_tokens
    CacheMissReasonTypeEnum:
      type: string
      enum:
        - model_changed
        - prompt_cache_key_changed
        - tools_changed
        - text_format_changed
        - reasoning_effort_changed
        - verbosity_changed
        - context_compacted
        - input_changed
        - service_tier_changed
    ModerationInputType:
      type: string
      enum:
        - text
        - image
    OutputTextContent:
      properties:
        type:
          type: string
          enum:
            - output_text
          description: 输出文本的类型，始终为 `output_text`。
          default: output_text
        text:
          type: string
          description: 模型输出的文本内容。
        annotations:
          items:
            $ref: '#/components/schemas/Annotation'
          type: array
          description: 文本输出的注释。
        logprobs:
          items:
            $ref: '#/components/schemas/LogProb'
          type: array
      type: object
      required:
        - type
        - text
        - annotations
        - logprobs
      title: 输出文本
      description: 模型输出的文本。
    RefusalContent:
      properties:
        type:
          type: string
          enum:
            - refusal
          description: 拒绝的类型，始终为 `refusal`。
          default: refusal
        refusal:
          type: string
          description: 模型给出的拒绝说明。
      type: object
      required:
        - type
        - refusal
      title: 拒绝
      description: 模型的拒绝。
    FunctionShellCallOutputTimeoutOutcome:
      properties:
        type:
          type: string
          enum:
            - timeout
          description: 结果类型，始终为 `timeout`。
          default: timeout
      type: object
      required:
        - type
      title: Shell 调用超时结果
      description: 表示 Shell 调用超出了配置的时间限制。
    FunctionShellCallOutputExitOutcome:
      properties:
        type:
          type: string
          enum:
            - exit
          description: 结果类型，始终为 `exit`。
          default: exit
        exit_code:
          type: integer
          description: Shell 进程的退出码。
      type: object
      required:
        - type
        - exit_code
      title: Shell 调用退出结果
      description: 表示 shell 命令已结束并返回了退出码。
    FileCitationBody:
      properties:
        type:
          type: string
          enum:
            - file_citation
          description: 文件引用的类型，始终为 `file_citation`。
          default: file_citation
        file_id:
          type: string
          description: 文件的 ID。
        index:
          type: integer
          description: 在输出文本中插入文件引用的位置索引。
        filename:
          type: string
          description: 被引用文件的文件名。
      type: object
      required:
        - type
        - file_id
        - index
        - filename
      title: 文件引用
      description: 对文件的引用。
    UrlCitationBody:
      properties:
        type:
          type: string
          enum:
            - url_citation
          description: URL 引用的类型。始终为 `url_citation`。
          default: url_citation
        url:
          type: string
          format: uri
          description: 网络资源的 URL。
        start_index:
          type: integer
          description: URL 引用在消息中第一个字符的索引。
        end_index:
          type: integer
          description: URL 引用在消息中最后一个字符的索引。
        title:
          type: string
          description: 网络资源的标题。
      type: object
      required:
        - type
        - url
        - start_index
        - end_index
        - title
      title: URL 引用
      description: 对生成模型响应时所用网络资源的引用。
    ContainerFileCitationBody:
      properties:
        type:
          type: string
          enum:
            - container_file_citation
          description: 容器文件引用的类型，始终为 `container_file_citation`。
          default: container_file_citation
        container_id:
          type: string
          description: 容器文件的 ID。
        file_id:
          type: string
          description: 文件的 ID。
        start_index:
          type: integer
          description: 容器文件引用在消息中第一个字符的索引。
        end_index:
          type: integer
          description: 容器文件引用在消息中最后一个字符的索引。
        filename:
          type: string
          description: 被引用容器文件的文件名。
      type: object
      required:
        - type
        - container_id
        - file_id
        - start_index
        - end_index
        - filename
      title: 容器文件引用
      description: 对生成模型响应时所用容器文件的引用。
    FilePath:
      type: object
      title: 文件路径
      description: 文件路径。
      properties:
        type:
          type: string
          description: 文件路径的类型。始终为 `file_path`。
          enum:
            - file_path
        file_id:
          type: string
          description: 文件的 ID。
        index:
          type: integer
          description: 文件在文件列表中的索引。
      required:
        - type
        - file_id
        - index
    ResponseFormatText:
      type: object
      title: 文本
      description: 默认响应格式。用于生成文本响应。
      properties:
        type:
          type: string
          description: 所定义的响应格式类型。始终为 `text`。
          const: text
      required:
        - type
    TextResponseFormatJsonSchema:
      type: object
      title: JSON Schema
      description: >-
        JSON Schema 响应格式。用于生成结构化的 JSON 响应。详见
        [结构化输出](https://developers.openai.com/api/docs/guides/structured-outputs)。
      properties:
        type:
          type: string
          description: 所定义的响应格式类型。始终为 `json_schema`。
          enum:
            - json_schema
        description:
          type: string
          description: 响应格式用途的描述，模型据此决定如何按该格式进行响应。
        name:
          type: string
          description: 响应格式的名称。只能包含 a-z、A-Z、0-9、下划线和短横线，最大长度为 64。
        schema:
          $ref: '#/components/schemas/ResponseFormatJsonSchemaSchema'
        strict:
          anyOf:
            - type: boolean
              default: false
              description: >-
                生成输出时是否启用严格的 schema 遵循。设为 true 时，模型将始终严格遵循 `schema` 字段中定义的
                schema。当 `strict` 为 `true` 时，仅支持 JSON Schema 的一个子集。详见
                [结构化输出指南](https://developers.openai.com/api/docs/guides/structured-outputs)。
            - type: 'null'
      required:
        - type
        - schema
        - name
    ResponseFormatJsonObject:
      type: object
      title: JSON 对象
      description: >-
        JSON 对象响应格式。一种生成 JSON 响应的旧方法。对于支持 `json_schema` 的模型，推荐使用
        `json_schema`。注意，如果没有系统消息或用户消息指示模型生成 JSON，模型不会生成 JSON。
      properties:
        type:
          type: string
          description: 所定义的响应格式类型。始终为 `json_object`。
          const: json_object
      required:
        - type
    FunctionTool:
      properties:
        type:
          type: string
          enum:
            - function
          description: 函数工具的类型，始终为 `function`。
          default: function
        name:
          type: string
          description: 要调用的函数名称。
        async:
          type: boolean
        description:
          anyOf:
            - type: string
              description: 函数的描述，模型据此判断是否调用该函数。
            - type: 'null'
        parameters:
          anyOf:
            - additionalProperties: {}
              type: object
              description: 描述函数参数的 JSON Schema 对象。
            - type: 'null'
        output_schema:
          anyOf:
            - additionalProperties: {}
              type: object
              description: 描述该函数字符串输出中所编码 JSON 值的 JSON Schema 对象。
            - type: 'null'
        strict:
          anyOf:
            - type: boolean
              description: 是否对该函数工具强制执行严格的参数校验。
            - type: 'null'
        defer_loading:
          type: boolean
          description: 该函数是否延迟加载并通过工具搜索加载。
        allowed_callers:
          anyOf:
            - items:
                $ref: '#/components/schemas/CallableToolAllowedCaller'
              type: array
              description: 工具调用上下文。
            - type: 'null'
      type: object
      required:
        - type
        - name
        - strict
        - parameters
      title: 函数
      description: >-
        定义一个位于你自己代码中、可供模型选择调用的函数。详见[函数调用](https://developers.openai.com/api/docs/guides/function-calling)。
    FileSearchTool:
      properties:
        type:
          type: string
          enum:
            - file_search
          description: 文件搜索工具的类型，始终为 `file_search`。
          default: file_search
        vector_store_ids:
          items:
            type: string
          type: array
          description: 要搜索的向量存储 ID。
        max_num_results:
          type: integer
          description: 返回结果的最大数量，取值范围为 1 到 50（含）。
        ranking_options:
          $ref: '#/components/schemas/RankingOptions'
          description: 搜索的排序选项。
        filters:
          anyOf:
            - $ref: '#/components/schemas/Filters'
              description: 要应用的过滤条件。
            - type: 'null'
      type: object
      required:
        - type
        - vector_store_ids
      title: 文件搜索
      description: >-
        从已上传文件中搜索相关内容的工具。详见[文件搜索工具](https://developers.openai.com/api/docs/guides/tools-file-search)。
    ComputerTool:
      properties:
        type:
          type: string
          enum:
            - computer
          description: 计算机工具的类型，始终为 `computer`。
          default: computer
      type: object
      required:
        - type
      title: 计算机
      description: >-
        控制虚拟计算机的工具。详见[计算机工具](https://developers.openai.com/api/docs/guides/tools-computer-use)。
    ComputerUsePreviewTool:
      properties:
        type:
          type: string
          enum:
            - computer_use_preview
          description: 计算机使用工具的类型，始终为 `computer_use_preview`。
          default: computer_use_preview
        environment:
          $ref: '#/components/schemas/ComputerEnvironment'
          description: 要控制的计算机环境类型。
        display_width:
          type: integer
          description: 计算机显示器的宽度。
        display_height:
          type: integer
          description: 计算机显示器的高度。
      type: object
      required:
        - type
        - environment
        - display_width
        - display_height
      title: 计算机使用（预览版）
      description: >-
        控制虚拟计算机的工具。详见[计算机工具](https://developers.openai.com/api/docs/guides/tools-computer-use)。
    WebSearchTool:
      type: object
      title: 网页搜索
      description: >-
        在互联网上搜索与提示词相关的来源。详见[网页搜索工具](https://developers.openai.com/api/docs/guides/tools-web-search)。
      properties:
        type:
          type: string
          enum:
            - web_search
            - web_search_2025_08_26
          description: 网页搜索工具的类型，可选值为 `web_search`、`web_search_2025_08_26`。
          default: web_search
        external_web_access:
          type: boolean
          default: true
          description: 是否允许网页搜索实时访问互联网。省略时默认为 true。为 false 时，网页搜索工具以离线/仅缓存模式运行，不会抓取新的外部内容。
        filters:
          anyOf:
            - type: object
              description: 搜索过滤条件。
              properties:
                allowed_domains:
                  anyOf:
                    - type: array
                      title: 搜索允许的域名列表。
                      description: |-
                        搜索允许的域名。未提供时允许所有域名。所提供域名的子域名同样被允许。

                        示例：`["pubmed.ncbi.nlm.nih.gov"]`
                      items:
                        type: string
                        description: 搜索允许的域名。
                      default: []
                    - type: 'null'
            - type: 'null'
        user_location:
          $ref: '#/components/schemas/WebSearchApproximateLocation'
          description: >-
            用户的大致位置。省略或为 null 时默认为美国。如需避免这一回退行为，可传入不含位置字段的 `{"type":
            "approximate"}`。如需本地化结果，请提供相关位置字段。
        search_context_size:
          type: string
          enum:
            - low
            - medium
            - high
          default: medium
          description: 用于搜索的上下文窗口空间大小的总体指引。可选值为 `low`、`medium`、`high`，默认为 `medium`。
      required:
        - type
    MCPTool:
      type: object
      title: MCP 工具
      description: >-
        通过远程 Model Context Protocol（MCP）服务器让模型使用更多工具。[了解更多关于 MCP
        的信息](https://developers.openai.com/api/docs/guides/tools-connectors-mcp)。
      properties:
        type:
          type: string
          const: mcp
          description: MCP 工具的类型。始终为 `mcp`。
        server_label:
          type: string
          description: 此 MCP 服务器的标签，用于在工具调用中标识该服务器。
        server_url:
          type: string
          format: uri
          description: MCP 服务器的 URL。必须提供 `server_url`、`connector_id` 或 `tunnel_id` 其中之一。
        connector_id:
          type: string
          deprecated: true
          enum:
            - connector_dropbox
            - connector_gmail
            - connector_googlecalendar
            - connector_googledrive
            - connector_microsoftteams
            - connector_outlookcalendar
            - connector_outlookemail
            - connector_sharepoint
          description: >-
            服务连接器的标识符，例如 ChatGPT 中提供的连接器。必须提供 `server_url`、`connector_id` 或
            `tunnel_id` 其中之一。关于服务连接器的更多信息请参阅
            [此处](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors)。


            对于 2026 年 9 月 1 日之后发布的模型，此字段已弃用。请使用 `server_url` 连接远程 MCP 服务器，或使用
            `tunnel_id` 通过 Secure MCP Tunnel 连接。


            目前支持的 `connector_id` 值有：


            - Dropbox：`connector_dropbox`

            - Gmail：`connector_gmail`

            - Google Calendar：`connector_googlecalendar`

            - Google Drive：`connector_googledrive`

            - Microsoft Teams：`connector_microsoftteams`

            - Outlook Calendar：`connector_outlookcalendar`

            - Outlook Email：`connector_outlookemail`

            - SharePoint：`connector_sharepoint`
        tunnel_id:
          type: string
          pattern: ^tunnel_[a-z0-9]{32}$
          description: >-
            用于代替直接服务器 URL 的 Secure MCP Tunnel ID。必须提供
            `server_url`、`connector_id` 或 `tunnel_id` 其中之一。
        authorization:
          type: string
          description: >-
            可用于远程 MCP 服务器的 OAuth 访问令牌，适用于自定义 MCP 服务器 URL 或服务连接器。应用必须自行处理 OAuth
            授权流程，并在此处提供令牌。
        server_description:
          type: string
          description: MCP 服务器的可选描述，用于提供更多上下文。
        headers:
          anyOf:
            - type: object
              additionalProperties:
                type: string
              description: 发送给 MCP 服务器的可选 HTTP 请求头。可用于身份验证或其他用途。
            - type: 'null'
        allowed_tools:
          anyOf:
            - description: 允许的工具名称列表或过滤器对象。
              oneOf:
                - type: array
                  title: MCP 允许的工具
                  description: 允许的工具名称字符串数组
                  items:
                    type: string
                - $ref: '#/components/schemas/MCPToolFilter'
            - type: 'null'
        allowed_callers:
          anyOf:
            - type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/CallableToolAllowedCaller'
              description: 工具调用上下文。
            - type: 'null'
        require_approval:
          anyOf:
            - description: 指定 MCP 服务器上的哪些工具需要审批。
              oneOf:
                - type: object
                  title: MCP 工具审批过滤器
                  description: 指定 MCP 服务器上的哪些工具需要审批。可以是 `always`、`never`，或与需要审批的工具关联的过滤器对象。
                  properties:
                    always:
                      $ref: '#/components/schemas/MCPToolFilter'
                    never:
                      $ref: '#/components/schemas/MCPToolFilter'
                  additionalProperties: false
                - type: string
                  title: MCP 工具审批设置
                  description: >-
                    为所有工具指定统一的审批策略。可选值为 `always` 或 `never`。设为 `always`
                    时，所有工具都需要审批；设为 `never` 时，所有工具都不需要审批。
                  enum:
                    - always
                    - never
              default: always
            - type: 'null'
        defer_loading:
          type: boolean
          description: 此 MCP 工具是否延迟加载并通过工具搜索发现。
      required:
        - type
        - server_label
    CodeInterpreterTool:
      type: object
      title: 代码解释器
      description: 运行 Python 代码以帮助生成提示词响应的工具。
      properties:
        type:
          type: string
          enum:
            - code_interpreter
          description: 代码解释器工具的类型。始终为 `code_interpreter`。
        container:
          description: >-
            代码解释器容器。可以是容器 ID，也可以是一个对象，用于指定提供给代码使用的已上传文件 ID，以及可选的 `memory_limit`
            设置。
          oneOf:
            - type: string
              description: 容器 ID。
            - $ref: '#/components/schemas/AutoCodeInterpreterToolParam'
        allowed_callers:
          anyOf:
            - type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/CallableToolAllowedCaller'
              description: 工具调用上下文。
            - type: 'null'
      required:
        - type
        - container
    ProgrammaticToolCallingParam:
      properties:
        type:
          type: string
          enum:
            - programmatic_tool_calling
          description: 工具类型，始终为 `programmatic_tool_calling`。
          default: programmatic_tool_calling
      type: object
      required:
        - type
    ImageGenTool:
      type: object
      title: 图像生成工具
      description: 使用 GPT 图像模型生成图像的工具。
      properties:
        type:
          type: string
          enum:
            - image_generation
          description: 图像生成工具的类型。始终为 `image_generation`。
        model:
          anyOf:
            - type: string
            - type: string
              enum:
                - gpt-image-1
                - gpt-image-1-mini
                - gpt-image-2
                - gpt-image-2-2026-04-21
                - gpt-image-2.5-sunburst
                - gpt-image-2.5-sunburst-2026-09-08
                - gpt-image-2.5-flare
                - gpt-image-2.5-flare-2026-09-08
                - gpt-image-2.6-sunburst
                - gpt-image-2.6-flare
                - gpt-image-1.5
                - chatgpt-image-latest
              description: >-
                要使用的图像生成模型。可选值为
                `gpt-image-1-mini`、`gpt-image-1.5`、`gpt-image-2`、`gpt-image-2-2026-04-21`、`gpt-image-2.5-sunburst`、`gpt-image-2.5-sunburst-2026-09-08`、`gpt-image-2.5-flare`、`gpt-image-2.5-flare-2026-09-08`、`gpt-image-2.6-sunburst`、`gpt-image-2.6-flare`
                或 `chatgpt-image-latest`。默认为 `gpt-image-2.6-sunburst`。


                `gpt-image-1` 已于 2026 年 10 月 23 日下线。请改用 `gpt-image-2.5-sunburst`
                或 `gpt-image-2.5-flare`。
              default: gpt-image-2.6-sunburst
        complexity:
          type: string
          enum:
            - low
            - medium
            - high
          description: >-
            用于规划图像的计算量，与渲染质量无关。对图像生成而言会覆盖外层响应的
            `reasoning.effort`。省略时，继承受支持的外层推理强度，或使用图像模型配置的默认值。对于 SVG
            输出，控制的是参考图像，而不是 SVG 作者的推理。
        quality:
          type: string
          enum:
            - low
            - medium
            - high
            - xhigh
            - max
            - auto
          description: >-
            生成图像的质量。GPT 图像模型支持 `low`、`medium` 和 `high`。`gpt-image-2.5-sunburst`
            和 `gpt-image-2.5-flare`（包括其 `2026-09-08` 快照）还支持 `xhigh` 和 `max`。默认为
            `auto`。
          default: auto
        size:
          anyOf:
            - type: string
            - type: string
              enum:
                - 1024x1024
                - 1024x1536
                - 1536x1024
                - auto
          description: >-
            生成图像的尺寸。对于
            `gpt-image-2`、`gpt-image-2-2026-04-21`、`gpt-image-2.5-sunburst`、`gpt-image-2.5-sunburst-2026-09-08`、`gpt-image-2.5-flare`
            和 `gpt-image-2.5-flare-2026-09-08`，支持以 `WIDTHxHEIGHT` 字符串指定任意分辨率，例如
            `1536x864`。宽和高都必须能被 16 整除，且请求的宽高比必须在 1:3 到 3:1 之间。高于 `2560x1440`
            的分辨率为实验性功能，支持的最大分辨率为 `3840x2160`。请求的尺寸还必须满足模型当前的像素数和边长限制。GPT
            图像模型支持标准尺寸 `1024x1024`、`1536x1024` 和 `1024x1536`；允许自动确定尺寸的模型支持
            `auto`。
          default: auto
        output_format:
          type: string
          enum:
            - png
            - webp
            - jpeg
            - gif
            - svg
          description: >-
            生成图像的输出格式。可选值为 `png`、`webp`、`jpeg`、`gif` 或 `svg`。默认为 `png`。GIF 和 SVG
            输出需要支持所选格式的模型。GIF 输出不支持部分图像流式传输（`partial_images` 大于
            `0`）、`input_image_mask` 或自定义 `output_compression`。对于 GIF 输出，仍可流式传输
            Responses 生命周期事件。
          default: png
        frame_count:
          type: integer
          minimum: 2
          maximum: 16
          default: 9
          description: GIF 帧数。要求 `output_format` 为 `gif`。默认为 9。
        frame_duration_ms:
          type: integer
          minimum: 20
          maximum: 2000
          default: 200
          description: 每个 GIF 帧的时长（毫秒），按 10 ms 取整。要求 `output_format` 为 `gif`。默认为 200。
        svg:
          $ref: '#/components/schemas/SvgParam'
          description: >-
            SVG 作者模型设置。要求 `output_format` 为 `svg`。启用 SVG
            模型选择时，省略此对象将使用外层响应的模型。否则使用默认的 SVG 作者，且无法显式覆盖模型。
        output_compression:
          type: integer
          minimum: 0
          maximum: 100
          description: 输出图像的压缩级别。默认为 100。
          default: 100
        moderation:
          type: string
          enum:
            - auto
            - low
          description: 生成图像的内容审核级别。默认为 `auto`。
          default: auto
        background:
          type: string
          enum:
            - transparent
            - opaque
            - auto
          description: >-
            设置生成图像的背景。可选值为 `transparent`、`opaque` 或
            `auto`。`gpt-image-2.5-sunburst` 和 `gpt-image-2.5-flare`（包括其
            `2026-09-08` 快照）支持 `opaque` 和 `transparent` 背景。受支持的 GPT Image
            模型可使用透明背景。对于 `gpt-image-2` 和 `gpt-image-2-2026-04-21`，该支持处于预览阶段。使用
            `transparent` 时，请将输出格式设为 `png` 或 `webp`。默认为 `auto`。
          default: auto
        input_fidelity:
          anyOf:
            - $ref: '#/components/schemas/InputFidelity'
            - type: 'null'
        input_image_mask:
          type: object
          description: 用于局部重绘的可选蒙版。包含 `image_url`（字符串，可选）和 `file_id`（字符串，可选）。
          properties:
            image_url:
              type: string
              description: Base64 编码的蒙版图像。
            file_id:
              type: string
              description: 蒙版图像的文件 ID。
          required: []
          additionalProperties: false
        partial_images:
          type: integer
          minimum: 0
          maximum: 3
          description: 流式模式下生成的部分图像数量，取值范围为 0（默认值）到 3。
          default: 0
        action:
          $ref: '#/components/schemas/ImageGenActionEnum'
          description: 生成新图像还是编辑现有图像。默认为 `auto`。
      required:
        - type
    LocalShellToolParam:
      properties:
        type:
          type: string
          enum:
            - local_shell
          description: 本地 Shell 工具的类型，始终为 `local_shell`。
          default: local_shell
      type: object
      required:
        - type
      title: 本地 Shell 工具
      description: 允许模型在本地环境中执行 shell 命令的工具。
    FunctionShellToolParam:
      properties:
        type:
          type: string
          enum:
            - shell
          description: Shell 工具的类型，始终为 `shell`。
          default: shell
        environment:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ContainerAutoParam'
                - $ref: '#/components/schemas/LocalEnvironmentParam'
                - $ref: '#/components/schemas/ContainerReferenceParam'
              discriminator:
                propertyName: type
            - type: 'null'
        allowed_callers:
          anyOf:
            - type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/CallableToolAllowedCaller'
              description: 工具调用上下文。
            - type: 'null'
      type: object
      required:
        - type
      title: Shell 工具
      description: 允许模型执行 shell 命令的工具。
    CustomToolParam:
      properties:
        type:
          type: string
          enum:
            - custom
          description: 自定义工具的类型。始终为 `custom`。
          default: custom
        name:
          type: string
          description: 自定义工具的名称，用于在工具调用中标识该工具。
        async:
          type: boolean
          description: 工具响应是否可以异步返回，而非在下一次创建响应时立即返回。
        description:
          type: string
          description: 自定义工具的可选描述，用于提供更多上下文。
        format:
          oneOf:
            - $ref: '#/components/schemas/CustomTextFormatParam'
            - $ref: '#/components/schemas/CustomGrammarFormatParam'
          description: 自定义工具的输入格式。默认为不受约束的文本。
          discriminator:
            propertyName: type
        defer_loading:
          type: boolean
          description: 该工具是否延迟加载并通过工具搜索发现。
        allowed_callers:
          anyOf:
            - type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/CallableToolAllowedCaller'
              description: 工具调用上下文。
            - type: 'null'
      type: object
      required:
        - type
        - name
      title: 自定义工具
      description: >-
        按指定格式处理输入的自定义工具。详见[自定义工具](https://developers.openai.com/api/docs/guides/function-calling#custom-tools)
    NamespaceToolParam:
      properties:
        type:
          type: string
          enum:
            - namespace
          description: 工具类型，始终为 `namespace`。
          default: namespace
        name:
          type: string
          minLength: 1
          description: 工具调用中使用的命名空间名称（例如 `crm`）。
        description:
          type: string
          description: 向模型展示的命名空间描述。
        tools:
          items:
            oneOf:
              - $ref: '#/components/schemas/FunctionToolParam'
              - $ref: '#/components/schemas/CustomToolParam'
            description: 属于某个命名空间的函数或自定义工具。
            discriminator:
              propertyName: type
          type: array
          minItems: 1
          description: 该命名空间中可用的函数/自定义工具。
      type: object
      required:
        - type
        - name
        - description
        - tools
      title: 命名空间
      description: 将函数/自定义工具归入同一个共享命名空间。
    ToolSearchToolParam:
      properties:
        type:
          type: string
          enum:
            - tool_search
          description: 工具类型，始终为 `tool_search`。
          default: tool_search
        execution:
          $ref: '#/components/schemas/ToolSearchExecutionType'
          description: 工具搜索由服务端执行还是由客户端执行。
        description:
          anyOf:
            - type: string
              description: 客户端执行的工具搜索工具向模型展示的描述。
            - type: 'null'
        parameters:
          anyOf:
            - $ref: '#/components/schemas/EmptyModelParam'
              description: 客户端执行的工具搜索工具的参数 Schema。
            - type: 'null'
      type: object
      required:
        - type
      title: 工具搜索工具
      description: 针对延迟加载工具的托管式或 BYOT（自带工具）工具搜索配置。
    WebSearchPreviewTool:
      properties:
        type:
          type: string
          enum:
            - web_search_preview
            - web_search_preview_2025_03_11
          description: 网页搜索工具的类型，可选值为 `web_search_preview`、`web_search_preview_2025_03_11`。
          default: web_search_preview
        user_location:
          anyOf:
            - $ref: '#/components/schemas/ApproximateLocation'
              description: >-
                用户的大致位置。省略或为 null 时默认为美国。如需避免这一回退行为，可传入不含位置字段的 `{"type":
                "approximate"}`。如需本地化结果，请提供相关位置字段。
            - type: 'null'
        search_context_size:
          $ref: '#/components/schemas/SearchContextSize'
          description: 用于搜索的上下文窗口空间大小的总体指引。可选值为 `low`、`medium`、`high`，默认为 `medium`。
        search_content_types:
          items:
            $ref: '#/components/schemas/SearchContentType'
          type: array
      type: object
      required:
        - type
      title: 网页搜索（预览版）
      description: >-
        该工具在网络上搜索相关结果，供生成响应时使用。详见[网页搜索工具](https://developers.openai.com/api/docs/guides/tools-web-search)。
    ApplyPatchToolParam:
      properties:
        type:
          type: string
          enum:
            - apply_patch
          description: 工具类型，始终为 `apply_patch`。
          default: apply_patch
        allowed_callers:
          anyOf:
            - type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/CallableToolAllowedCaller'
              description: 工具调用上下文。
            - type: 'null'
      type: object
      required:
        - type
      title: 应用补丁工具
      description: 允许助手使用统一 diff 格式创建、删除或更新文件。
    InputTextContent:
      properties:
        type:
          type: string
          enum:
            - input_text
          description: 输入项的类型，始终为 `input_text`。
          default: input_text
        text:
          type: string
          description: 输入给模型的文本内容。
        prompt_cache_breakpoint:
          $ref: '#/components/schemas/PromptCacheBreakpointConfig'
      type: object
      required:
        - type
        - text
      title: 输入文本
      description: 输入给模型的文本。
    InputImageContent:
      properties:
        type:
          type: string
          enum:
            - input_image
          description: 输入项的类型，始终为 `input_image`。
          default: input_image
        image_url:
          anyOf:
            - type: string
              format: uri
              description: 要发送给模型的图片 URL。可以是完整的 URL，也可以是 data URL 形式的 base64 编码图片。
            - type: 'null'
        file_id:
          anyOf:
            - type: string
              description: 要发送给模型的文件 ID。
            - type: 'null'
        detail:
          $ref: '#/components/schemas/ImageDetail'
          description: 要发送给模型的图片的细节级别。可选值为 `high`、`low`、`auto`、`original`，默认为 `auto`。
        prompt_cache_breakpoint:
          $ref: '#/components/schemas/PromptCacheBreakpointConfig'
      type: object
      required:
        - type
        - detail
      title: 输入图片
      description: >-
        输入给模型的图片。详见[图片输入](https://developers.openai.com/api/docs/guides/images-vision)。
    InputFileContent:
      properties:
        type:
          type: string
          enum:
            - input_file
          description: 输入项的类型，始终为 `input_file`。
          default: input_file
        file_id:
          anyOf:
            - type: string
              description: 要发送给模型的文件 ID。
            - type: 'null'
        filename:
          type: string
          description: 要发送给模型的文件名称。
        file_data:
          type: string
          description: 要发送给模型的文件内容。
        prompt_cache_breakpoint:
          $ref: '#/components/schemas/PromptCacheBreakpointConfig'
        file_url:
          type: string
          format: uri
          description: 要发送给模型的文件 URL。
        detail:
          $ref: '#/components/schemas/FileInputDetail'
          description: >-
            要发送给模型的文件的细节级别。使用 `auto` 由系统自动选择细节级别；对于 GPT-5.6 及更新的模型，`auto`
            采用高质量渲染，可能会增加输入 Token 用量。使用 `low` 以较低成本渲染，或使用 `high` 以更高质量渲染文件。默认为
            `auto`。
      type: object
      required:
        - type
      title: 输入文件
      description: 输入给模型的文件。
    ModerationMode:
      type: string
      enum:
        - score
        - block
    DirectToolCallCaller:
      properties:
        type:
          type: string
          enum:
            - direct
          default: direct
      type: object
      required:
        - type
    ProgramToolCallCaller:
      properties:
        type:
          type: string
          enum:
            - program
          default: program
        caller_id:
          type: string
          description: 产生此工具调用的程序项的调用 ID。
      type: object
      required:
        - type
        - caller_id
    ToolCallCallerParam:
      oneOf:
        - $ref: '#/components/schemas/DirectToolCallCallerParam'
        - $ref: '#/components/schemas/ProgramToolCallCallerParam'
      description: 产生此工具调用的执行上下文。
      discriminator:
        propertyName: type
    FunctionAndCustomToolCallOutput:
      oneOf:
        - $ref: '#/components/schemas/InputTextContent'
        - $ref: '#/components/schemas/InputImageContent'
        - $ref: '#/components/schemas/InputFileContent'
      discriminator:
        propertyName: type
    ClickParam:
      properties:
        type:
          type: string
          enum:
            - click
          description: 指定事件类型。对于点击操作，该属性始终为 `click`。
          default: click
        button:
          $ref: '#/components/schemas/ClickButtonType'
          description: 点击时按下的鼠标按键。可选值为 `left`、`right`、`wheel`、`back`、`forward`。
        x:
          type: integer
          description: 点击发生位置的 x 坐标。
        'y':
          type: integer
          description: 点击发生位置的 y 坐标。
        keys:
          anyOf:
            - items:
                type: string
              type: array
              description: 点击时按住的按键。
            - type: 'null'
      type: object
      required:
        - type
        - button
        - x
        - 'y'
      title: 点击
      description: 点击操作。
    DoubleClickAction:
      properties:
        type:
          type: string
          enum:
            - double_click
          description: 指定事件类型。对于双击操作，该属性始终为 `double_click`。
          default: double_click
        x:
          type: integer
          description: 双击发生位置的 x 坐标。
        'y':
          type: integer
          description: 双击发生位置的 y 坐标。
        keys:
          anyOf:
            - items:
                type: string
              type: array
              description: 双击时按住的按键。
            - type: 'null'
      type: object
      required:
        - type
        - x
        - 'y'
        - keys
      title: 双击
      description: 双击操作。
    DragParam:
      properties:
        type:
          type: string
          enum:
            - drag
          description: 指定事件类型。对于拖拽操作，该属性始终为 `drag`。
          default: drag
        path:
          items:
            $ref: '#/components/schemas/CoordParam'
          type: array
          description: |-
            表示拖拽路径的坐标数组。坐标以对象数组的形式呈现，例如
            ```
            [
              { x: 100, y: 200 },
              { x: 200, y: 300 }
            ]
            ```
        keys:
          anyOf:
            - items:
                type: string
              type: array
              description: 拖动鼠标时按住的按键。
            - type: 'null'
      type: object
      required:
        - type
        - path
      title: 拖拽
      description: 拖拽操作。
    KeyPressAction:
      properties:
        type:
          type: string
          enum:
            - keypress
          description: 指定事件类型。对于按键操作，该属性始终为 `keypress`。
          default: keypress
        keys:
          items:
            type: string
            description: 模型请求按下的其中一个按键。
          type: array
          description: 模型请求按下的组合键。这是一个字符串数组，每个字符串代表一个按键。
      type: object
      required:
        - type
        - keys
      title: 按键
      description: 模型希望执行的一组按键操作。
    MoveParam:
      properties:
        type:
          type: string
          enum:
            - move
          description: 指定事件类型。对于移动操作，该属性始终为 `move`。
          default: move
        x:
          type: integer
          description: 要移动到的 x 坐标。
        'y':
          type: integer
          description: 要移动到的 y 坐标。
        keys:
          anyOf:
            - items:
                type: string
              type: array
              description: 移动鼠标时按住的按键。
            - type: 'null'
      type: object
      required:
        - type
        - x
        - 'y'
      title: 移动
      description: 鼠标移动操作。
    ScreenshotParam:
      properties:
        type:
          type: string
          enum:
            - screenshot
          description: 指定事件类型。对于截图操作，该属性始终为 `screenshot`。
          default: screenshot
      type: object
      required:
        - type
      title: 截图
      description: 截图操作。
    ScrollParam:
      properties:
        type:
          type: string
          enum:
            - scroll
          description: 指定事件类型。对于滚动操作，该属性始终为 `scroll`。
          default: scroll
        x:
          type: integer
          description: 滚动发生位置的 x 坐标。
        'y':
          type: integer
          description: 滚动发生位置的 y 坐标。
        scroll_x:
          type: integer
          description: 水平滚动距离。
        scroll_y:
          type: integer
          description: 垂直滚动距离。
        keys:
          anyOf:
            - items:
                type: string
              type: array
              description: 滚动时按住的按键。
            - type: 'null'
      type: object
      required:
        - type
        - x
        - 'y'
        - scroll_x
        - scroll_y
      title: 滚动
      description: 滚动操作。
    TypeParam:
      properties:
        type:
          type: string
          enum:
            - type
          description: 指定事件类型。对于输入操作，该属性始终为 `type`。
          default: type
        text:
          type: string
          description: 要输入的文本。
      type: object
      required:
        - type
        - text
      title: 输入
      description: 输入文本的操作。
    WaitParam:
      properties:
        type:
          type: string
          enum:
            - wait
          description: 指定事件类型。对于等待操作，该属性始终为 `wait`。
          default: wait
      type: object
      required:
        - type
      title: 等待
      description: 等待操作。
    ComputerScreenshotImage:
      type: object
      description: 与计算机使用工具配合使用的计算机截图图像。
      properties:
        type:
          type: string
          const: computer_screenshot
          default: computer_screenshot
          description: 指定事件类型。对于计算机截图，此属性始终设为 `computer_screenshot`。
        image_url:
          type: string
          format: uri
          description: 截图图像的 URL。
        file_id:
          type: string
          description: 包含截图的已上传文件的标识符。
      required:
        - type
    ImageGenToolCallModerationDetails:
      properties:
        moderation_stage:
          type: string
          enum:
            - input
            - output
            - unknown
          description: 内容审核拦截图像生成调用的阶段。
        categories:
          items:
            type: string
          type: array
          description: 公开的内容审核类别。后续可能会新增类别值。
      type: object
      required:
        - moderation_stage
        - categories
    MCPProtocolError:
      properties:
        type:
          type: string
          enum:
            - mcp_protocol_error
          default: mcp_protocol_error
        code:
          type: integer
        message:
          type: string
      type: object
      required:
        - type
        - code
        - message
    MCPToolExecutionError:
      properties:
        type:
          type: string
          enum:
            - mcp_tool_execution_error
          default: mcp_tool_execution_error
        content: {}
      type: object
      required:
        - type
        - content
    HTTPError:
      properties:
        type:
          type: string
          enum:
            - http_error
          default: http_error
        code:
          type: integer
        message:
          type: string
      type: object
      required:
        - type
        - code
        - message
    InputContent:
      oneOf:
        - $ref: '#/components/schemas/InputTextContent'
        - $ref: '#/components/schemas/InputImageContent'
        - $ref: '#/components/schemas/InputFileContent'
      discriminator:
        propertyName: type
    FunctionCallItemStatus:
      type: string
      enum:
        - in_progress
        - completed
        - incomplete
    InputTextContentParam:
      properties:
        type:
          type: string
          enum:
            - input_text
          description: 输入项的类型，始终为 `input_text`。
          default: input_text
        text:
          type: string
          maxLength: 10485760
          description: 输入给模型的文本内容。
        prompt_cache_breakpoint:
          anyOf:
            - $ref: '#/components/schemas/PromptCacheBreakpointParam'
            - type: 'null'
      type: object
      required:
        - type
        - text
      title: 输入文本
      description: 输入给模型的文本。
    InputImageContentParamAutoParam:
      properties:
        type:
          type: string
          enum:
            - input_image
          description: 输入项的类型，始终为 `input_image`。
          default: input_image
        image_url:
          anyOf:
            - type: string
              maxLength: 20971520
              format: uri
              description: 要发送给模型的图片 URL。可以是完整的 URL，也可以是 data URL 形式的 base64 编码图片。
            - type: 'null'
        file_id:
          anyOf:
            - type: string
              description: 要发送给模型的文件 ID。
              example: file-123
            - type: 'null'
        detail:
          anyOf:
            - $ref: '#/components/schemas/DetailEnum'
              description: 要发送给模型的图片的细节级别。可选值为 `high`、`low`、`auto`、`original`，默认为 `auto`。
            - type: 'null'
        prompt_cache_breakpoint:
          anyOf:
            - $ref: '#/components/schemas/PromptCacheBreakpointParam'
            - type: 'null'
      type: object
      required:
        - type
      title: 输入图片
      description: >-
        输入给模型的图片。详见[图片输入](https://developers.openai.com/api/docs/guides/images-vision)
    InputFileContentParam:
      properties:
        type:
          type: string
          enum:
            - input_file
          description: 输入项的类型，始终为 `input_file`。
          default: input_file
        file_id:
          anyOf:
            - type: string
              description: 要发送给模型的文件 ID。
              example: file-123
            - type: 'null'
        filename:
          anyOf:
            - type: string
              description: 要发送给模型的文件名称。
            - type: 'null'
        file_data:
          anyOf:
            - type: string
              maxLength: 73400320
              description: 要发送给模型的文件的 base64 编码数据。
            - type: 'null'
        file_url:
          anyOf:
            - type: string
              format: uri
              description: 要发送给模型的文件 URL。
            - type: 'null'
        detail:
          $ref: '#/components/schemas/FileDetailEnum'
          description: >-
            要发送给模型的文件的细节级别。使用 `auto` 由系统自动选择细节级别；对于 GPT-5.6 及更新的模型，`auto`
            采用高质量渲染，可能会增加输入 Token 用量。使用 `low` 以较低成本渲染，或使用 `high` 以更高质量渲染文件。默认为
            `auto`。
        prompt_cache_breakpoint:
          anyOf:
            - $ref: '#/components/schemas/PromptCacheBreakpointParam'
            - type: 'null'
      type: object
      required:
        - type
      title: 输入文件
      description: 输入给模型的文件。
    EmptyModelParam:
      properties: {}
      type: object
      required: []
    ToolSearchOutputTool:
      description: 由工具搜索输出返回的工具定义。
      discriminator:
        propertyName: type
      oneOf:
        - $ref: '#/components/schemas/FunctionTool'
        - $ref: '#/components/schemas/FileSearchTool'
        - $ref: '#/components/schemas/ComputerTool'
        - $ref: '#/components/schemas/ComputerUsePreviewTool'
        - $ref: '#/components/schemas/WebSearchTool'
        - $ref: '#/components/schemas/MCPTool'
        - $ref: '#/components/schemas/CodeInterpreterTool'
        - $ref: '#/components/schemas/ProgrammaticToolCallingParam'
        - $ref: '#/components/schemas/ImageGenTool'
        - $ref: '#/components/schemas/LocalShellToolParam'
        - $ref: '#/components/schemas/FunctionShellToolParam'
        - $ref: '#/components/schemas/CustomToolParam'
        - $ref: '#/components/schemas/ToolSearchOutputNamespaceToolParam'
        - $ref: '#/components/schemas/ToolSearchToolParam'
        - $ref: '#/components/schemas/WebSearchPreviewTool'
        - $ref: '#/components/schemas/ApplyPatchToolParam'
    FunctionShellActionParam:
      properties:
        commands:
          items:
            type: string
          type: array
          description: 由执行环境按顺序运行的 shell 命令。
        timeout_ms:
          anyOf:
            - type: integer
              description: 允许 shell 命令运行的最长实际耗时（毫秒）。
            - type: 'null'
        max_output_length:
          anyOf:
            - type: integer
              description: 从 stdout 与 stderr 合并输出中捕获的最大 UTF-8 字符数。
            - type: 'null'
      type: object
      required:
        - commands
      title: Shell 操作
      description: 描述如何运行 Shell 工具调用的命令及限制。
    FunctionShellCallItemStatus:
      type: string
      enum:
        - in_progress
        - completed
        - incomplete
      title: Shell 调用状态
      description: Shell 工具调用上报的状态值。
    LocalEnvironmentParam:
      properties:
        type:
          type: string
          enum:
            - local
          description: 使用本地计算机环境。
          default: local
        skills:
          items:
            $ref: '#/components/schemas/LocalSkillParam'
          type: array
          maxItems: 200
          description: 可选的技能列表。
      type: object
      required:
        - type
    ContainerReferenceParam:
      properties:
        type:
          type: string
          enum:
            - container_reference
          description: 引用通过 /v1/containers 端点创建的容器
          default: container_reference
        container_id:
          type: string
          description: 被引用容器的 ID。
          example: cntr_123
      type: object
      required:
        - type
        - container_id
    FunctionShellCallOutputContentParam:
      properties:
        stdout:
          type: string
          maxLength: 10485760
          description: Shell 调用捕获的 stdout 输出。
        stderr:
          type: string
          maxLength: 10485760
          description: Shell 调用捕获的 stderr 输出。
        outcome:
          $ref: '#/components/schemas/FunctionShellCallOutputOutcomeParam'
          description: 与该 Shell 调用关联的退出或超时结果。
      type: object
      required:
        - stdout
        - stderr
        - outcome
      title: Shell 输出内容
      description: Shell 工具调用输出中某一部分所捕获的 stdout 和 stderr。
    ApplyPatchCallStatusParam:
      type: string
      enum:
        - in_progress
        - completed
      title: 应用补丁调用状态
      description: apply_patch 工具调用上报的状态值。
    ApplyPatchOperationParam:
      oneOf:
        - $ref: '#/components/schemas/ApplyPatchCreateFileOperationParam'
        - $ref: '#/components/schemas/ApplyPatchDeleteFileOperationParam'
        - $ref: '#/components/schemas/ApplyPatchUpdateFileOperationParam'
      title: 应用补丁操作
      description: 提供给 apply_patch 工具的 create_file、delete_file 或 update_file 操作之一。
      discriminator:
        propertyName: type
    ApplyPatchCallOutputStatusParam:
      type: string
      enum:
        - completed
        - failed
      title: 应用补丁调用输出状态
      description: apply_patch 工具调用输出上报的结果值。
    LogProb:
      properties:
        token:
          type: string
        logprob:
          type: number
        bytes:
          items:
            type: integer
          type: array
        top_logprobs:
          items:
            $ref: '#/components/schemas/TopLogProb'
          type: array
      type: object
      required:
        - token
        - logprob
        - bytes
        - top_logprobs
      title: 对数概率
      description: 某个 Token 的对数概率。
    ResponseFormatJsonSchemaSchema:
      type: object
      title: JSON Schema
      description: >-
        响应格式的 schema，以 JSON Schema 对象描述。如何构建 JSON Schema 请参阅
        [此处](https://json-schema.org/)。
      additionalProperties: true
    CallableToolAllowedCaller:
      type: string
      enum:
        - direct
        - programmatic
    RankingOptions:
      properties:
        ranker:
          $ref: '#/components/schemas/RankerVersionType'
          description: 文件搜索使用的排序器。
        score_threshold:
          type: number
          description: 文件搜索的分数阈值，取值为 0 到 1 之间的数字。越接近 1，越倾向于只返回最相关的结果，但返回的结果可能更少。
        hybrid_search:
          $ref: '#/components/schemas/HybridSearchOptions'
          description: 启用混合搜索时，用于控制倒数排名融合如何平衡语义嵌入匹配与稀疏关键词匹配的权重。
      type: object
      required: []
    Filters:
      anyOf:
        - $ref: '#/components/schemas/ComparisonFilter'
        - $ref: '#/components/schemas/CompoundFilter'
    ComputerEnvironment:
      type: string
      enum:
        - windows
        - mac
        - linux
        - ubuntu
        - browser
    WebSearchApproximateLocation:
      anyOf:
        - type: object
          title: 网页搜索大致位置
          description: 用户的大致位置。
          properties:
            type:
              type: string
              const: approximate
              description: 位置近似类型，始终为 `approximate`。
              default: approximate
            country:
              anyOf:
                - type: string
                  description: >-
                    用户所在国家/地区的两位字母 [ISO
                    国家代码](https://en.wikipedia.org/wiki/ISO_3166-1)，例如 `US`。
                - type: 'null'
            region:
              anyOf:
                - type: string
                  description: 用户所在地区的自由文本输入，例如 `California`。
                - type: 'null'
            city:
              anyOf:
                - type: string
                  description: 用户所在城市的自由文本输入，例如 `San Francisco`。
                - type: 'null'
            timezone:
              anyOf:
                - type: string
                  description: >-
                    用户的 [IANA
                    时区](https://timeapi.io/documentation/iana-timezones)，例如
                    `America/Los_Angeles`。
                - type: 'null'
        - type: 'null'
    MCPToolFilter:
      type: object
      title: MCP 工具过滤器
      description: 用于指定允许哪些工具的过滤器对象。
      properties:
        tool_names:
          type: array
          title: MCP 允许的工具
          items:
            type: string
          description: 允许的工具名称列表。
        read_only:
          type: boolean
          description: >-
            表示工具是否会修改数据，还是只读。如果 MCP 服务器 [带有 `readOnlyHint`
            注释](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint)，则会匹配此过滤器。
      required: []
      additionalProperties: false
    AutoCodeInterpreterToolParam:
      properties:
        type:
          type: string
          enum:
            - auto
          description: 始终为 `auto`。
          default: auto
        file_ids:
          items:
            type: string
            example: file-123
          type: array
          maxItems: 50
          description: 可供代码使用的已上传文件的可选列表。
        memory_limit:
          anyOf:
            - $ref: '#/components/schemas/ContainerMemoryLimit'
              description: 代码解释器容器的内存上限。
            - type: 'null'
        network_policy:
          oneOf:
            - $ref: '#/components/schemas/ContainerNetworkPolicyDisabledParam'
            - $ref: '#/components/schemas/ContainerNetworkPolicyAllowlistParam'
          description: 容器的网络访问策略。
          discriminator:
            propertyName: type
      type: object
      required:
        - type
      title: CodeInterpreterToolAuto
      description: 代码解释器容器的配置。可选择指定代码要处理的文件 ID。
    SvgParam:
      properties:
        model:
          type: string
          minLength: 1
        reasoning:
          anyOf:
            - $ref: '#/components/schemas/SvgReasoningParam'
              description: SVG 创作的推理强度。省略时，在 Images 和 Responses 中均使用创作模型的默认值。
            - type: 'null'
      type: object
      required: []
    InputFidelity:
      type: string
      enum:
        - high
        - low
      description: >-
        控制模型在匹配输入图片的风格和特征（尤其是面部特征）上投入的力度。`gpt-image-1.5` 支持 `high` 和
        `low`；`gpt-image-1-mini` 仅支持 `low`。对于 `gpt-image-2`，请省略此参数。在支持的模型上默认为
        `low`。
    ContainerAutoParam:
      properties:
        type:
          type: string
          enum:
            - container_auto
          description: 为本次请求自动创建容器
          default: container_auto
        file_ids:
          items:
            type: string
            example: file-123
          type: array
          maxItems: 50
          description: 可供代码使用的已上传文件的可选列表。
        memory_limit:
          anyOf:
            - $ref: '#/components/schemas/ContainerMemoryLimit'
              description: 容器的内存上限。
            - type: 'null'
        network_policy:
          oneOf:
            - $ref: '#/components/schemas/ContainerNetworkPolicyDisabledParam'
            - $ref: '#/components/schemas/ContainerNetworkPolicyAllowlistParam'
          description: 容器的网络访问策略。
          discriminator:
            propertyName: type
        skills:
          items:
            oneOf:
              - $ref: '#/components/schemas/SkillReferenceParam'
              - $ref: '#/components/schemas/InlineSkillParam'
            discriminator:
              propertyName: type
          type: array
          maxItems: 200
          description: 可选的技能列表，通过 ID 或内联数据引用。
      type: object
      required:
        - type
    CustomTextFormatParam:
      properties:
        type:
          type: string
          enum:
            - text
          description: 无约束文本格式。始终为 `text`。
          default: text
      type: object
      required:
        - type
      title: 文本格式
      description: 无约束的自由格式文本。
    CustomGrammarFormatParam:
      properties:
        type:
          type: string
          enum:
            - grammar
          description: 语法格式。始终为 `grammar`。
          default: grammar
        syntax:
          $ref: '#/components/schemas/GrammarSyntax1'
          description: 语法定义的句法。可选值为 `lark` 或 `regex`。
        definition:
          type: string
          description: 语法定义。
      type: object
      required:
        - type
        - syntax
        - definition
      title: 语法格式
      description: 用户定义的语法。
    FunctionToolParam:
      properties:
        name:
          type: string
          maxLength: 128
          minLength: 1
          pattern: ^[a-zA-Z0-9_-]+$
        description:
          anyOf:
            - type: string
            - type: 'null'
        parameters:
          anyOf:
            - $ref: '#/components/schemas/EmptyModelParam'
            - type: 'null'
        strict:
          anyOf:
            - type: boolean
              description: 是否强制执行严格的参数校验。省略时，若 Schema 兼容，Responses 会尝试使用严格校验，否则回退为非严格校验。
            - type: 'null'
        type:
          type: string
          enum:
            - function
          default: function
        async:
          type: boolean
          description: 工具响应是否可以异步返回，而非在下一次创建响应时立即返回。
        output_schema:
          anyOf:
            - additionalProperties: {}
              type: object
              description: 描述该函数工具字符串输出中所编码 JSON 值的 JSON Schema。不描述内容数组形式的输出。
            - type: 'null'
        defer_loading:
          type: boolean
          description: 该函数是否延迟加载并通过工具搜索发现。
        allowed_callers:
          anyOf:
            - type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/CallableToolAllowedCaller'
              description: 工具调用上下文。
            - type: 'null'
      type: object
      required:
        - name
        - type
    ApproximateLocation:
      properties:
        type:
          type: string
          enum:
            - approximate
          description: 位置近似类型，始终为 `approximate`。
          default: approximate
        country:
          anyOf:
            - type: string
              description: >-
                用户所在国家/地区的两位字母 [ISO
                国家代码](https://en.wikipedia.org/wiki/ISO_3166-1)，例如 `US`。
            - type: 'null'
        region:
          anyOf:
            - type: string
              description: 用户所在地区的自由文本输入，例如 `California`。
            - type: 'null'
        city:
          anyOf:
            - type: string
              description: 用户所在城市的自由文本输入，例如 `San Francisco`。
            - type: 'null'
        timezone:
          anyOf:
            - type: string
              description: >-
                用户的 [IANA
                时区](https://timeapi.io/documentation/iana-timezones)，例如
                `America/Los_Angeles`。
            - type: 'null'
      type: object
      required:
        - type
    SearchContextSize:
      type: string
      enum:
        - low
        - medium
        - high
    SearchContentType:
      type: string
      enum:
        - text
        - image
    PromptCacheBreakpointConfig:
      properties:
        mode:
          type: string
          enum:
            - explicit
          description: 断点模式。始终为 `explicit`。
          default: explicit
        ttl:
          type: string
          enum:
            - 30m
            - 12h
          description: 此缓存断点的最短生命周期。默认为请求的 TTL。
      type: object
      required:
        - mode
      title: 提示缓存断点
      description: >-
        标记可复用提示词前缀的确切结束位置。省略 `ttl` 时，该断点继承请求的 `prompt_cache_options.ttl`；边界不会按
        Token 块取整。
    ImageDetail:
      type: string
      enum:
        - low
        - high
        - auto
        - original
    FileInputDetail:
      type: string
      enum:
        - auto
        - low
        - high
    DirectToolCallCallerParam:
      properties:
        type:
          type: string
          enum:
            - direct
          description: 调用方类型，始终为 `direct`。
          default: direct
      type: object
      required:
        - type
    ProgramToolCallCallerParam:
      properties:
        type:
          type: string
          enum:
            - program
          description: 调用方类型，始终为 `program`。
          default: program
        caller_id:
          type: string
          maxLength: 64
          minLength: 1
          description: 产生此工具调用的程序项的调用 ID。
      type: object
      required:
        - type
        - caller_id
    ClickButtonType:
      type: string
      enum:
        - left
        - right
        - wheel
        - back
        - forward
    CoordParam:
      properties:
        x:
          type: integer
          description: x 坐标。
        'y':
          type: integer
          description: y 坐标。
      type: object
      required:
        - x
        - 'y'
      title: 坐标
      description: '一对 x/y 坐标，例如 `{ x: 100, y: 200 }`。'
    PromptCacheBreakpointParam:
      properties:
        mode:
          type: string
          enum:
            - explicit
          description: 断点模式。始终为 `explicit`。
          default: explicit
        ttl:
          type: string
          enum:
            - 30m
            - 12h
          description: 此缓存断点的最短生命周期。默认为请求的 TTL。
      type: object
      required:
        - mode
      title: 提示缓存断点
      description: >-
        标记可复用提示词前缀的确切结束位置。省略 `ttl` 时，该断点继承请求的 `prompt_cache_options.ttl`；边界不会按
        Token 块取整。
    DetailEnum:
      type: string
      enum:
        - low
        - high
        - auto
        - original
    FileDetailEnum:
      type: string
      enum:
        - auto
        - low
        - high
    ToolSearchOutputNamespaceToolParam:
      properties:
        type:
          type: string
          enum:
            - namespace
          description: 工具类型，始终为 `namespace`。
          default: namespace
        name:
          type: string
          minLength: 1
          description: 工具调用中使用的命名空间名称（例如 `crm`）。
        description:
          type: string
          description: 向模型展示的命名空间描述。
        tools:
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolSearchOutputFunctionToolParam'
              - $ref: '#/components/schemas/CustomToolParam'
            description: 由工具搜索加载到某个命名空间中的函数或自定义工具。
            discriminator:
              propertyName: type
          type: array
          minItems: 1
          description: 在该命名空间中加载的函数/自定义工具。
      type: object
      required:
        - type
        - name
        - description
        - tools
      title: 命名空间
      description: 将函数/自定义工具归入同一个共享命名空间。
    LocalSkillParam:
      properties:
        name:
          type: string
          description: 技能名称。
        description:
          type: string
          description: 技能描述。
        path:
          type: string
          description: 包含该技能的目录路径。
      type: object
      required:
        - name
        - description
        - path
    FunctionShellCallOutputOutcomeParam:
      oneOf:
        - $ref: '#/components/schemas/FunctionShellCallOutputTimeoutOutcomeParam'
        - $ref: '#/components/schemas/FunctionShellCallOutputExitOutcomeParam'
      title: Shell 调用结果
      description: 与该 Shell 调用关联的退出或超时结果。
      discriminator:
        propertyName: type
    ApplyPatchCreateFileOperationParam:
      properties:
        type:
          type: string
          enum:
            - create_file
          description: 操作类型，始终为 `create_file`。
          default: create_file
        path:
          type: string
          minLength: 1
          description: 要创建的文件相对于工作区根目录的路径。
        diff:
          type: string
          maxLength: 10485760
          description: 创建文件时要应用的统一 diff 内容。
      type: object
      required:
        - type
        - path
        - diff
      title: 应用补丁：创建文件操作
      description: 通过 apply_patch 工具创建新文件的指令。
    ApplyPatchDeleteFileOperationParam:
      properties:
        type:
          type: string
          enum:
            - delete_file
          description: 操作类型，始终为 `delete_file`。
          default: delete_file
        path:
          type: string
          minLength: 1
          description: 要删除的文件相对于工作区根目录的路径。
      type: object
      required:
        - type
        - path
      title: 应用补丁：删除文件操作
      description: 通过 apply_patch 工具删除现有文件的指令。
    ApplyPatchUpdateFileOperationParam:
      properties:
        type:
          type: string
          enum:
            - update_file
          description: 操作类型，始终为 `update_file`。
          default: update_file
        path:
          type: string
          minLength: 1
          description: 要更新的文件相对于工作区根目录的路径。
        diff:
          type: string
          maxLength: 10485760
          description: 要应用到现有文件的统一 diff 内容。
      type: object
      required:
        - type
        - path
        - diff
      title: 应用补丁：更新文件操作
      description: 通过 apply_patch 工具更新现有文件的指令。
    TopLogProb:
      properties:
        token:
          type: string
        logprob:
          type: number
        bytes:
          items:
            type: integer
          type: array
      type: object
      required:
        - token
        - logprob
        - bytes
      title: 最高对数概率
      description: 某个 Token 的最高对数概率。
    RankerVersionType:
      type: string
      enum:
        - auto
        - default-2024-11-15
    HybridSearchOptions:
      properties:
        embedding_weight:
          type: number
          description: 倒数排名融合中嵌入的权重。
        text_weight:
          type: number
          description: 倒数排名融合中文本的权重。
      type: object
      required:
        - embedding_weight
        - text_weight
    ComparisonFilter:
      type: object
      additionalProperties: false
      title: 比较过滤器
      description: 使用指定的比较运算，将指定属性键与给定值进行比较的过滤器。
      properties:
        type:
          type: string
          default: eq
          enum:
            - eq
            - ne
            - gt
            - gte
            - lt
            - lte
            - in
            - nin
          description: |-
            指定比较运算符：`eq`、`ne`、`gt`、`gte`、`lt`、`lte`、`in`、`nin`。
            - `eq`：等于
            - `ne`：不等于
            - `gt`：大于
            - `gte`：大于或等于
            - `lt`：小于
            - `lte`：小于或等于
            - `in`：属于
            - `nin`：不属于
        key:
          type: string
          description: 与值进行比较的键。
        value:
          oneOf:
            - type: string
            - type: number
            - type: boolean
            - type: array
              items:
                oneOf:
                  - type: string
                  - type: number
          description: 与属性键进行比较的值；支持字符串、数字或布尔类型。
      required:
        - type
        - key
        - value
    CompoundFilter:
      type: object
      additionalProperties: false
      title: 复合过滤器
      description: 使用 `and` 或 `or` 组合多个过滤器。
      properties:
        type:
          type: string
          description: 运算类型：`and` 或 `or`。
          enum:
            - and
            - or
        filters:
          type: array
          description: 要组合的过滤器数组。元素可以是 `ComparisonFilter` 或 `CompoundFilter`。
          items:
            oneOf:
              - $ref: '#/components/schemas/ComparisonFilter'
              - $ref: '#/components/schemas/CompoundFilter'
            discriminator:
              propertyName: type
      required:
        - type
        - filters
    ContainerMemoryLimit:
      type: string
      enum:
        - 1g
        - 4g
        - 16g
        - 64g
    ContainerNetworkPolicyDisabledParam:
      properties:
        type:
          type: string
          enum:
            - disabled
          description: 禁用出站网络访问。始终为 `disabled`。
          default: disabled
      type: object
      required:
        - type
    ContainerNetworkPolicyAllowlistParam:
      properties:
        type:
          type: string
          enum:
            - allowlist
          description: 仅允许对指定域名进行出站网络访问。始终为 `allowlist`。
          default: allowlist
        allowed_domains:
          items:
            type: string
          type: array
          minItems: 1
          description: 类型为 `allowlist` 时允许的域名列表。
        domain_secrets:
          items:
            $ref: '#/components/schemas/ContainerNetworkPolicyDomainSecretParam'
          type: array
          minItems: 1
          description: 可选的、按域名限定作用范围的密钥，用于允许列表中的域名。
      type: object
      required:
        - type
        - allowed_domains
    SvgReasoningParam:
      properties:
        effort:
          oneOf:
            - $ref: '#/components/schemas/ReasoningEffortEnum'
              description: 控制模型在本次请求中投入多少推理强度。
      type: object
      required: []
      description: SVG 创作的推理强度。省略时，在 Images 和 Responses 中均使用创作模型的默认值。
    SkillReferenceParam:
      properties:
        type:
          type: string
          enum:
            - skill_reference
          description: 引用通过 /v1/skills 端点创建的技能。
          default: skill_reference
        skill_id:
          type: string
          maxLength: 64
          minLength: 1
          description: 被引用技能的 ID。
        version:
          type: string
          description: 可选的技能版本。使用正整数或 'latest'。省略则使用默认版本。
      type: object
      required:
        - type
        - skill_id
    InlineSkillParam:
      properties:
        type:
          type: string
          enum:
            - inline
          description: 为本次请求定义内联技能。
          default: inline
        name:
          type: string
          description: 技能名称。
        description:
          type: string
          description: 技能描述。
        source:
          $ref: '#/components/schemas/InlineSkillSourceParam'
          description: 内联技能载荷
      type: object
      required:
        - type
        - name
        - description
        - source
    GrammarSyntax1:
      type: string
      enum:
        - lark
        - regex
    ToolSearchOutputFunctionToolParam:
      properties:
        name:
          type: string
          maxLength: 128
          minLength: 1
          pattern: ^(?![\s\S]*[\r\n])[a-zA-Z0-9_.-]+$
          description: 已加载的函数工具名称。
        description:
          anyOf:
            - type: string
            - type: 'null'
        parameters:
          anyOf:
            - $ref: '#/components/schemas/EmptyModelParam'
            - type: 'null'
        strict:
          anyOf:
            - type: boolean
              description: 是否强制执行严格的参数校验。省略时，若 Schema 兼容，Responses 会尝试使用严格校验，否则回退为非严格校验。
            - type: 'null'
        type:
          type: string
          enum:
            - function
          default: function
        async:
          type: boolean
          description: 工具响应是否可以异步返回，而非在下一次创建响应时立即返回。
        output_schema:
          anyOf:
            - additionalProperties: {}
              type: object
              description: 描述该函数工具字符串输出中所编码 JSON 值的 JSON Schema。不描述内容数组形式的输出。
            - type: 'null'
        defer_loading:
          type: boolean
          description: 该函数是否延迟加载并通过工具搜索发现。
        allowed_callers:
          anyOf:
            - type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/CallableToolAllowedCaller'
              description: 工具调用上下文。
            - type: 'null'
      type: object
      required:
        - name
        - type
    FunctionShellCallOutputTimeoutOutcomeParam:
      properties:
        type:
          type: string
          enum:
            - timeout
          description: 结果类型，始终为 `timeout`。
          default: timeout
      type: object
      required:
        - type
      title: Shell 调用超时结果
      description: 表示 Shell 调用超出了配置的时间限制。
    FunctionShellCallOutputExitOutcomeParam:
      properties:
        type:
          type: string
          enum:
            - exit
          description: 结果类型，始终为 `exit`。
          default: exit
        exit_code:
          type: integer
          description: Shell 进程返回的退出码。
      type: object
      required:
        - type
        - exit_code
      title: Shell 调用退出结果
      description: 表示 shell 命令已结束并返回了退出码。
    ContainerNetworkPolicyDomainSecretParam:
      properties:
        domain:
          type: string
          minLength: 1
          description: 与该密钥关联的域名。
        name:
          type: string
          minLength: 1
          description: 要为该域名注入的密钥名称。
        value:
          type: string
          maxLength: 10485760
          minLength: 1
          description: 要为该域名注入的密钥值。
      type: object
      required:
        - domain
        - name
        - value
    ReasoningEffortEnum:
      type: string
      enum:
        - none
        - minimal
        - low
        - medium
        - high
        - xhigh
        - max
    InlineSkillSourceParam:
      properties:
        type:
          type: string
          enum:
            - base64
          description: 内联技能来源的类型，必须为 `base64`。
          default: base64
        media_type:
          type: string
          enum:
            - application/zip
          description: 内联技能载荷的媒体类型，必须为 `application/zip`。
          default: application/zip
        data:
          type: string
          maxLength: 70254592
          minLength: 1
          description: Base64 编码的技能 zip 包。
      type: object
      required:
        - type
        - media_type
        - data
      description: 内联技能载荷
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        在 `Authorization` 请求头中传入 DreamTo API Key：`Authorization: Bearer <API
        Key>`。

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.