co-mono/packages/web-ui/src/utils
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
..
attachment-utils.ts web-ui package 2025-10-05 13:30:08 +02:00
auth-token.ts Fix Lit dependency duplication and update mini-lit to 0.2.0 2025-11-12 16:03:43 +01:00
format.ts web-ui package 2025-10-05 13:30:08 +02:00
i18n.ts Custom provider WIP 2025-11-10 21:47:21 +01:00
model-discovery.ts Fix lints 2025-11-10 21:55:55 +01:00
proxy-utils.ts Better proxy handling. 2025-10-28 00:21:54 +01:00
test-sessions.ts Add totalTokens field to Usage type 2025-12-06 22:46:02 +01:00