Skip to content

fix(devops): correct CompletionTokens assignment typo in callback handler#783

Closed
SKDG042 wants to merge 1 commit intocloudwego:mainfrom
SKDG042:fix/devops-completion-tokens-typo
Closed

fix(devops): correct CompletionTokens assignment typo in callback handler#783
SKDG042 wants to merge 1 commit intocloudwego:mainfrom
SKDG042:fix/devops-completion-tokens-typo

Conversation

@SKDG042
Copy link
Copy Markdown
Contributor

@SKDG042 SKDG042 commented Apr 17, 2026

What type of PR is this?

fix

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

CompletionTokens 被错误赋值成 PromptTokens

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en: In devops/internal/service/call_option.go:143, CompletionTokens was incorrectly assigned ext.TokenUsage.PromptTokens due to a copy-paste error. This causes the completion token count in DevOps debug metrics to always equal the prompt token count, making token usage statistics unreliable for billing analysis and performance monitoring.

zh(optional): 在 devops/internal/service/call_option.go:143 中,CompletionTokens 被错误地赋值为 ext.TokenUsage.PromptTokens。这导致 DevOps 调试指标中的 completion token 数量永远等于 prompt token 数量,使得 token 使用统计在计费分析和性能监控场景下不可信。

(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:

@SKDG042 SKDG042 closed this Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant