Skip to content

Commit a2e9544

Browse files
committed
feat!: add OpenAIResponseObjectStreamError to stream union type
1 parent 7b561d1 commit a2e9544

File tree

6 files changed

+182
-166
lines changed

6 files changed

+182
-166
lines changed

client-sdks/stainless/openapi.yml

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7818,6 +7818,7 @@ components:
78187818
OpenAIResponseObjectStream:
78197819
discriminator:
78207820
mapping:
7821+
error: '#/components/schemas/OpenAIResponseObjectStreamError'
78217822
response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted'
78227823
response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded'
78237824
response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone'
@@ -7928,7 +7929,9 @@ components:
79287929
title: OpenAIResponseObjectStreamResponseFailed
79297930
- $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted'
79307931
title: OpenAIResponseObjectStreamResponseCompleted
7931-
title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants)
7932+
- $ref: '#/components/schemas/OpenAIResponseObjectStreamError'
7933+
title: OpenAIResponseObjectStreamError
7934+
title: OpenAIResponseObjectStreamResponseCreated | ... (37 variants)
79327935
OpenAIResponseObjectStreamResponseCompleted:
79337936
description: Streaming event indicating a response has been completed.
79347937
properties:
@@ -13255,6 +13258,38 @@ components:
1325513258
- $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText'
1325613259
title: OpenAIResponseContentPartReasoningText
1325713260
title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText
13261+
OpenAIResponseObjectStreamError:
13262+
description: |-
13263+
Standalone error event emitted during streaming when an error occurs.
13264+
13265+
This is distinct from response.failed which is a response lifecycle event.
13266+
The error event signals transport/infrastructure-level errors to the client.
13267+
properties:
13268+
code:
13269+
anyOf:
13270+
- type: string
13271+
- type: 'null'
13272+
nullable: true
13273+
message:
13274+
title: Message
13275+
type: string
13276+
param:
13277+
anyOf:
13278+
- type: string
13279+
- type: 'null'
13280+
nullable: true
13281+
sequence_number:
13282+
title: Sequence Number
13283+
type: integer
13284+
type:
13285+
title: Type
13286+
type: string
13287+
enum:
13288+
- error
13289+
required:
13290+
- message
13291+
- sequence_number
13292+
title: OpenAIResponseObjectStreamError
1325813293
ListBenchmarksRequest:
1325913294
description: Request model for listing benchmarks.
1326013295
properties: {}
@@ -14236,38 +14271,6 @@ components:
1423614271
- vector_store_id
1423714272
- chunks
1423814273
title: DeleteChunksRequest
14239-
OpenAIResponseObjectStreamError:
14240-
description: |-
14241-
Standalone error event emitted during streaming when an error occurs.
14242-
14243-
This is distinct from response.failed which is a response lifecycle event.
14244-
The error event signals transport/infrastructure-level errors to the client.
14245-
properties:
14246-
code:
14247-
anyOf:
14248-
- type: string
14249-
- type: 'null'
14250-
nullable: true
14251-
message:
14252-
title: Message
14253-
type: string
14254-
param:
14255-
anyOf:
14256-
- type: string
14257-
- type: 'null'
14258-
nullable: true
14259-
sequence_number:
14260-
title: Sequence Number
14261-
type: integer
14262-
type:
14263-
const: error
14264-
default: error
14265-
title: Type
14266-
type: string
14267-
required:
14268-
- message
14269-
- sequence_number
14270-
title: OpenAIResponseObjectStreamError
1427114274
ListBatchesRequest:
1427214275
description: Request model for listing batches.
1427314276
properties:

