发布日期: 2026-06-23
版本号: v0.80.2

更新了继承的 pi-ai ApiKeyCredential,使其使用与 auth.json 兼容的判别式 type: "api_key" 和按提供商划分的 env 值,替代原来的 type: "api-key" 和元数据。将继承的 agent-core 公共工具 shell 执行选项类型从 ExecutionEnvExecOptions 重命名为 ShellExecOptions。修复了继承的 Anthropic 兼容自定义模型,使用显式兼容性元数据替代基于提供商名称的启发式方法来处理会话亲和性标头和不支持的工具字段省略。修复了继承的请求作用域 apiKeyenv 值参与提供商认证解析,使得 Cloudflare 等提供商可以根据显式调用选项派生请求特定的基础 URL。恢复了继承的临时旧版每 API 流别名,例如 pi-ai 兼容性入口上的 streamSimpleOpenAICompletions。恢复了 openai-completions 中针对没有显式兼容性元数据的模型的运行时 detectCompat 回退功能。

更新内容 (中文)

已变更

  • 将继承自 pi-ai 的 ApiKeyCredential 改为使用兼容 auth.json 的鉴别字段 type: "api_key" 及作用域限定于提供商的 env 值,取代原有的 type: "api-key" 和元数据方式。
  • 将继承自 agent-core 的公共测试框架 Shell 执行选项类型从 ExecutionEnvExecOptions 重命名为 ShellExecOptions

已修复

  • 修复了继承自 Anthropic 的自定义模型兼容性,现通过显式兼容性元数据(而非提供商名称启发式判断)来确定会话亲和性头信息及不受支持工具字段的省略规则。
  • 修复了继承自请求作用域的 apiKeyenv 值参与提供商身份验证解析的问题,使 Cloudflare 等提供商能够根据显式调用选项推导请求特定的基础 URL(#6021)。
  • 恢复了 pi-ai 兼容性入口点上继承的临时性遗留 API 流别名(如 streamSimpleOpenAICompletions)(#6016#6017)。
  • 恢复了 openai-completions 中继承的运行时 detectCompat 回退机制,用于处理缺乏显式兼容性元数据的模型(#6020)。

更新内容 (原始)

Changed

  • Changed inherited pi-ai ApiKeyCredential to use the auth.json-compatible discriminator type: "api_key" and provider-scoped env values instead of type: "api-key" and metadata.
  • Renamed the inherited agent-core public harness shell execution options type from ExecutionEnvExecOptions to ShellExecOptions.

Fixed

  • Fixed inherited Anthropic-compatible custom models to use explicit compatibility metadata instead of provider-name heuristics for session-affinity headers and unsupported tool-field omissions.
  • Fixed inherited request-scoped apiKey and env values to participate in provider auth resolution, so providers such as Cloudflare can derive request-specific base URLs from explicit call options (#6021).
  • Restored inherited temporary legacy per-API stream aliases such as streamSimpleOpenAICompletions on the pi-ai compat entrypoint (#6016, #6017).
  • Restored inherited runtime detectCompat fallback in openai-completions for models without explicit compat metadata (#6020).

下载链接