-
Notifications
You must be signed in to change notification settings - Fork 5.1k
fix: allow assistant messages in Responses input types #3722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39474,9 +39474,10 @@ components: | |
| role: | ||
| type: string | ||
| description: | | ||
| The role of the message input. One of `user`, `system`, or `developer`. | ||
| The role of the message input. One of `user`, `assistant`, `system`, or `developer`. | ||
| enum: | ||
| - user | ||
| - assistant | ||
| - system | ||
| - developer | ||
| status: | ||
|
|
@@ -72326,9 +72327,10 @@ components: | |
| role: | ||
| type: string | ||
| description: | | ||
| The role of the message input. One of `user`, `system`, or `developer`. | ||
| The role of the message input. One of `user`, `assistant`, `system`, or `developer`. | ||
| enum: | ||
| - user | ||
| - assistant | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Editing this generated specification changes its MD5 to AGENTS.md reference: AGENTS.md:L16-L18 Useful? React with 👍 / 👎. |
||
| - system | ||
| - developer | ||
| status: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -89,8 +89,8 @@ class Message(TypedDict, total=False): | |
| types. | ||
| """ | ||
|
|
||
| role: Required[Literal["user", "system", "developer"]] | ||
| """The role of the message input. One of `user`, `system`, or `developer`.""" | ||
| role: Required[Literal["user", "assistant", "system", "developer"]] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This updates only the standalone Useful? React with 👍 / 👎. |
||
| """The role of the message input. One of `user`, `assistant`, `system`, or `developer`.""" | ||
|
|
||
| status: Literal["in_progress", "completed", "incomplete"] | ||
| """The status of item. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When an assistant input is returned by
responses.input_items.list, the changedInputMessageResourceschema permits it, butResponseInputMessageItem.rolestill excludesassistant; the alternativeResponseOutputMessagecannot parse itsinput_textcontent, so SDK response validation fails instead of returning the item. The beta response model has the same mismatch. Regenerate the response-side models as well as the request aliases so returned assistant inputs deserialize correctly.AGENTS.md reference: AGENTS.md:L5-L8
Useful? React with 👍 / 👎.