feat: Add responses and safety impl extra_body

This commit is contained in:
Swapna Lekkala 2025-10-10 15:03:34 -07:00
parent 0a96a7faa5
commit ad4362e48d
163 changed files with 29338 additions and 141 deletions

View file

@ -8483,6 +8483,28 @@
}
}
},
"OpenAIResponseContentPartRefusal": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "refusal",
"default": "refusal",
"description": "Content part type identifier, always \"refusal\""
},
"refusal": {
"type": "string",
"description": "Refusal text supplied by the model"
}
},
"additionalProperties": false,
"required": [
"type",
"refusal"
],
"title": "OpenAIResponseContentPartRefusal",
"description": "Refusal content within a streamed response part."
},
"OpenAIResponseError": {
"type": "object",
"properties": {
@ -9063,6 +9085,23 @@
}
},
"OpenAIResponseOutputMessageContent": {
"oneOf": [
{
"$ref": "#/components/schemas/OpenAIResponseOutputMessageContentOutputText"
},
{
"$ref": "#/components/schemas/OpenAIResponseContentPartRefusal"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"output_text": "#/components/schemas/OpenAIResponseOutputMessageContentOutputText",
"refusal": "#/components/schemas/OpenAIResponseContentPartRefusal"
}
}
},
"OpenAIResponseOutputMessageContentOutputText": {
"type": "object",
"properties": {
"text": {
@ -9981,28 +10020,6 @@
"title": "OpenAIResponseContentPartReasoningText",
"description": "Reasoning text emitted as part of a streamed response."
},
"OpenAIResponseContentPartRefusal": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "refusal",
"default": "refusal",
"description": "Content part type identifier, always \"refusal\""
},
"refusal": {
"type": "string",
"description": "Refusal text supplied by the model"
}
},
"additionalProperties": false,
"required": [
"type",
"refusal"
],
"title": "OpenAIResponseContentPartRefusal",
"description": "Refusal content within a streamed response part."
},
"OpenAIResponseObjectStream": {
"oneOf": [
{

View file

@ -6332,6 +6332,25 @@ components:
url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation'
container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation'
file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath'
OpenAIResponseContentPartRefusal:
type: object
properties:
type:
type: string
const: refusal
default: refusal
description: >-
Content part type identifier, always "refusal"
refusal:
type: string
description: Refusal text supplied by the model
additionalProperties: false
required:
- type
- refusal
title: OpenAIResponseContentPartRefusal
description: >-
Refusal content within a streamed response part.
OpenAIResponseError:
type: object
properties:
@ -6755,6 +6774,15 @@ components:
mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
OpenAIResponseOutputMessageContent:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText'
- $ref: '#/components/schemas/OpenAIResponseContentPartRefusal'
discriminator:
propertyName: type
mapping:
output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText'
refusal: '#/components/schemas/OpenAIResponseContentPartRefusal'
"OpenAIResponseOutputMessageContentOutputText":
type: object
properties:
text:
@ -7466,25 +7494,6 @@ components:
title: OpenAIResponseContentPartReasoningText
description: >-
Reasoning text emitted as part of a streamed response.
OpenAIResponseContentPartRefusal:
type: object
properties:
type:
type: string
const: refusal
default: refusal
description: >-
Content part type identifier, always "refusal"
refusal:
type: string
description: Refusal text supplied by the model
additionalProperties: false
required:
- type
- refusal
title: OpenAIResponseContentPartRefusal
description: >-
Refusal content within a streamed response part.
OpenAIResponseObjectStream:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated'

View file

@ -5670,6 +5670,7 @@
}
}
},
<<<<<<< HEAD
"OpenAIResponseInputFunctionToolCallOutput": {
"type": "object",
"properties": {
@ -5689,16 +5690,38 @@
},
"status": {
"type": "string"
=======
"OpenAIResponseContentPartRefusal": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "refusal",
"default": "refusal",
"description": "Content part type identifier, always \"refusal\""
},
"refusal": {
"type": "string",
"description": "Refusal text supplied by the model"
>>>>>>> 181046f9 (feat: Add responses and safety impl extra_body)
}
},
"additionalProperties": false,
"required": [
<<<<<<< HEAD
"call_id",
"output",
"type"
],
"title": "OpenAIResponseInputFunctionToolCallOutput",
"description": "This represents the output of a function call that gets passed back to the model."
=======
"type",
"refusal"
],
"title": "OpenAIResponseContentPartRefusal",
"description": "Refusal content within a streamed response part."
>>>>>>> 181046f9 (feat: Add responses and safety impl extra_body)
},
"OpenAIResponseInputMessageContent": {
"oneOf": [
@ -5905,6 +5928,23 @@
"description": "Corresponds to the various Message types in the Responses API. They are all under one type because the Responses API gives them all the same \"type\" value, and there is no way to tell them apart in certain scenarios."
},
"OpenAIResponseOutputMessageContent": {
"oneOf": [
{
"$ref": "#/components/schemas/OpenAIResponseOutputMessageContentOutputText"
},
{
"$ref": "#/components/schemas/OpenAIResponseContentPartRefusal"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"output_text": "#/components/schemas/OpenAIResponseOutputMessageContentOutputText",
"refusal": "#/components/schemas/OpenAIResponseContentPartRefusal"
}
}
},
"OpenAIResponseOutputMessageContentOutputText": {
"type": "object",
"properties": {
"text": {
@ -8228,28 +8268,6 @@
"title": "OpenAIResponseContentPartReasoningText",
"description": "Reasoning text emitted as part of a streamed response."
},
"OpenAIResponseContentPartRefusal": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "refusal",
"default": "refusal",
"description": "Content part type identifier, always \"refusal\""
},
"refusal": {
"type": "string",
"description": "Refusal text supplied by the model"
}
},
"additionalProperties": false,
"required": [
"type",
"refusal"
],
"title": "OpenAIResponseContentPartRefusal",
"description": "Refusal content within a streamed response part."
},
"OpenAIResponseObjectStream": {
"oneOf": [
{

View file

@ -4291,6 +4291,7 @@ components:
url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation'
container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation'
file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath'
<<<<<<< HEAD
"OpenAIResponseInputFunctionToolCallOutput":
type: object
properties:
@ -4316,6 +4317,27 @@ components:
description: >-
This represents the output of a function call that gets passed back to the
model.
=======
OpenAIResponseContentPartRefusal:
type: object
properties:
type:
type: string
const: refusal
default: refusal
description: >-
Content part type identifier, always "refusal"
refusal:
type: string
description: Refusal text supplied by the model
additionalProperties: false
required:
- type
- refusal
title: OpenAIResponseContentPartRefusal
description: >-
Refusal content within a streamed response part.
>>>>>>> 181046f9 (feat: Add responses and safety impl extra_body)
OpenAIResponseInputMessageContent:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentText'
@ -4462,6 +4484,15 @@ components:
under one type because the Responses API gives them all the same "type" value,
and there is no way to tell them apart in certain scenarios.
OpenAIResponseOutputMessageContent:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText'
- $ref: '#/components/schemas/OpenAIResponseContentPartRefusal'
discriminator:
propertyName: type
mapping:
output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText'
refusal: '#/components/schemas/OpenAIResponseContentPartRefusal'
"OpenAIResponseOutputMessageContentOutputText":
type: object
properties:
text:
@ -6259,25 +6290,6 @@ components:
title: OpenAIResponseContentPartReasoningText
description: >-
Reasoning text emitted as part of a streamed response.
OpenAIResponseContentPartRefusal:
type: object
properties:
type:
type: string
const: refusal
default: refusal
description: >-
Content part type identifier, always "refusal"
refusal:
type: string
description: Refusal text supplied by the model
additionalProperties: false
required:
- type
- refusal
title: OpenAIResponseContentPartRefusal
description: >-
Refusal content within a streamed response part.
OpenAIResponseObjectStream:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated'

View file

@ -7342,6 +7342,7 @@
}
}
},
<<<<<<< HEAD
"OpenAIResponseInputFunctionToolCallOutput": {
"type": "object",
"properties": {
@ -7361,16 +7362,38 @@
},
"status": {
"type": "string"
=======
"OpenAIResponseContentPartRefusal": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "refusal",
"default": "refusal",
"description": "Content part type identifier, always \"refusal\""
},
"refusal": {
"type": "string",
"description": "Refusal text supplied by the model"
>>>>>>> 181046f9 (feat: Add responses and safety impl extra_body)
}
},
"additionalProperties": false,
"required": [
<<<<<<< HEAD
"call_id",
"output",
"type"
],
"title": "OpenAIResponseInputFunctionToolCallOutput",
"description": "This represents the output of a function call that gets passed back to the model."
=======
"type",
"refusal"
],
"title": "OpenAIResponseContentPartRefusal",
"description": "Refusal content within a streamed response part."
>>>>>>> 181046f9 (feat: Add responses and safety impl extra_body)
},
"OpenAIResponseInputMessageContent": {
"oneOf": [
@ -7577,6 +7600,23 @@
"description": "Corresponds to the various Message types in the Responses API. They are all under one type because the Responses API gives them all the same \"type\" value, and there is no way to tell them apart in certain scenarios."
},
"OpenAIResponseOutputMessageContent": {
"oneOf": [
{
"$ref": "#/components/schemas/OpenAIResponseOutputMessageContentOutputText"
},
{
"$ref": "#/components/schemas/OpenAIResponseContentPartRefusal"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"output_text": "#/components/schemas/OpenAIResponseOutputMessageContentOutputText",
"refusal": "#/components/schemas/OpenAIResponseContentPartRefusal"
}
}
},
"OpenAIResponseOutputMessageContentOutputText": {
"type": "object",
"properties": {
"text": {
@ -9900,28 +9940,6 @@
"title": "OpenAIResponseContentPartReasoningText",
"description": "Reasoning text emitted as part of a streamed response."
},
"OpenAIResponseContentPartRefusal": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "refusal",
"default": "refusal",
"description": "Content part type identifier, always \"refusal\""
},
"refusal": {
"type": "string",
"description": "Refusal text supplied by the model"
}
},
"additionalProperties": false,
"required": [
"type",
"refusal"
],
"title": "OpenAIResponseContentPartRefusal",
"description": "Refusal content within a streamed response part."
},
"OpenAIResponseObjectStream": {
"oneOf": [
{

View file

@ -5504,6 +5504,7 @@ components:
url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation'
container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation'
file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath'
<<<<<<< HEAD
"OpenAIResponseInputFunctionToolCallOutput":
type: object
properties:
@ -5529,6 +5530,27 @@ components:
description: >-
This represents the output of a function call that gets passed back to the
model.
=======
OpenAIResponseContentPartRefusal:
type: object
properties:
type:
type: string
const: refusal
default: refusal
description: >-
Content part type identifier, always "refusal"
refusal:
type: string
description: Refusal text supplied by the model
additionalProperties: false
required:
- type
- refusal
title: OpenAIResponseContentPartRefusal
description: >-
Refusal content within a streamed response part.
>>>>>>> 181046f9 (feat: Add responses and safety impl extra_body)
OpenAIResponseInputMessageContent:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseInputMessageContentText'
@ -5675,6 +5697,15 @@ components:
under one type because the Responses API gives them all the same "type" value,
and there is no way to tell them apart in certain scenarios.
OpenAIResponseOutputMessageContent:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText'
- $ref: '#/components/schemas/OpenAIResponseContentPartRefusal'
discriminator:
propertyName: type
mapping:
output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText'
refusal: '#/components/schemas/OpenAIResponseContentPartRefusal'
"OpenAIResponseOutputMessageContentOutputText":
type: object
properties:
text:
@ -7472,25 +7503,6 @@ components:
title: OpenAIResponseContentPartReasoningText
description: >-
Reasoning text emitted as part of a streamed response.
OpenAIResponseContentPartRefusal:
type: object
properties:
type:
type: string
const: refusal
default: refusal
description: >-
Content part type identifier, always "refusal"
refusal:
type: string
description: Refusal text supplied by the model
additionalProperties: false
required:
- type
- refusal
title: OpenAIResponseContentPartRefusal
description: >-
Refusal content within a streamed response part.
OpenAIResponseObjectStream:
oneOf:
- $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCreated'