Repository navigation
Record Ollama tokens and label unreported Insights costs (CL-6659) - #615
Merged
TheGreatAxios merged 1 commit intoSep 4, 2026
Conversation
Ollama's OpenAI-compat stream often omitted usage, so Insights showed Cost $0.00 / 0/0 for real local turns. Requests now ask for a terminal usage chunk and native prompt_eval_count maps onto inference.usage. Turns with no token counts keep null cost (not $0.00) and the landing labels the exclusion. Catalogued Ollama models still cost $0 once tokens are present. A team-space parent with its own turns stays in the workbench breakdown.
Contributor
Author
Self-reviewVerdict: READY. The Ollama adapter now requests a terminal usage chunk and maps native
Tests: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ollama local turns showed Cost $0.00 / 0/0 on Insights while activity and latency proved they happened. The adapter now asks the OpenAI-compat endpoint for a terminal usage chunk and maps native prompt_eval_count/eval_count onto inference.usage.
Turns with no token counts keep null cost (not $0.00) and the landing labels the exclusion. Catalogued Ollama models still cost $0 once tokens are present — no invented dollar costs. A team-space parent with its own recorded turns stays in the workbench breakdown; an empty parent is still dropped as a duplicate of All workbenches.
Fixes CL-6659
Verification