github mksglu/context-mode v1.0.167

latest release: v1.0.168
9 hours ago

Per-turn token, cost, and savings capture (FinOps)

Events now carry real per-turn token usage, model id, and cost_usd, replacing the flat per-event cost proxy. Engineering leaders can see actual AI spend per model, how much context-mode saved, and net/ROI.

Highlights

  • Real per-model pricing catalog (63 curated models across Anthropic, OpenAI, Google, and other vendors) behind a small no-regex lookup module. Non-Claude models are now priced from their own rates instead of defaulting to Claude pricing.
  • Structured cost event (model_id plus four token counts and cost_usd), replacing the prior string encoding, so the platform persists typed columns.
  • Per-turn capture across the nine adapters that expose usage: claude-code (session transcript, cursor-gated to avoid double counting), pi, omp, opencode, openclaw, gemini-cli, codex, qwen-code, and kimi. Adapters whose host does not expose usage remain on a clearly labeled estimate.
  • bytes_avoided is now forwarded so the platform can attribute context-saving value.

All changes are additive and backward compatible.

Contributors

This release also includes community contributions — thank you:

Don't miss a new context-mode release

NewReleases is sending notifications on new releases.