---
title: "@posthog/ai 8.22.1 Breaking Changes on npm | Since.dev"
description: "What each @posthog/ai release removed, renamed or changed: 7 breaking changes in 3 versions on npm, each with its source."
canonical_url: https://since.dev/packages/npm/@posthog/ai
last_updated: 2026-12-04
---

# @posthog/ai breaking changes

@posthog/ai 8.22.1 (November 25, 2026) is its newest release with breaking changes. The first: Streamed OpenAI n>1 chat choices are reported separately in output choices in @posthog/ai 8.22.1. Every breaking API change we have recorded in @posthog/ai on npm: 7 breaking changes in 3 versions. Below, its 3 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `8.24.1`, released December 4, 2026. [Source repository](https://github.com/PostHog/posthog-js)

Packages on npm run on Node.js. [Node.js end of life dates](https://since.dev/calendar/nodejs.md).

- From [8.20.0](#v-8-20-0) to [8.22.1](#v-8-22-1): 5 breaking changes in 2 versions.

## @posthog/ai 8.22.1 breaking changes

@posthog/ai 8.22.1, released November 25, 2026: 1 breaking change.

- **Behavior changed**  

Streamed OpenAI chat completions with n > 1 now report each choice as its own message in $ai_output_choices, and $ai_stop_reason comes from the first choice. [github.com](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/ai%408.22.1)

## @posthog/ai 8.21.0 breaking changes

@posthog/ai 8.21.0, released November 17, 2026: 4 breaking changes.

- **Behavior changed**  

An empty or whitespace-only distinct id now counts as missing in every integration. The event then uses the trace or run id and stays personless. [github.com](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/ai%408.21.0)
- **Behavior changed**  

With posthog-node 6.x.x every AI event goes through captureAi on the capture v1 AI lane, so enableFullAiCapture no longer decides whether AI events are sent. With posthog-node 5.x.x, AI events still use capture unless enableFullAiCapture... [github.com](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/ai%408.21.0)
- **Behavior changed**  

An empty or whitespace-only distinct id now counts as missing, so those AI events use the trace or run id and stay personless. Code that relied on the empty id being used as-is should check its events. [github.com](https://github.com/PostHog/posthog-js/commit/6405dfda3d32c452fd0b1497fa19383c0d64a1ff)
- **Behavior changed**  

On posthog-node 6.x.x, AI events carry person processing only through the process_person_profile option. Code that relied on other person-processing settings for AI events should set that option. [github.com](https://github.com/PostHog/posthog-js/releases/tag/%40posthog/ai%408.21.0)

## @posthog/ai 8.20.0 breaking changes

@posthog/ai 8.20.0, released November 12, 2026: 2 breaking changes.

- **Signature changed** `evaluations:CreateScorerOptions`  

Was type CreateScorerOptions = {\[K in ScorerKind\]: {name: string; kind: K; config: ScorerConfigs\[K\]; description?: string | null; tags?: readonly string\[\];};}\[ScorerKind\]; now type CreateScorerOptions = {\[K in ScorerKind\]: {name: string... [npmjs.com](https://www.npmjs.com/package/@posthog/ai/v/8.20.0)
- **Signature changed** `evaluations:Scorers.createVersion`  

Was createVersion(scorerId: string, options: {config: ScorerConfig; baseVersion?: number; name?: string; description?: string | null;}, request?: RequestOptions): Promise\<Scorer>; now createVersion(scorerId: string, options: {config... [npmjs.com](https://www.npmjs.com/package/@posthog/ai/v/8.20.0)

## Related packages

- [posthog-js](https://since.dev/packages/npm/posthog-js.md)
- [posthog-node](https://since.dev/packages/npm/posthog-node.md)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
