Skip to content

v0.17.3

Choose a tag to compare

@LIUTod LIUTod released this 29 Sep 08:36

scream-code 0.17.3

Image generation hardening — fixes a silent failure mode where a relay gateway that returns an empty placeholder for the image payload produced a 0-byte "successful" image.

Fixes

  • No more empty "successful" images: services answering with {"b64_json":"","url":"…"} (empty placeholder next to the real link) previously yielded a 0-byte PNG reported as saved. The tool now prefers the first non-empty payload field, follows the URL, and reports success only after real bytes reach the disk.
  • Payload validation: data: URL prefixes are stripped before decoding, and empty or non-image payloads (for example an HTML error page) fail with an actionable error instead of being written as a .png.
  • Size handling: whitespace-only size values are normalized on both the config and the argument side.
  • Setup wording: the model prompt in /config image no longer names one preset's default model.

Compatibility

  • The config format is unchanged; existing image-config.json files keep working, including legacy base_url-style configs.

中文说明

生图功能加固:修复部分中转网关返回"空占位符 + 真图链接"时,工具写入 0 字节图片却报告成功的问题。

  • 不再出现"空图也算成功":网关返回 {"b64_json":"","url":"…"} 时,现在优先取非空字段、按 URL 下载,只有真实字节落盘才报成功。
  • 负载校验:解码前自动剥离 data: 前缀;空负载或非图片内容(如 HTML 错误页)直接报可操作的错误,不再写成 .png。
  • 尺寸处理:配置与参数两侧都对 size 做空白归一。
  • 配置向导文案:/config image 的模型步骤提示不再写死某个预设的默认模型。

兼容性:配置格式不变,既有 image-config.json 继续可用(含旧版 base_url 形态)。