@posthog/ai
8.22.0 · 20 Nov 2026MIT1.9M / weekRepositoryHomepagenpmAtom feed
8.22.0 is the newest release of 8.x.
In short
1 fixed
Release note
Patch Changes
ai: Only record a service tier the provider actually served. The requested
service_tierno longer reaches$ai_model_parametersfrom any capture path — OpenAI error paths, the LangChain callback, and Anthropic events (whose'auto'/'standard_only'request values were previously recorded) — so cost processing cannot price tokens at an unconfirmed tier. The LangChain callback now reads the served tier from the response (messageresponse_metadataorgenerationInfo, depending on the adapter), and OpenAI and LangChain generations additionally emit the served tier as the explicit$ai_service_tierevent property, which cost processing prices from.
(2026-09-10)
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.