co-mono/packages/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
..
src Add totalTokens field to Usage type 2025-12-06 22:46:02 +01:00
test Fix: Capture error from turn_end event in agent state 2025-11-13 23:20:03 +01:00
package.json Release v0.12.15 2025-12-06 21:29:03 +01:00
tsconfig.build.json Agent package + coding agent WIP, refactored web-ui prompts 2025-10-17 11:47:01 +02:00
vitest.config.ts Agent package + coding agent WIP, refactored web-ui prompts 2025-10-17 11:47:01 +02:00