docs/static/deprecated-llama-stack-spec.yaml

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4473,6 +4473,7 @@ components:
44734473
OpenAIResponseObjectStream:
44744474
discriminator:
44754475
mapping:
4476+
error: '#/components/schemas/OpenAIResponseObjectStreamError'
44764477
response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted'
44774478
response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded'
44784479
response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone'
@@ -4583,7 +4584,9 @@ components:
45834584
title: OpenAIResponseObjectStreamResponseFailed
45844585
- $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted'
45854586
title: OpenAIResponseObjectStreamResponseCompleted
4586-
title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants)
4587+
- $ref: '#/components/schemas/OpenAIResponseObjectStreamError'
4588+
title: OpenAIResponseObjectStreamError
4589+
title: OpenAIResponseObjectStreamResponseCreated | ... (37 variants)
45874590
OpenAIResponseObjectStreamResponseCompleted:
45884591
description: Streaming event indicating a response has been completed.
45894592
properties:
@@ -9912,6 +9915,38 @@ components:
99129915
- $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText'
99139916
title: OpenAIResponseContentPartReasoningText
99149917
title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText
9918+
OpenAIResponseObjectStreamError:
9919+
description: |-
9920+
Standalone error event emitted during streaming when an error occurs.
9921+
9922+
This is distinct from response.failed which is a response lifecycle event.
9923+
The error event signals transport/infrastructure-level errors to the client.
9924+
properties:
9925+
code:
9926+
anyOf:
9927+
- type: string
9928+
- type: 'null'
9929+
nullable: true
9930+
message:
9931+
title: Message
9932+
type: string
9933+
param:
9934+
anyOf:
9935+
- type: string
9936+
- type: 'null'
9937+
nullable: true
9938+
sequence_number:
9939+
title: Sequence Number
9940+
type: integer
9941+
type:
9942+
title: Type
9943+
type: string
9944+
enum:
9945+
- error
9946+
required:
9947+
- message
9948+
- sequence_number
9949+
title: OpenAIResponseObjectStreamError
99159950
ListBenchmarksRequest:
99169951
description: Request model for listing benchmarks.
99179952
properties: {}
@@ -10893,38 +10928,6 @@ components:
1089310928
- vector_store_id
1089410929
- chunks
1089510930
title: DeleteChunksRequest
10896-
OpenAIResponseObjectStreamError:
10897-
description: |-
10898-
Standalone error event emitted during streaming when an error occurs.
10899-
10900-
This is distinct from response.failed which is a response lifecycle event.
10901-
The error event signals transport/infrastructure-level errors to the client.
10902-
properties:
10903-
code:
10904-
anyOf:
10905-
- type: string
10906-
- type: 'null'
10907-
nullable: true
10908-
message:
10909-
title: Message
10910-
type: string
10911-
param:
10912-
anyOf:
10913-
- type: string
10914-
- type: 'null'
10915-
nullable: true
10916-
sequence_number:
10917-
title: Sequence Number
10918-
type: integer
10919-
type:
10920-
const: error
10921-
default: error
10922-
title: Type
10923-
type: string
10924-
required:
10925-
- message
10926-
- sequence_number
10927-
title: OpenAIResponseObjectStreamError
1092810931
ListBatchesRequest:
1092910932
description: Request model for listing batches.
1093010933
properties:

docs/static/experimental-llama-stack-spec.yaml

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4654,6 +4654,7 @@ components:
46544654
OpenAIResponseObjectStream:
46554655
discriminator:
46564656
mapping:
4657+
error: '#/components/schemas/OpenAIResponseObjectStreamError'
46574658
response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted'
46584659
response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded'
46594660
response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone'
@@ -4764,7 +4765,9 @@ components:
47644765
title: OpenAIResponseObjectStreamResponseFailed
47654766
- $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted'
47664767
title: OpenAIResponseObjectStreamResponseCompleted
4767-
title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants)
4768+
- $ref: '#/components/schemas/OpenAIResponseObjectStreamError'
4769+
title: OpenAIResponseObjectStreamError
4770+
title: OpenAIResponseObjectStreamResponseCreated | ... (37 variants)
47684771
OpenAIResponseObjectStreamResponseCompleted:
47694772
description: Streaming event indicating a response has been completed.
47704773
properties:
@@ -9760,6 +9763,38 @@ components:
97609763
- $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText'
97619764
title: OpenAIResponseContentPartReasoningText
97629765
title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText
9766+
OpenAIResponseObjectStreamError:
9767+
description: |-
9768+
Standalone error event emitted during streaming when an error occurs.
9769+
9770+
This is distinct from response.failed which is a response lifecycle event.
9771+
The error event signals transport/infrastructure-level errors to the client.
9772+
properties:
9773+
code:
9774+
anyOf:
9775+
- type: string
9776+
- type: 'null'
9777+
nullable: true
9778+
message:
9779+
title: Message
9780+
type: string
9781+
param:
9782+
anyOf:
9783+
- type: string
9784+
- type: 'null'
9785+
nullable: true
9786+
sequence_number:
9787+
title: Sequence Number
9788+
type: integer
9789+
type:
9790+
title: Type
9791+
type: string
9792+
enum:
9793+
- error
9794+
required:
9795+
- message
9796+
- sequence_number
9797+
title: OpenAIResponseObjectStreamError
97639798
ListBenchmarksRequest:
97649799
description: Request model for listing benchmarks.
97659800
properties: {}
@@ -10741,38 +10776,6 @@ components:
1074110776
- vector_store_id
1074210777
- chunks
1074310778
title: DeleteChunksRequest
10744-
OpenAIResponseObjectStreamError:
10745-
description: |-
10746-
Standalone error event emitted during streaming when an error occurs.
10747-
10748-
This is distinct from response.failed which is a response lifecycle event.
10749-
The error event signals transport/infrastructure-level errors to the client.
10750-
properties:
10751-
code:
10752-
anyOf:
10753-
- type: string
10754-
- type: 'null'
10755-
nullable: true
10756-
message:
10757-
title: Message
10758-
type: string
10759-
param:
10760-
anyOf:
10761-
- type: string
10762-
- type: 'null'
10763-
nullable: true
10764-
sequence_number:
10765-
title: Sequence Number
10766-
type: integer
10767-
type:
10768-
const: error
10769-
default: error
10770-
title: Type
10771-
type: string
10772-
required:
10773-
- message
10774-
- sequence_number
10775-
title: OpenAIResponseObjectStreamError
1077610779
ListBatchesRequest:
1077710780
description: Request model for listing batches.
1077810781
properties:

docs/static/llama-stack-spec.yaml

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6703,6 +6703,7 @@ components:
67036703
OpenAIResponseObjectStream:
67046704
discriminator:
67056705
mapping:
6706+
error: '#/components/schemas/OpenAIResponseObjectStreamError'
67066707
response.completed: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted'
67076708
response.content_part.added: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartAdded'
67086709
response.content_part.done: '#/components/schemas/OpenAIResponseObjectStreamResponseContentPartDone'
@@ -6813,7 +6814,9 @@ components:
68136814
title: OpenAIResponseObjectStreamResponseFailed
68146815
- $ref: '#/components/schemas/OpenAIResponseObjectStreamResponseCompleted'
68156816
title: OpenAIResponseObjectStreamResponseCompleted
6816-
title: OpenAIResponseObjectStreamResponseCreated | ... (36 variants)
6817+
- $ref: '#/components/schemas/OpenAIResponseObjectStreamError'
6818+
title: OpenAIResponseObjectStreamError
6819+
title: OpenAIResponseObjectStreamResponseCreated | ... (37 variants)
68176820
OpenAIResponseObjectStreamResponseCompleted:
68186821
description: Streaming event indicating a response has been completed.
68196822
properties:
@@ -12117,6 +12120,38 @@ components:
1211712120
- $ref: '#/components/schemas/OpenAIResponseContentPartReasoningText'
1211812121
title: OpenAIResponseContentPartReasoningText
1211912122
title: OpenAIResponseContentPartOutputText | OpenAIResponseContentPartRefusal | OpenAIResponseContentPartReasoningText
12123+
OpenAIResponseObjectStreamError:
12124+
description: |-
12125+
Standalone error event emitted during streaming when an error occurs.
12126+
12127+
This is distinct from response.failed which is a response lifecycle event.
12128+
The error event signals transport/infrastructure-level errors to the client.
12129+
properties:
12130+
code:
12131+
anyOf:
12132+
- type: string
12133+
- type: 'null'
12134+
nullable: true
12135+
message:
12136+
title: Message
12137+
type: string
12138+
param:
12139+
anyOf:
12140+
- type: string
12141+
- type: 'null'
12142+
nullable: true
12143+
sequence_number:
12144+
title: Sequence Number
12145+
type: integer
12146+
type:
12147+
title: Type
12148+
type: string
12149+
enum:
12150+
- error
12151+
required:
12152+
- message
12153+
- sequence_number
12154+
title: OpenAIResponseObjectStreamError
1212012155
ListBenchmarksRequest:
1212112156
description: Request model for listing benchmarks.
1212212157
properties: {}
@@ -13098,38 +13133,6 @@ components:
1309813133
- vector_store_id
1309913134
- chunks
1310013135
title: DeleteChunksRequest
13101-
OpenAIResponseObjectStreamError:
13102-
description: |-
13103-
Standalone error event emitted during streaming when an error occurs.
13104-
13105-
This is distinct from response.failed which is a response lifecycle event.
13106-
The error event signals transport/infrastructure-level errors to the client.
13107-
properties:
13108-
code:
13109-
anyOf:
13110-
- type: string
13111-
- type: 'null'
13112-
nullable: true
13113-
message:
13114-
title: Message
13115-
type: string
13116-
param:
13117-
anyOf:
13118-
- type: string
13119-
- type: 'null'
13120-
nullable: true
13121-
sequence_number:
13122-
title: Sequence Number
13123-
type: integer
13124-
type:
13125-
const: error
13126-
default: error
13127-
title: Type
13128-
type: string
13129-
required:
13130-
- message
13131-
- sequence_number
13132-
title: OpenAIResponseObjectStreamError
1313313136
ListBatchesRequest:
1313413137
description: Request model for listing batches.
1313513138
properties:

0 commit comments

Comments
 (0)