mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 21:05:40 +07:00
[GH-ISSUE #4678] Token counter shows "—" with native engine: tokensIn never reported (usageSource=unavailable #2132
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2132
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Dark69Light on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4678
[BUG] Token counter shows "—" with native engine: tokensIn never reported (usageSource=unavailable)
Environment:
Symptom:
In the serving/usage panel the "Total tokens" field shows an em-dash "—" forever, even though chats run normally and the engine clearly counts tokens in its own log (
strata serve: prompt 29757 tokens = 29708 reused + 49 read ... 561 generated).Evidence:
GET http://127.0.0.1:47831/api/servingright after a completed chat request:So the request log stores
tokensIn: nullandusageSource: "unavailable"for local native-engine requests. OnlytokensOutis filled. The UI faithfully renders the missing input count as "—".Expected:
Native engine serve frames include prompt tokens (the engine log line proves the engine knows them: "prompt N tokens = X reused + Y read"), so
tokensInshould be populated (and cache stats, ideally) and the total counter should add up.Steps to reproduce:
GET /api/serving.tokensIn: null, usageSource: "unavailable"; UI "total tokens" stays "—".Workaround: reading totals from the engine log (
%LOCALAPPDATA%\Strata\install\strata-<model>.log), which has full per-request token accounting.@github-actions[bot] commented on GitHub (Oct 30, 2026):
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
@github-actions[bot] commented on GitHub (Nov 5, 2026):
Closing this issue because it still did not follow the format after 5 days. That is housekeeping, not a rejection.
To bring it back: fix the title (area prefix) and the missing parts, then comment
/reopen. A check runs and reopens it, or tells you what is still missing. See CONTRIBUTING.md.