@posthog/ai
8.22.0 · 20 Nov 2026MIT1.9M / weekRepositoryHomepagenpmAtom feed
Upgrading @posthog/ai From 8.6.7 to 8.6.8
1 release in betweenevery note read
Reading releases, release notes and advisories…
- 0
- changes to make
- 0
- advisories fixed
- 0
- new
- 2
- fixes
Release by release
- Fixed
Report cache-write tokens for the OpenAI wrapper. OpenAI-compatible providers that follow Anthropic's cache-write convention (e.g. Claude via OpenRouter) return cache-write tokens in the response usage (
prompt_tokens_details.cache_write_tokensfor Chat Completions,input_tokens_details.cache_write_tokensfor Responses), but the wrapper only surfaced cache reads. It now populates$ai_cache_creation_input_tokensacross Chat Completions and Responses (streaming, non-streaming, andparse()), so ingestion can price the cache-write premium for Claude/Anthropic models instead of under-reporting cost on cache-heavy calls. Completes the cache-aware cost fix started in #4071 (#3615). (2026-08-06) - Fixed
Preserve Anthropic cache creation TTL breakdowns in streaming and LangChain generation events. (2026-08-06)
- Fixed
2 internal lines (docs, tests, tooling) left out.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.