Skip to content

Conversation

sunlei1024
Copy link
Collaborator

概要

为 OpenAI 兼容接口 /chat/completions/completions 新增 文生图 usage 统计支持


主要改动

  • usage 中新增字段 completion_tokens_details.image_tokens
  • 支持在文生图请求中返回图像 token 的使用情况

示例:

"usage": {
  "prompt_tokens": 13,
  "total_tokens": 18,
  "completion_tokens": 5,
  "prompt_tokens_details": {
    "cached_tokens": 0
  },
  "completion_tokens_details": {
    "image_tokens": 0
  }
}

@paddle-bot
Copy link

paddle-bot bot commented Oct 22, 2025

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant