npm @mariozechner/pi-coding-agent 0.13.0
v0.13.0

latest releases: 0.73.1, 0.73.0, 0.72.1...
6 months ago

Breaking Changes

  • Added totalTokens field to Usage type: All code that constructs Usage objects must now include the totalTokens field. This field represents the total tokens processed by the LLM (input + output + cache). For OpenAI and Google, this uses native API values (total_tokens, totalTokenCount). For Anthropic, it's computed as input + output + cacheRead + cacheWrite.

Details

  • Added comprehensive test covering 13 providers (Anthropic, OpenAI Completions/Responses, Google, xAI, Groq, Cerebras, z.ai, and 5 OpenRouter backends)
  • Fixed openai-completions to compute totalTokens consistently when reasoning tokens are present
  • Updated calculateContextTokens() in compaction.ts to use totalTokens field

Closes #130

Don't miss a new pi-coding-agent release

NewReleases is sending notifications on new releases.