修正 GPT 图片响应契约说明

仅保留 GPT-Image-2 原生 b64_json 行为的行内注释。

不发送 response_format 参数,也不引入 URL 兼容下载。
This commit is contained in:
2026-09-11 17:48:55 +08:00
parent 4c88e5e924
commit 31fd1da495
@@ -136,8 +136,7 @@ pub async fn create_vector_engine_raw_image_edit(
.text("n", "1".to_string())
.text("prompt", prompt.to_string())
.text("size", format!("{}x{}", options.width, options.height))
// GPT-Image-2 的图片编辑响应契约只返回 b64_json,不处理 URL 响应
.text("response_format", "b64_json".to_string())
// GPT-Image-2 原生只返回 b64_json;不要添加 URL 下载或 response_format 兼容分支
.part(
"image",
Part::stream_with_length(image_bytes.clone(), image_bytes.len() as u64)