Realtime: with async_tool_calls=True, an interruption mid-tool is answered with no pending marker for the call, and the model claims the action already happened
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 44/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- python
- 领域
- ai, backend-api-design
调研方向
Start by reading the RealtimeSession async tool call and interruption handling paths; the issue names no source files or tests. Reproduce with the linked stopbench realtime_run.py command using --async-tools true and inspect how an in-flight call is represented in conversation context. Done means the model can identify a still-running call without claiming its result, with tests covering interruption during execution.
由索引模型根据 Issue 内容生成。
描述
Versions
- openai-agents 0.24.0,
RealtimeSession - gpt-realtime-2.1, text output
Summary
When the user interrupts while a function tool is running, the stop is answered before the tool has a result, and the model has nothing in its conversation saying the call is still pending. It then guesses, and its guess can be wrong.
Setup: a refund tool with a 400 ms backend commit. The stop is session.interrupt() then session.send_message("Wait, stop. Don't do the refund."). A local ledger records whether the refund committed.
interrupt()cancelled nothing in this text session. Every response in all 40 runs endedcompleted, and the tool always ran to completion.- With
async_tool_calls=True(the default), the stop gets its own response right away while the call has no output yet. In 15 of 15 stop runs the first reply said the refund was "already" in progress, sent or submitted before the model had a result. - When the stop came before the tool's HTTP request was sent, the reply ("I can't stop it at this point because the refund request has already been submitted.") was false when it was said. The ledger received the request 202 to 207 ms later.
- With
async_tool_calls=False, the stop waits for the tool, and the model answers from the real result. But the user hears nothing until the tool returns (6.2 to 6.5 s with a 6 s backend).
Expected
With async_tool_calls=True, a call that's still running should show in the model's context as pending (e.g. a placeholder function output, or a note that a tool call is in progress), so the model can say "it's still processing" and not guess. A way to cancel the running tool task on interrupt() would also help tools that can still be stopped.
Repro
https://github.com/chrislazar25/stopbench
.venv-realtime/bin/python realtime_run.py --async-tools true --runs 5 --moments before_send in_flight --out runs/mine/realtime.jsonl
Data: runs/realtime-gpt-realtime-2.1.jsonl (e.g. refund 5c7a420531e0, before send: "I can't stop it at this point—the refund request has already been sent and is still processing."). README section "Results: OpenAI Agents SDK 0.24.0 realtime".
- 主要语言
- Python
- 星标
- 30.4k
- 派生
- 4.9k
- 平均合并
- 14 小时 33 分钟
- 30 天内合并 PR
- 142
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
openai/openai-agents-python 的其他 Issue
-
fix(typing): explicitly specialize ToolContext[Any] in ToolFunctionWithToolContext可能重新可做 @AbarnaaSree 于 11 天前认领,目前没有进行中的 PR。 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
openai/openai-agents-python#5387 · 4 条评论 ·
维护者通常 1 天内回复
-
function_tool rejects valid arguments when a parameter uses Pydantic strict mode (Enum, date, UUID)未关闭
难度 3/5 1-2 天 新手友好度 65/100
openai/openai-agents-python#5448 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 65/100
openai/openai-agents-python#5447 ·
维护者通常 1 天内回复
-
function_tool on a callable object uses an inherited or generated class docstring as the tool description可能已有人在做 @Narendra02053 于 2 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 58/100
openai/openai-agents-python#5443 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 70/100
openai/openai-agents-python#5441 · 1 条评论 ·
维护者通常 1 天内回复
查看 openai/openai-agents-python 的全部 Issue
相似的 Issue
-
app: scripts status: backlog type: documentation
难度 2/5 1-3 小时 新手友好度 86/100
netbox-community/netbox-scripts#68 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 91/100
marin-community/marin#10765 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 70/100
flathub/com.unity.UnityHub#230 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
namespace operations
难度 1/5 1 小时以内 新手友好度 63/100
EclipseFdn/open-vsx.org#14910 ·
维护者通常 1 天内回复