Skip to content

fix(server-utils): Map Flue messages to the gen_ai conventions - #24992

Draft
JPeer264 wants to merge 1 commit into
developfrom
jp/flue-map-messages-conventions
Draft

JPeer264 wants to merge 1 commit into
developfrom
jp/flue-map-messages-conventions

Conversation

@JPeer264

@JPeer264 JPeer264 commented Oct 2, 2026

Copy link
Copy Markdown
Member

Flue records the messages of its turns in pi-ai's own shape, with a toolResult role and toolCall parts. Sentry's AI views only render the gen_ai conventions shape, so tool calls and tool results were missing from Flue conversations, the tool result showed up with an invalid role, and images were recorded as base64. This maps the input and output messages to the conventions, the way #24352 did for Google GenAI.

The mapper lives in ai/pi-ai/ because pi-durable sends the same message shape, and its integration uses the mapper too.

🤖 Generated with Claude Code

Flue records its turn messages in pi-ai's shape, with a `toolResult` role
and `toolCall` parts. Sentry renders neither, so tool calls and tool
results were missing from the conversation views, and images were
recorded as base64. A shared pi-ai mapper now translates them to the
conventions, as the Google GenAI integration does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JPeer264
JPeer264 added this pull request to stack #25002 October 2, 2026 13:14
@JPeer264
JPeer264 removed this pull request from stack #25002 October 2, 2026 13:31
@JPeer264
JPeer264 added this pull request to stack #25004 October 2, 2026 13:57

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant