mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-16 20:34:39 +08:00
fix(image): set stream=true on ChatGPT OAuth /codex/responses request
This commit is contained in:
parent
80cb3c84eb
commit
66510c96fa
@ -197,6 +197,11 @@ public class ChatGPTOAuthImageProvider implements ImageGenerationProvider {
|
|||||||
ObjectNode root = objectMapper.createObjectNode();
|
ObjectNode root = objectMapper.createObjectNode();
|
||||||
root.put("model", chatHostModel);
|
root.put("model", chatHostModel);
|
||||||
root.put("store", false);
|
root.put("store", false);
|
||||||
|
// The /codex/responses endpoint rejects non-streaming requests with
|
||||||
|
// HTTP 400 "Stream must be set to true" — the upstream client only
|
||||||
|
// ever calls it via the streaming path. We already parse SSE in the
|
||||||
|
// response handler.
|
||||||
|
root.put("stream", true);
|
||||||
root.put("instructions",
|
root.put("instructions",
|
||||||
"You are an image generation assistant. Always call the image_generation tool. "
|
"You are an image generation assistant. Always call the image_generation tool. "
|
||||||
+ "Do not produce any text response.");
|
+ "Do not produce any text response.");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user