精选78OpenAI Agents SDK Python(GitHub Releases)AI 编程与模型
OpenAI Agents SDK v0.22.0:收紧 provider 配置契约,强化运行时稳定性
v0.22.0
推荐理由
正在用 OpenAI Agents SDK 的开发者注意:v0.22.0 收紧了 provider 配置契约,显式 openai_client 与 organization/project 组合会被拒绝,需迁移到 AsyncOpenAI 客户端。升级前务必调整代码,否则会报错。
Key Changes
主要变更
Version 0.22.0 is a minor release because it adds substantial runtime hardening and tightens an existing provider configuration contract. Applications that combine an explicit openai_client with organization or project must move those values to the AsyncOpenAI client.
版本 0.22.0 是一个次要版本,因为它增加了实质性的运行时加固,并收紧了现有的提供商配置契约。将显式 openai_client 与组织或项目结合使用的应用程序必须将这些值移至 AsyncOpenAI 客户端。
Highlights:
亮点:
- Redacts terminal function-tool output rejected by agent output guardrails from replayable and persisted SDK state.
- Raises ModelBehaviorError for non-streaming Responses with terminal status failed or incomplete.
- Rejects conflicting provider options when OpenAIProvider receives an explicit client.
- Isolates usage accounting between independent RunState checkpoints while preserving nested-agent aggregation.
- Expands agents registered through handoff(agent) in generated graphs.
- Clarifies the existing shallow-copy behavior of Agent.clone() and RealtimeAgent.clone().
- 从可重放和持久化的 SDK 状态中,对代理输出护栏拒绝的终端函数工具输出进行脱敏处理。
- 对状态为失败或不完整的非流式响应,抛出 ModelBehaviorError。
- 当 OpenAIProvider 接收到显式客户端时,拒绝冲突的提供商选项。
- 在独立的 RunState 检查点之间隔离使用量统计,同时保留嵌套代理的聚合。
- 在生成的图中,扩展通过 handoff(agent) 注册的代理。
- 澄清 Agent.clone() 和 RealtimeAgent.clone() 现有的浅拷贝行为。
What's Changed
变更内容
- fix(core): redact blocked tool outputs from replay state by @seratch in #4507
- fix(core): reject ignored explicit-client options for OpenAIProvider by @sylvesterkaczmarek in #4497
- fix(core): preserve Griffe logger inheritance by @sylvesterkaczmarek in #4494
- fix(core): reject terminal failed/incomplete responses in non-streaming get_response by @weike-zhang in https://github.* * fix(core): isolate usage between RunState checkpoints by @chiruu12 in #4479
- fix(sandbox): require apply_patch update hunks by @li2631026381-alt in #4470
- fix(sandbox): enforce Windows mypy compatibility by @seratch in #4499
- fix(tracing): respect model-data logging redaction for record_model_error_on_span by @sylvesterkaczmarek in #4496
- fix(tracing): clean up processors after tracing is disabled by @sylvesterkaczmarek in #4502
- fix(visualization): expand handoff() targets in agent graphs by @hsusul in #4517
- 修复(核心):由 @seratch 在 #4507 中从重放状态中脱敏被阻止的工具输出
- 修复(核心):由 @sylvesterkaczmarek 在 #4497 中拒绝 OpenAIProvider 被忽略的显式客户端选项
- 修复(核心):由 @sylvesterkaczmarek 在 #4494 中保留 Griffe 日志记录器继承
- 修复(核心):由 @weike-zhang 在 https://github.* * 修复(核心):由 @chiruu12 在 #4479 中隔离 RunState 检查点之间的使用量
- 修复(沙盒):由 @li2631026381-alt 在 #4470 中要求 apply_patch 更新块
- 修复(沙盒):由 @seratch 在 #4499 中强制执行 Windows mypy 兼容性
- 修复(追踪):由 @sylvesterkaczmarek 在 #4496 中尊重 record_model_error_on_span 的模型数据日志脱敏
- 修复(追踪):由 @sylvesterkaczmarek 在 #4502 中在禁用追踪后清理处理器
- 修复(可视化):由 @hsusul 在 #4517 中扩展代理图中的 handoff() 目标
Documentation & Other Changes
文档和其他变更
- docs: document v0.21.1 runtime behavior by @seratch in #4460
- docs: correct Agent.clone list attribute semantics by @thegoodengineer in #4474
- docs: add testing resources to llms indexes by @teachershuang in #4509
- ci: align Python version coverage by @seratch in #4475
- test: use sys.executable instead of tee for the stdio placeholder command by @ErenAta16 in #4478
- fix: keep Codex verification for development sandboxed by @seratch in #4508
- com//pull/4516
- release: 0.22.0 by @seratch in #4523
- 文档:由 @seratch 在 #4460 中记录 v0.21.1 运行时行为
- 文档:由 @thegoodengineer 在 #4474 中更正 Agent.clone 列表属性语义
- 文档:由 @teachershuang 在 #4509 中向 llms 索引添加测试资源
- CI:由 @seratch 在 #4475 中对齐 Python 版本覆盖
- 测试:由 @ErenAta16 在 #4478 中使用 sys.executable 替代 tee 作为 stdio 占位命令
- 修复:由 @seratch 在 #4508 中保持 Codex 验证用于开发沙箱环境
- com//pull/4516
- 发布:0.22.0 版本,由 @seratch 在 #4523 中完成
New Contributors
新贡献者
- @li2631026381-alt made their first contribution in #4470
- @thegoodengineer made their first contribution in #4474
- @teachershuang made their first contribution in #4509
- @weike-zhang made their first contribution in #4516
- @chiruu12 made their first contribution in #4479
- @li2631026381-alt 在 #4470 中做出了首次贡献
- @thegoodengineer 在 #4474 中做出了首次贡献
- @teachershuang 在 #4509 中做出了首次贡献
- @weike-zhang 在 #4516 中做出了首次贡献
- @chiruu12 在 #4479 中做出了首次贡献
Full Changelog: v0.21.1...v0.22.0
完整变更日志:v0.21.1...v0.22.0
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力