diff --git a/src/openai/types/responses/response_input_item_param.py b/src/openai/types/responses/response_input_item_param.py index 87ea1bc572..c03b4beb1b 100644 --- a/src/openai/types/responses/response_input_item_param.py +++ b/src/openai/types/responses/response_input_item_param.py @@ -176,10 +176,10 @@ class ImageGenerationCall(TypedDict, total=False): id: Required[str] """The unique ID of the image generation call.""" - result: Required[Optional[str]] + result: Optional[str] """The generated image encoded in base64.""" - status: Required[Literal["in_progress", "completed", "generating", "failed"]] + status: Literal["in_progress", "completed", "generating", "failed"] """The status of the image generation call.""" type: Required[Literal["image_generation_call"]] diff --git a/src/openai/types/responses/response_input_param.py b/src/openai/types/responses/response_input_param.py index cf4d529521..576d52da0b 100644 --- a/src/openai/types/responses/response_input_param.py +++ b/src/openai/types/responses/response_input_param.py @@ -177,10 +177,10 @@ class ImageGenerationCall(TypedDict, total=False): id: Required[str] """The unique ID of the image generation call.""" - result: Required[Optional[str]] + result: Optional[str] """The generated image encoded in base64.""" - status: Required[Literal["in_progress", "completed", "generating", "failed"]] + status: Literal["in_progress", "completed", "generating", "failed"] """The status of the image generation call.""" type: Required[Literal["image_generation_call"]] diff --git a/tests/test_response_input_types.py b/tests/test_response_input_types.py new file mode 100644 index 0000000000..b15053c047 --- /dev/null +++ b/tests/test_response_input_types.py @@ -0,0 +1,15 @@ +from __future__ import annotations + +from openai.types.responses import ResponseInputParam +from openai.types.responses.response_input_item_param import ImageGenerationCall + + +def test_image_generation_call_input_allows_id_only() -> None: + image_generation_call: ImageGenerationCall = { + "id": "ig_123", + "type": "image_generation_call", + } + + response_input: ResponseInputParam = [image_generation_call] + + assert response_input == [image_generation_call]