mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-25 07:59:04 +00:00
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>