mirror of
https://github.com/openai/codex.git
synced 2026-11-18 22:20:48 +00:00
Avoid rendering generated images twice (#34378)
## What changed - Tell the model that generated images are already displayed to the user and should not be repeated as Markdown images or file links. - Keep generated-image artifact paths and output hints owned by the image generation extension. - Centralize the availability check for the image generation tool across feature, provider, namespace-tool, model modality, and authentication requirements. ## Testing - Verify artifact paths sanitize session and call identifiers. - Verify the model-facing output hint reports that the generated image is already displayed. GitOrigin-RevId: 6c865b6a96d6a71bb2c33246d1518a00e7c8b840
This commit is contained in:
@@ -165,6 +165,10 @@ async fn standalone_image_generation_returns_saved_path_hint_to_model() -> Resul
|
||||
output_hint.contains(&saved_path.display().to_string()),
|
||||
"output hint should identify the path the extension saved"
|
||||
);
|
||||
assert!(
|
||||
output_hint.contains("already displayed to the user"),
|
||||
"output hint should tell the model not to repeat the generated image: {output_hint}"
|
||||
);
|
||||
assert!(
|
||||
!requests[1]
|
||||
.message_input_texts("developer")
|
||||
|
||||
Reference in New Issue
Block a user