[bot] OpenAI Responses API hosted Shell tool (shell_call) missing from server-side tool child-span list
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
- 80/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ệ
- java
- Lĩnh vực
- observability
Hướng nghiên cứu
Mở braintrust-sdk/src/main/java/dev/braintrust/instrumentation/InstrumentationSemConv.java và đọc OPENAI_SERVER_SIDE_ITEM_INPUT_KEYS cùng với addOpenAIServerSideChildSpans, dùng mục code_interpreter_call hiện có làm mẫu; khóa đầu vào cho shell_call là action. Sau đó thêm một bài kiểm thử trong braintrust-sdk/src/test/java/dev/braintrust/instrumentation/InstrumentationSemConvTest.java mô phỏng emitsWebSearchCallToolSpanParentedToLlm, và để local_shell_call bị loại trừ giống computer_call. Hoàn tất nghĩa là một mục shell_call tạo ra một span con với metadata đầu vào/đầu ra và bài kiểm thử mới chạy qua.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
OpenAI's Responses API added a built-in, server-executed "Hosted Shell" tool (launched Feb 10, 2026 per the official changelog). When used in hosted mode (environment.type = container_auto or container_reference), the model's shell commands are executed server-side by OpenAI inside a managed container — the same execution category as code_interpreter_call, which this repo already instruments with a dedicated child span.
This repo already has first-class support for structured per-tool child spans on Responses API output items: addOpenAIServerSideChildSpans / OPENAI_SERVER_SIDE_ITEM_INPUT_KEYS in InstrumentationSemConv.java currently cover web_search_call, file_search_call, code_interpreter_call, and mcp_call, each getting a dedicated type:"tool" child span with input/output/metadata capture (mirroring the equivalent Anthropic server-tool-use span logic). computer_call and image_generation_call are deliberately excluded, each with an explicit code comment and a dedicated test explaining why (client-executed / unredacted base64 blob respectively).
The new hosted Shell tool's output item type, "shell_call" (paired with "shell_call_output"), is not in OPENAI_SERVER_SIDE_ITEM_INPUT_KEYS and has no exclusion comment or test — it simply wasn't considered, since the tool launched after this feature was built. As a result, shell_call items fall through with no child span: no per-call input capture, no separate output/status/latency breakdown — unlike the functionally identical code_interpreter_call. (The raw item still appears in the parent span's full JSON passthrough, so data isn't entirely lost, but the structured tool-call span Braintrust's UI surfaces is missing for this tool.)
Item shapes, per official docs:
shell_call:{"type": "shell_call", "call_id": ..., "status": "in_progress", "action": {"commands": [...], "timeout_ms": ..., "max_output_length": ...}}shell_call_output:output[]entries of{stdout, stderr, outcome: {type: "exit", exit_code} | {type: "timeout"}}
Note: this is distinct from the older, always-client-executed local_shell_call (Codex-only, deprecated — per OpenAI's own docs "the API only returns instructions; it does not execute them on OpenAI infrastructure" and "for new use cases, use the current shell tool"), which correctly should remain excluded the same way computer_call is.
Braintrust docs status: supported (for the covered tool set; shell_call absent)
https://www.braintrust.dev/docs/integrations/ai-providers/openai explicitly documents, for the Java SDK: "One child span per server-side tool call (web_search_call, file_search_call, code_interpreter_call, mcp_call)." shell_call is not listed, consistent with the code gap.
Upstream sources
- https://developers.openai.com/api/docs/changelog — "Launched a new Hosted Shell tool, as well as support for networking in containers" (Feb 10, 2026).
- https://developers.openai.com/api/docs/guides/tools-shell — current hosted Shell tool documentation and item shapes.
- https://developers.openai.com/api/docs/guides/tools-local-shell — confirms the deprecated
local_shell_callis Codex-only, always client-executed, and superseded by the currentshelltool for new use cases.
Local repo files inspected
braintrust-sdk/src/main/java/dev/braintrust/instrumentation/InstrumentationSemConv.java—OPENAI_SERVER_SIDE_ITEM_INPUT_KEYS(covered types),addOpenAIServerSideChildSpans(dispatch/continue-on-unknown-type behavior), the documented exclusions forcomputer_call/image_generation_call.braintrust-sdk/src/test/java/dev/braintrust/instrumentation/InstrumentationSemConvTest.java— existing per-tool-type tests (e.g.emitsWebSearchCallToolSpanParentedToLlm),clientSideCallsAreNotSpanned,imageGenerationCallIsNotSpanned; no equivalent test or exclusion forshell_call.- Repo-wide case-insensitive search for
shell_call/local_shell_call/hosted shell/ShellToolacross source, tests, and VCR cassettes — zero matches.
Suggested fix
Add "shell_call" to OPENAI_SERVER_SIDE_ITEM_INPUT_KEYS with its input key (action), following the same pattern as web_search_call, plus a test mirroring the existing code_interpreter_call/web_search_call child-span tests. The deprecated local_shell_call should remain excluded, consistent with the computer_call exclusion.
- Ngôn ngữ chính
- Java
- Star
- 21
- Fork
- 5
- Merge trung bình
- 1 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Không có Dockerfile hay 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-java
-
[bot] Anthropic MCP connector tool calls (mcp_tool_use/mcp_tool_result) produce broken, input-less child spansCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug java
Độ 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 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
java
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Tất cả issue của braintrustdata/braintrust-sdk-java
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
oracle/graalvm-reachability-metadata#11472 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
status: waiting-for-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
spring-projects/spring-ai#7269 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 89/100
objectionary/hone-maven-plugin#1353 ·
Maintainer thường phản hồi trong vòng 9 ngày
-
ClassNotFoundException: io.netty.channel.kqueue.KQueueEventLoop stack trace printed during native build on main (Netty 4.2 removed the class)Có thể đã có người làm @gastaldi đã nhận hôm nay. Đang mởarea/netty kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
quarkusio/quarkus#57939 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
conductor-oss/conductor#1777 ·
Maintainer thường phản hồi trong vòng 4 ngày