[bot] OpenAI Responses API `compact()` (server-side conversation compaction) not instrumented
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- ruby
- Lĩnh vực
- observability
Hướng nghiên cứu
Bắt đầu bằng cách đọc lib/braintrust/contrib/openai/instrumentation/responses.rb và lib/braintrust/contrib/openai/patcher.rb, sau đó so sánh phần instrumentation hiện có của create và stream. Bổ sung kiểm thử cho lệnh gọi compact thông qua đường dẫn patching Responses hiện có, đồng thời kiểm tra các bài kiểm thử liên quan đến spans, đầu ra đã compact và mức sử dụng. Hoàn tất khi client.responses.compact(params) tạo ra một trace có đầu vào, đầu ra và mức sử dụng token của lệnh gọi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
<!-- provider-gap-audit: openai-responses-compact-not-instrumented -->
Summary
The official openai Ruby gem's Responses resource exposes a stable compact method (client.responses.compact(params)) that invokes the model to compact/summarize a long-running conversation and returns an OpenAI::Models::Responses::CompactedResponse. This is a model-execution call — billed, and producing a model-generated summary — not a CRUD/admin operation. It is not instrumented anywhere in this repo: only create and stream are wrapped for the Responses API.
What is missing
OpenAI::Resources::Responses#compactis not wrapped byInstrumentation::Responsesand is not patched byResponsesPatcher.- No span is created, so a compaction call produces zero trace: no input, no output (the compacted summary), no token usage/cost for the compaction call itself.
Braintrust docs status
supported (in another Braintrust SDK, not Ruby) — https://docs.braintrust.dev/integrations/ai-providers/openai explicitly lists, in the TypeScript SDK's Responses API span table: openai.responses.compact ↔ responses.compact (OpenAI SDK v6.10.0 or later). The same page's Ruby-relevant sections only reference create, parse, and stream variants — compact is absent for Ruby (and for Python/Go/Java/.NET). This is a concrete Ruby-specific parity gap against Braintrust's own TypeScript instrumentation of the identical upstream capability.
Upstream sources
- Official OpenAI Ruby SDK:
OpenAI::Resources::Responses#compact(params)— "Compact a conversation. Returns a compacted response object." — https://github.com/openai/openai-ruby/blob/main/lib/openai/resources/responses.rb - OpenAI changelog: server-side compaction launched in the Responses API (February 2026) — https://platform.openai.com/docs/changelog
Local repo files inspected
lib/braintrust/contrib/openai/instrumentation/responses.rb—Instrumentation::Responses::InstanceMethodsdefines onlycreate(line 35) andstream(line 59); nocompactlib/braintrust/contrib/openai/patcher.rb—ResponsesPatcher#perform_patch(lines 94–111) includesInstrumentation::Responsesinto::OpenAI::Resources::Responses/the target's singleton class, but the module itself has nocompactwrapper, so calls pass straight tosuperuntracedlib/braintrust/contrib/openai/integration.rb— confirmsResponsesPatcheris the sole patcher registered for the Responses API surface
- Ngôn ngữ chính
- Ruby
- Star
- 9
- Fork
- 11
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của braintrustdata/braintrust-sdk-ruby
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
[BOT ISSUE] OpenAI Chat Completions missing reasoning model and web search metadata parametersĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 64/100
Tất cả issue của braintrustdata/braintrust-sdk-ruby
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Websockify heartbeat for vnc_containerCó thể đã có người làm @robinkar đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs verification
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 7 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
akitaonrails/ai-book-2026#13 ·
-
Mend: dependency security vulnerability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
Maintainer thường phản hồi trong vòng 1 ngày