You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2cc2b29
Browse filesBrowse the repository at this point in the historyBrowse files
fix(server-utils): Derive the Vercel AI conversation id from the OpenAI conversation option (#24979)
The Vercel AI integration filled `gen_ai.conversation.id` with
`providerMetadata.openai.responseId`. That is the id of the response
that just came back, so every call got a different value under a
grouping attribute and showed up as its own one-span conversation. The
same value is already on `gen_ai.response.id`. The mapping came in with
#16992 and #19903 later had to guard it from overwriting user-set ids.
The id now comes from `providerOptions.openai.conversation` (or
`azure`), the Conversations API `conv_` id, which is the same on every
turn. Child model-call and tool spans inherit it from the active
operation span. `Sentry.setConversationId()` still wins, since
`conversationIdIntegration` writes the scope value on `spanStart` after
these start attributes. The v6 adapter forwards `providerOptions` so
`ai` 4 to 6 behave the same.
Not in this PR: reading the id from `runtimeContext` /
`experimental_telemetry.metadata` goes with #24706 once #24721 lands.
Part of #24832
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
0 commit comments