Files
sub2api/backend
方程andClaude Opus 4.7 0da1fe28ef fix(openai): prevent false image billing on text-only /v1/responses requests
Two defects in the image output counter could inflate imageCount for
text-only responses, causing per-image charges instead of token billing:

1. addDataArray counted every element in a top-level "data" array
   without checking whether each element contained actual image output
   (url/b64_json).  Non-image objects in a "data" array are now skipped.

2. addImageOutputItem accepted image_generation.completed items with
   no result/b64_json/url, inflating the count.  These items are now
   filtered the same way as every other item type.

Fixes #3196

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-11 16:56:43 +08:00
..
2026-06-03 09:48:46 +08:00
2026-06-03 14:24:50 +08:00