getsentry / getsentry/sentry-javascript

Replace deprecated `gen_ai.response.tool_calls` with `gen_ai.output.messages`

Aperta
#22,839 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Task
Lingua principale
TypeScript
Stelle
8.7k
Fork
1.8k
Merge medio
1g 17h
PR unite (30g)
515

Descrizione

`@sentry/conventions` deprecates `gen_ai.response.tool_calls` in favor of `gen_ai.output.messages`. `gen_ai.response.tool_calls` holds a stringified array of tool-call objects; `gen_ai.output.messages` expects a stringified array of structured message objects (`[{role, parts: [...], finish_reason}]`), which unifies response text and tool calls into a single message.

Entails building the structured message format from the tool calls and emitting it under the new attribute. Affects all AI integrations (OpenAI, Anthropic, Google GenAI, LangChain, LangGraph, Workers AI, and the shared streaming path). Should be done together with the `gen_ai.response.text` replacement, since both merge into the same `gen_ai.output.messages` attribute.

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:

* [`gen_ai.response.tool_calls`]()
* [`gen_ai.output.messages`]()

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by reviewing the gen_ai.response.tool_calls and gen_ai.output.messages convention references, then trace the OpenAI, Anthropic, Google GenAI, LangChain, LangGraph, Workers AI, and shared streaming integrations. Coordinate this with the gen_ai.response.text replacement and resolve the noted Relay discussion first; done means tool calls are represented in the new structured output-messages attribute across the affected paths.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript
Ambito
observability
Tipo di issue
Refactoring
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.