Skip to content

1.0.26

Choose a tag to compare

@morapelker morapelker released this 18 Feb 17:51
· 3168 commits to main since this release

What's Changed

Fix Claude agent context calculation and model ref parsing (#38)

  • Transcript reader: Extend translateEntry() to preserve requestId, usage, and model metadata on assistant JSONL entries, enabling downstream token hydration from Claude Code transcripts
  • Token extraction: Add firstFiniteNumber() helper and broaden extractTokens() to handle Claude SDK field naming conventions (input_tokens, output_tokens, cache_read_input_tokens, cache_creation_input_tokens, camelCase variants) and the context_window.current_usage payload shape
  • Model ref parsing: Extend extractModelRef() to resolve model identity from a model object (providerID/modelID), or by splitting a "provider/model" string (e.g. "anthropic/claude-sonnet-4-5-20250929")
  • Tests: Add 4 new test cases covering raw *_tokens fields, context_window.current_usage shape, info.model string parsing, and assistant usage/request metadata preservation