feat: add MCP tool signature to Responses API (#2232)

This commit is contained in:
Ashwin Bharambe 2025-05-22 16:43:08 -07:00 committed by GitHub
parent 8feb1827c8
commit d8c6ab9bfc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 195 additions and 2 deletions

View file

@ -4762,12 +4762,14 @@ components:
- $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch'
- $ref: '#/components/schemas/OpenAIResponseInputToolFunction'
- $ref: '#/components/schemas/OpenAIResponseInputToolMCP'
discriminator:
propertyName: type
mapping:
web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch'
file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch'
function: '#/components/schemas/OpenAIResponseInputToolFunction'
mcp: '#/components/schemas/OpenAIResponseInputToolMCP'
OpenAIResponseInputToolFileSearch:
type: object
properties:
@ -4822,6 +4824,66 @@ components:
- type
- name
title: OpenAIResponseInputToolFunction
OpenAIResponseInputToolMCP:
type: object
properties:
type:
type: string
const: mcp
default: mcp
server_label:
type: string
server_url:
type: string
headers:
type: object
additionalProperties:
oneOf:
- type: 'null'
- type: boolean
- type: number
- type: string
- type: array
- type: object
require_approval:
oneOf:
- type: string
const: always
- type: string
const: never
- type: object
properties:
always:
type: array
items:
type: string
never:
type: array
items:
type: string
additionalProperties: false
title: ApprovalFilter
default: never
allowed_tools:
oneOf:
- type: array
items:
type: string
- type: object
properties:
tool_names:
type: array
items:
type: string
additionalProperties: false
title: AllowedToolsFilter
additionalProperties: false
required:
- type
- server_label
- server_url
- require_approval
title: OpenAIResponseInputToolMCP
OpenAIResponseInputToolWebSearch:
type: object
properties: