chore(core): drop tool token usage tracking (#3727)

The `tool_token_count` field was sourced from `toolUsePromptTokenCount`
on the GenAI usage metadata, but none of the providers we adapt
(OpenAI/DashScope, Anthropic) populate it, and Google's Gemini API only
emits it for built-in server-side tools that qwen-code does not use.
The metric was therefore always zero in practice, so the dedicated
counter, telemetry field, UI row, and supporting plumbing are removed
end-to-end (telemetry types, OTEL counter type, UI aggregation, model
stats display, qwen-logger payload, VS Code session schema, and docs).
This commit is contained in:
tanzhenxin 2026-04-30 15:35:01 +08:00 committed by GitHub
parent bc32298528
commit 6c71b6b09c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 3 additions and 104 deletions

View file

@ -249,7 +249,6 @@ Logs are timestamped records of specific events. The following events are logged
- `output_token_count`
- `cached_content_token_count`
- `thoughts_token_count`
- `tool_token_count`
- `response_text` (if applicable)
- `auth_type`
@ -315,7 +314,7 @@ Metrics are numerical measurements of behavior over time. The following metrics
- `qwen-code.token.usage` (Counter, Int): Counts the number of tokens used.
- **Attributes**:
- `model`
- `type` (string: "input", "output", "thought", "cache", or "tool")
- `type` (string: "input", "output", "thought", or "cache")
- `qwen-code.file.operation.count` (Counter, Int): Counts file operations.
- **Attributes**: