releases.shpreview
PostHog/PostHog JS/@posthog/ai@7.20.0

Generation events now carry completion ID and provider metadata

@posthog/ai@7.20.0

1 featureThis release1 featureNew capabilitiesAI-tallied from the release notes

7.20.0

Minor Changes

  • #3306 1a2f8a8 Thanks @johnsykim! - Add $ai_completion_id and $ai_provider_metadata to $ai_generation events for the OpenAI and Azure OpenAI wrappers. $ai_completion_id is the provider's response ID (e.g. chatcmpl-… / resp_…); $ai_provider_metadata carries OpenAI-specific fields (system_fingerprint, request_id). Together they enable correlating PostHog events with OpenAI's Logs dashboard (platform.openai.com/logs/{completion_id}). The same options (completionId, providerMetadata) are now accepted by the public captureAiGeneration primitive so other provider wrappers can follow the same pattern. (2026-05-29)

Fetched May 29, 2026