getsentry / getsentry/sentry-javascript

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

Đang mở
#22,838 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Task
Ngôn ngữ chính
TypeScript
Star
8.7k
Fork
1.8k
Merge trung bình
1 ngày 17 giờ
Pull request đã merge (30 ngày)
515

Mô tả

`@sentry/conventions` deprecates `gen_ai.response.text` in favor of `gen_ai.output.messages`. `gen_ai.response.text` holds a stringified array of text strings; `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 response text 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.tool_calls` 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.text`]()
* [`gen_ai.output.messages`]()

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Review the OpenAI, Anthropic, Google GenAI, LangChain, LangGraph, Workers AI, and shared streaming integrations, along with the related gen_ai conventions. Determine how response text and tool calls should merge into gen_ai.output.messages, accounting for the unresolved Relay discussion. Done means all affected integrations emit the structured attribute without the deprecated response attributes.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
typescript
Lĩnh vực
observability-sre
Loại issue
Tái cấu trúc
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.