Skip to content

Replace deprecated gen_ai.prompt with gen_ai.input.messages #22837

Description

@nicohrubec

@sentry/conventions deprecates gen_ai.prompt in favor of gen_ai.input.messages. gen_ai.prompt holds a raw prompt string (legacy Anthropic Completions API); gen_ai.input.messages expects a stringified array of structured message objects ([{role, parts: [{type, content}]}]).

Entails wrapping the legacy prompt into the new structured message format and emitting it under the new attribute. Affects the Anthropic AI integration.

We can likely postpone this until after the major, if we do it at all, since there are still discussions about handling this in Relay.

References:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions