Commit df822c7
committed
fix(types): make id and status optional in ResponseOutputMessageParam
When sending a client-authored assistant message via the Responses API
(e.g. replayed from storage, edited, or produced by other code), the
caller has no OpenAI message id or status. Previously the type system
required both fields, forcing developers to fabricate fake values or
use `# type: ignore`.
This change makes `id` and `status` Optional in both
`ResponseOutputMessageParam` and `BetaResponseOutputMessageParam`,
consistent with other input item types (e.g. `ComputerCallOutput`,
`FunctionCallOutput`, `ShellCall`) which already use `Optional[str]`
for these fields.
Fixes #35441 parent 0c09a3f commit df822c7
2 files changed
Lines changed: 12 additions & 6 deletions
File tree
- src/openai/types
- beta
- responses
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
35 | | - | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
28 | | - | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
0 commit comments