co-mono/packages/web-ui/src/agent
Mario Zechner 86e5a70ec4 Add totalTokens field to Usage type
- Added totalTokens field to Usage interface in pi-ai
- Anthropic: computed as input + output + cacheRead + cacheWrite
- OpenAI/Google: uses native total_tokens/totalTokenCount
- Fixed openai-completions to compute totalTokens when reasoning tokens present
- Updated calculateContextTokens() to use totalTokens field
- Added comprehensive test covering 13 providers

fixes #130
2025-12-06 22:46:02 +01:00
..
transports Add totalTokens field to Usage type 2025-12-06 22:46:02 +01:00
agent.ts Add totalTokens field to Usage type 2025-12-06 22:46:02 +01:00
types.ts Refactor agent architecture and add session storage 2025-10-06 12:47:52 +02:00