Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions api_reference/openapi.transformed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Regenerate response models for assistant input items

When an assistant input is returned by responses.input_items.list, the changed InputMessageResource schema permits it, but ResponseInputMessageItem.role still excludes assistant; the alternative ResponseOutputMessage cannot parse its input_text content, 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 👍 / 👎.

- system
- developer
status:
Expand Down Expand Up @@ -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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Regenerate the schema and its metadata together

Editing this generated specification changes its MD5 to ff0cd3df4caef970f68fce6b3a861161, while .castiron.stats.yml still records e37bbe0f04caa6093f1cb5d65d23ad03. As a result, scripts/mock exits with “Local OpenAPI specification does not match generation metadata,” and every normal ./scripts/test run that needs to start the local mock server stops before running tests. Regenerate the artifacts through the supported workflow rather than manually rewriting the generation metadata.

AGENTS.md reference: AGENTS.md:L16-L18

Useful? React with 👍 / 👎.

- system
- developer
status:
Expand Down
4 changes: 2 additions & 2 deletions src/openai/types/responses/response_input_item_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update all request input aliases

This updates only the standalone ResponseInputItemParam duplicate. Responses.create accepts the separately generated ResponseInputParam, whose Message.role still excludes assistant; consequently, a valid assistant message carrying the optional status field cannot match either that Message or EasyInputMessageParam and is rejected by type checkers. The beta schema was also changed, but both beta request aliases retain the old role literal. Regenerate or update these duplicate request types so every endpoint represented by the changed schemas accepts the same messages.

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.
Expand Down