修复 OpenAI 兼容接口 reasoning toggle,支持 GLM

fancive · ghdev · 2026-08-22

此 PR 修复了 anomalyco/opencode 中的 issue #42793,使 ProviderTransform.reasoningVariants 能正确处理 @ai-sdk/openai-compatible npm 包的 reasoning toggle。现在,当 models.dev 中声明 reasoning toggle 时,系统会生成 none/high 变体,并在请求体中发送 thinking.type: "disabled"/"enabled"。该变更确保了 GLM 4.7 和 GLM 5 Turbo 等兼容端点能够正确开启或关闭 thinking 能力。代码包含了针对该映射的回归测试,并通过了端到端验证,同时未影响其他 provider 的现有行为。

原文链接 →

「编程与Agent」频道最新

更多「编程与Agent」频道 AI 资讯 →