new-api icon indicating copy to clipboard operation
new-api copied to clipboard

gemini 支持 heif

Open Saerdna opened this issue 8 months ago • 2 comments

提交前必读(请勿删除本节)

  • 文档:https://docs.newapi.ai/
  • 使用问题先看或先问:https://deepwiki.com/QuantumNous/new-api
  • 警告:删除本模板、删除小节标题或随意清空内容的 issue,可能会被直接关闭;重复恶意提交者可能会被 block。

您当前的 newapi 版本

v0.11.2

提交确认

  • [x] 我已确认目前没有类似 issue
  • [x] 我已完整查看过文档 https://docs.newapi.ai/ 和项目 README,已确定现有版本无法满足需求
  • [x] 我未删除此模板中的任何引导内容或小节标题,并会按要求完整填写
  • [x] 我理解项目维护者精力有限,不遵循模板要求的 issue 可能会被无视或直接关闭

功能描述 gemini 支持 heif 格式,但是代码中做了限制 https://ai.google.dev/gemini-api/docs/image-understanding?hl=zh-tw

relay/channel/gemini/relay-gemini.go

// https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference?hl=zh-cn#blob var geminiSupportedMimeTypes = map[string]bool{ "application/pdf": true, "audio/mpeg": true, "audio/mp3": true, "audio/wav": true, "image/png": true, "image/jpeg": true, "image/jpg": true, // support old image/jpeg "image/webp": true, "text/plain": true, "video/mov": true, "video/mpeg": true, "video/mp4": true, "video/mpg": true, "video/avi": true, "video/wmv": true, "video/mpegps": true, "video/flv": true, }

应用场景 iphone用户拍照默认都是 heif的图片,如果不支持则需要上游再进行图片转换,非常不方便

Saerdna avatar Mar 30 '26 10:03 Saerdna

[Bot Review]

感谢提交。这个 issue 使用了功能请求模板,但“版本/version”还没有填写具体版本号,“应用场景/Use Case”目前也是空的。建议补充一下当前使用的 new-api 版本,以及希望在哪些实际场景中使用 Gemini 的 heif 支持,方便其他人更完整地理解需求。

已经补充

Saerdna avatar Apr 08 '26 06:04 Saerdna