|
Fix token counting: show only completion tokens, not cumulative prompt+completion
The token_count displayed next to assistant messages was summing prompt_tokens + completion_tokens across ALL tool-calling iterations, giving hundreds of thousands of tokens for multi-turn conversations. Now: - token_count (coins icon) = only completion tokens generated by the model - context_tokens (ContextBar) = only prompt tokens (context size sent to LLM) This gives users a realistic measure of how much the model actually generated. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
|---|
|
|
| navi/core/agent.py |
|---|
| navi/core/events.py |
|---|
| navi/core/subagent_runner.py |
|---|
| tests/unit/core/test_agent.py |
|---|