docs(ai): Document stripping inline media from agent messages#18599
Draft
obostjancic wants to merge 3 commits into
Draft
docs(ai): Document stripping inline media from agent messages#18599obostjancic wants to merge 3 commits into
obostjancic wants to merge 3 commits into
Conversation
AI agent messages can carry inline media (base64 images, audio, files) that may hold sensitive information. The SDK does not strip this by default, so document a beforeSendSpan example that replaces inline media with a placeholder while preserving the rest of the conversation. Refs TET-2569
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Make isInlineMedia the clear customization point and drop the base64 implementation trivia from the comments, so readers focus on adapting the matching logic to their own provider. Refs TET-2569
Frame the section around scrubbing data before it's sent, matching the phrasing used elsewhere in the privacy docs, instead of calling out what the SDK does not do by default. Refs TET-2569
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a "Stripping Images and Media from Messages" section to the AI agent monitoring Data Privacy page. AI messages can embed inline media (base64 images, audio, files) that may hold sensitive information, and the SDK does not strip it by default.
The new section documents a
beforeSendSpanexample that walks thegen_ai.input.messages,gen_ai.output.messages, andgen_ai.system_instructionsattributes and replaces inline media with a placeholder, preserving roles, text, and tool calls. Media is detected by the value's shape (data:URIs and large base64 blobs) rather than provider-specific field names, so it works across OpenAI, Anthropic, Google, and Vercel AI SDK shapes and leaves plain text and http(s) URLs untouched.Refs TET-2569