mirror of
https://github.com/openai/codex.git
synced 2026-11-29 00:00:54 +00:00
Refactor image content to use a shared ImageReference type (#45543)
## What changed Represent images in `ContentItem` and `FunctionCallOutputContentItem` with `ImageReference::Inline`, flattened to preserve the existing `image_url` wire format. Update image producers and consumers and regenerate app-server schemas and SDK artifacts. Preserve the Python SDK's `InputImageContentItem` and `InputImageFunctionCallOutputContentItem` class names during generation. ## Testing Add a regression test for stable Python image class names and adapt existing image tests to the shared representation. GitOrigin-RevId: c38a780ac3314c2ac2deb3afc1b93b94b6f93fec
This commit is contained in:
committed by
copyberry
parent
6ae5e71458
commit
5a66d460d3
@@ -72,6 +72,7 @@ mod tests {
|
||||
use codex_client::TransportError;
|
||||
use codex_protocol::ResponseItemId;
|
||||
use codex_protocol::models::ContentItem;
|
||||
use codex_protocol::models::ImageReference;
|
||||
use codex_protocol::models::ResponseItem;
|
||||
use http::StatusCode;
|
||||
use pretty_assertions::assert_eq;
|
||||
@@ -164,7 +165,9 @@ mod tests {
|
||||
text: "find this".to_string(),
|
||||
},
|
||||
ContentItem::InputImage {
|
||||
image_url: "https://example.com/image.png".to_string(),
|
||||
image: ImageReference::Inline {
|
||||
image_url: "https://example.com/image.png".to_string(),
|
||||
},
|
||||
detail: None,
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user