fix: resolve image generation 429 cascade returning 502 to clients
xbang
de7d5cb
Concurrent /v1/images/edits and /v1/images/generations requests were returning
502 Bad Gateway to clients even though images were successfully generated on
the user's ChatGPT account (quota consumed). Three layered bugs caused every
image request to fail:
Bug A (root cause) - stream parser dropped file_ids
update_conversation_state gated file_id extraction on is_image_tool_event
which requires the full {author.role: tool, metadata.async_task_type:
image_gen} structure. ChatGPT delivers asset_pointer via subsequent patch
events that lack those fields, so file_ids were extracted by regex but
silently discarded. Every image request was forced into the polling
fallback path, which then hammered /backend-api/conversation/{id} and
tripped upstream rate limits.
Fix: open the gate when state.tool_invoked is True (set by an earlier
server_ste_metadata event) OR when the event is itself a patch event whose
payload references asset_pointer / file-service://. The patch-event-…
feat: 最小侵入兼容 images edits JSON 请求体
hzexe
9707d1c
fix: report invalid token refresh failures
HouYunFei+1: Codex
f394c2c
Co-Authored-By: Codex <noreply@openai.com>
增加图片管理、日志管理,优化敏感词等场景
HouYunFei+1: Codex
bef1a50
Co-Authored-By: Codex <noreply@openai.com>
feat: add anthropic messages endpoint
HouYunFei+1: Codex
67d1cff
Co-Authored-By: Codex <noreply@openai.com>
fix helper image extraction to use latest user turn
HouYunFei+1: Codex
b622c72
Co-Authored-By: Codex <noreply@openai.com>
feat: support multiple reference images in /v1/chat/completions for image editing