mirror of
https://github.com/openai/codex.git
synced 2026-10-28 18:58:46 +00:00
Expose and persist image generation IDs (#57552)
## What changed Expose the backend-provided `generationId` on image-generation items and preserve it through legacy completion events, thread history reconstruction, and rollout migration. Default missing IDs to `None` for older history. Update the generated JSON schemas, TypeScript types, and Python models to include the nullable field. ## Testing Extend coverage for ID serialization round trips, completed-item notifications, persisted and resumed history, and legacy rollout migration. GitOrigin-RevId: a7f06faa7ac6833417b257a535d2901c03b79135
This commit is contained in:
@@ -5558,6 +5558,13 @@ class FileIdThreadItem(BaseModel):
|
||||
),
|
||||
] = None
|
||||
failure: ImageGenerationFailure | None = None
|
||||
generation_id: Annotated[
|
||||
str | None,
|
||||
Field(
|
||||
alias="generationId",
|
||||
description="Image generation identifier for the generated image, when provided by the image backend.",
|
||||
),
|
||||
] = None
|
||||
id: str
|
||||
input_images: Annotated[
|
||||
list[ImageGenerationInputImage] | None,
|
||||
@@ -5593,6 +5600,13 @@ class ResultThreadItem(BaseModel):
|
||||
),
|
||||
] = None
|
||||
failure: ImageGenerationFailure | None = None
|
||||
generation_id: Annotated[
|
||||
str | None,
|
||||
Field(
|
||||
alias="generationId",
|
||||
description="Image generation identifier for the generated image, when provided by the image backend.",
|
||||
),
|
||||
] = None
|
||||
id: str
|
||||
input_images: Annotated[
|
||||
list[ImageGenerationInputImage] | None,
|
||||
|
||||
Reference in New Issue
Block a user