跳到主内容
@wquguru
精选88OpenAI Agents SDK Python(GitHub Releases)AI 编程与模型

OpenAI Agents SDK v0.26.0:Docker挂载与Codex本地镜像弃用

v0.26.0

原文
发到 X
推荐理由

v0.26.0 引入了 Docker 挂载和 Codex 本地镜像的破坏性变更,依赖这些功能的开发者必须升级并修改配置(如重建会话或调整授权方式),否则现有工作流将中断。

0.26.0 (2026-11-24)

Features

功能

  • Upgrade the GPT-Live demo to 1.1 (6c4e4a2)
  • 将 GPT-Live 演示升级至 1.1 (6c4e4a2)

Bug Fixes

错误修复

  • allow SDK 0.25 in the external provider example (#6068) (9b17858)
  • apply the Docker removal CPU limit to path inspection (14d13f4)
  • bound TAR path validation work per component (abc55bd)
  • check Realtime output guardrails at turn completion (dc84a13)
  • give per-call MCP metadata priority over discovery defaults (7f6f5ea)
  • honor the global tracing switch in Realtime (96b2799)
  • limit UnixLocal snapshot link rebasing to regular files (dd444fb)
  • preserve handoff redaction in Session history (6f45b21)
  • protect apply_patch staging during alias moves (a29070b)
  • require application approval for local images in codex_tool (#6171) (2a98dcd)
  • sandbox memory selection across UTC offsets (#6066) (e7ce15a)
  • sandbox: restrict Docker storage mount privileges (#6189) (b40fb80)
  • stop queued function tools after input guardrail rejection (90300af)
  • support opt-in JSON validation for Codex tool parameters (#6067) (54492d1)
  • 在外部提供程序示例中允许 SDK 0.25 (#6068) (9b17858)
  • 将 Docker 移除的 CPU 限制应用于路径检查 (14d13f4)
  • 按组件绑定 TAR 路径验证工作 (abc55bd)
  • 在回合结束时检查实时输出护栏 (dc84a13)
  • 使每次调用的 MCP 元数据优先于发现默认值 (7f6f5ea)
  • 在实时模式中遵循全局跟踪开关 (96b2799)
  • 将 UnixLocal 快照链接重新基础化限制为常规文件 (dd444fb)
  • 在会话历史中保留脱敏处理 (6f45b21)
  • 在别名移动期间保护 apply_patch 暂存区 (a29070b)
  • 在 codex_tool 中要求对本地镜像进行应用审批 (#6171) (2a98dcd)
  • 跨 UTC 偏移量选择沙箱内存 (#6066) (e7ce15a)
  • 沙箱:限制 Docker 存储挂载权限 (#6189) (b40fb80)
  • 在输入护栏拒绝后停止排队中的函数工具 (90300af)
  • 支持 Codex 工具参数的可选 JSON 验证 (#6067) (54492d1)

Release readiness review (v0.25.0 → v0.26.0)

发布就绪审查 (v0.25.0 → v0.26.0)

Final candidate review with the repository's $final-release-review skill for #6069.

使用仓库的 $final-release-review 技能对 #6069 进行最终候选审查。

Diff

差异

v0.25.0...7263707

Release intent

发布意图

Review modeIntended releaseMinimum requiredVersioning verdict
Final candidateMinor, 0.26.0MinorCompatible
审查模式预期发布最低要求版本判定
最终候选次要版本,0.26.0次要版本兼容

Release call

发布呼叫

🟢 GREEN LIGHT TO SHIP. The minor version accounts for changes to Docker mounts and custom Realtime tracing. Both have supported upgrade paths.

🟢 绿灯放行。此次要版本涉及 Docker 挂载和自定义实时追踪的变更。两者均支持升级路径。

Scope summary

范围摘要

55 files changed (+4,127/−458) since v0.25.0. Changes cover tools, guardrails, session history, Realtime, sandboxes, examples, and publishing. Only six release files differ from main at b40fb8097f007de181db9c382da53d8e0b7d6eaf. The package, lockfile, manifest, source version, and API snapshot agree. The SDK still supports Python 3.10+ with the same dependency bounds. The session and RunState schemas are unchanged. Some Docker sessions need replacement as described below.

自 v0.25.0 以来,共更改 55 个文件(+4,127/-458)。变更涵盖工具、护栏、会话历史、Realtime、沙箱、示例和发布内容。在 b40fb8097f007de181db9c382da53d8e0b7d6eaf 处,仅有六个发布文件与 main 分支不同。包、锁文件、清单、源版本和 API 快照保持一致。SDK 仍支持 Python 3.10+,依赖边界不变。会话和 RunState 模式未发生变化。部分 Docker 会话需要按如下描述进行替换。

Risk assessment

风险评估

  • 🟢 LOW · Docker storage. Docker now rejects InContainerMountStrategy, including read-only mounts, during creation and resume. The SDK refuses to reuse privileged containers or those with added capabilities. It also requires inspectable host settings. Start a fresh session with the revised manifest. Omit the prior session and any RunState containing it. Restore saved workspace files from a snapshot if needed. See src/agents/sandbox/sandboxes/docker.py and docs/sandbox/clients.md.
  • 🟢 LOW · Custom tracing providers. In v0.25.0, Realtime sent its configured server tracing settings without checking the global provider. An inherited TraceProvider.is_disabled() now returns True. To retain server traces, implement the method using the same state as set_disabled(). The default provider already does this. See src/agents/tracing/provider.py and src/agents/realtime/openai_realtime.py.
  • 🟢 LOW · Local images in the experimental Codex tool. A model-supplied file path no longer grants access. This also affects pending calls. Grant a named reference for each trusted image and use that reference in the call. See src/agents/extensions/experimental/codex/codex_tool.py.
  • 🟢 LOW · Sandbox moves and snapshots. Moving between aliases of one file now requires private staging. On backends without that support, update the original path in place. UnixLocal only rebases absolute links to archived regular files. Before saving, replace absolute directory or root links with safe relative links. See src/agents/sandbox/apply_patch.py and src/agents/sandbox/sandboxes/unix_local.py.
  • 🟢 低 · Docker 存储。Docker 现在在创建和恢复期间拒绝 InContainerMountStrategy,包括只读挂载。SDK 拒绝重用特权容器或具有附加能力的容器。它还要求可检查的主机设置。请使用修订后的清单启动新会话。省略之前的会话以及包含该会话的任何 RunState。如有需要,请从快照中恢复保存的工作区文件。参见 src/agents/sandbox/sandboxes/docker.py 和 docs/sandbox/clients.md。
  • 🟢 低 · 自定义追踪提供者。在 v0.25.0 中,Realtime 发送其配置的服务器追踪设置时未检查全局提供者。继承的 TraceProvider.is_disabled() 现在返回 True。若要保留服务器追踪,请使用与 set_disabled() 相同的状态实现该方法。默认提供者已执行此操作。参见 src/agents/tracing/provider.py 和 src/agents/realtime/openai_realtime.py。
  • 🟢 低 · 实验性 Codex 工具中的本地镜像。模型提供的文件路径不再授予访问权限。这也影响待处理的调用。为每个受信任的镜像授予命名引用,并在调用中使用该引用。参见 src/agents/extensions/experimental/codex/codex_tool.py。
  • 🟢 低 · 沙箱移动和快照。现在在同一文件的别名之间移动需要私有暂存。在不支持该功能的后端上,就地更新原始路径。UnixLocal 仅将绝对链接重新基址到归档的常规文件。保存之前,请将绝对目录或根链接替换为安全的相对链接。参见 src/agents/sandbox/apply_patch.py 和 src/agents/sandbox/sandboxes/unix_local.py。

Documentation coverage

文档覆盖情况

Partially covered. The Docker guide in #6189 covers migration. The tool reference and Live example include the new options. The guardrails guide already explains when tool side effects can occur. No open documentation PR targets this stable release. #6136 at 6fc8b3d210d41ece16b9dba9a5093b751a2e3545 covers specialist approvals in an earlier Live example on a separate branch.

部分覆盖。#6189 中的 Docker 指南涵盖了迁移内容。工具参考和实时示例包含了新选项。护栏指南已说明何时可能发生工具副作用。没有针对此稳定版本的开放文档 PR。#6136(在 6fc8b3d210d41ece16b9dba9a5093b751a2e3545 处)在独立分支的早期实时示例中涵盖了专家审批流程。

After publication, add the upgrade steps below to docs/release.md. In docs/realtime/guide.md, explain the final output check and custom tracing query. Document metadata precedence in docs/mcp.md, filtered history in docs/handoffs.md, and portable links and alias moves in docs/sandbox/guide.md. Keep the standalone external provider example on its tested SDK range (>=0.24.0,<0.26.0) until separately verified.

发布后,将以下升级步骤添加到 docs/release.md。在 docs/realtime/guide.md 中,解释最终输出检查和自定义追踪查询。在 docs/mcp.md 中记录元数据优先级,在 docs/handoffs.md 中记录过滤后的历史记录,在 docs/sandbox/guide.md 中记录可移植链接和别名移动。在单独验证之前,保持独立外部提供程序示例在其经过测试的 SDK 范围(>=0.24.0,<0.26.0)内。

Key Changes

关键变更

This minor release includes breaking changes for Docker storage mounts, custom Realtime tracing and local images. Check these settings before upgrading.

此次要版本包含针对 Docker 存储挂载、自定义 Realtime 追踪和本地镜像的破坏性变更。升级前请检查这些设置。

Highlights

亮点

  • Docker mounts. Replace in-container mounts with DockerVolumeMountStrategy and a compatible driver. For storage such as S3 Files, mount it on the Docker host and use a trusted SandboxPathGrant. Preserve read-only access and any bucket prefix. Create a fresh session with the updated manifest.
  • Realtime tracing. A custom TraceProvider must report its actual disabled state through is_disabled() to enable server traces. The built-in provider honors the global tracing switch.
  • Codex tool inputs. For an image you control, pass image_attachments={"diagram": "/app/diagram.png"}. Use "diagram" as the local_image path. Grant only absolute paths without commas. For strict input types such as tuples, opt into parameter_validation_mode="json". The default remains "python".
  • Guardrails and history. An input tripwire stops queued function tools. Use run_in_parallel=False to check input before any tool starts. Handoff filters keep redacted call arguments in saved session history. Realtime checks remaining text and audio transcripts at turn end.
  • MCP. For conflicting keys, explicit call metadata takes priority, followed by tool_meta_resolver, then discovery defaults.
  • Sandboxes. Use safe relative directory links in portable UnixLocal snapshots. Patch moves protect staged files. TAR validation checks one path component at a time. Docker's removal CPU limit also covers path inspection. Memory selection compares timestamps across UTC offsets.
  • Live example. The browser demo adds speech-triggered standby and search citations. Its openai>=3.57.0,<4 requirement applies only to the demo.
  • Docker 挂载。使用 DockerVolumeMountStrategy 和兼容驱动替换容器内的挂载。对于 S3 Files 等存储,将其挂载到 Docker 主机上并使用受信任的 SandboxPathGrant。保留只读访问权限和任何存储桶前缀。使用更新后的清单创建新会话。
  • Realtime 追踪。自定义 TraceProvider 必须通过 is_disabled() 报告其实际禁用状态以启用服务器追踪。内置提供程序遵循全局追踪开关。
  • Codex 工具输入。对于你控制的图像,传递 image_attachments={"diagram": "/app/diagram.png"}。使用 "diagram" 作为 local_image 路径。仅授予不带逗号的绝对路径。对于严格输入类型(如元组),请选择 parameter_validation_mode="json"。默认值仍为 "python"。
  • 护栏和历史记录。输入触发器会停止排队中的函数工具。使用 run_in_parallel=False 在任何工具启动前检查输入。交接过滤器会在保存的会话历史记录中保留脱敏的调用参数。Realtime 在回合结束时检查剩余的文本和音频转录。
  • MCP。对于冲突的键,显式调用元数据具有最高优先级,其次是 tool_meta_resolver,然后是发现默认值。
  • 沙箱。在可移植 UnixLocal 快照中使用安全的相对目录链接。补丁移动保护暂存的文件。TAR 验证一次检查一个路径组件。Docker 的移除 CPU 限制也涵盖路径检查。内存选择比较 UTC 偏移量 across 的时间戳。
  • 实时示例。浏览器演示版添加了语音触发的待机状态和搜索引用。其 openai>=3.57.0,<4 的要求仅适用于该演示版。

Notes

注意事项

The comparison uses the latest stable release on main. The 1.0 alpha tags belong to a separate release line.

本比较基于 main 分支上最新的稳定版本。1.0 alpha 标签属于独立的发布线。

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

关联信息,但可能不是同一事件