key '$defs' not found in schema:Codex 接入 Grok 报错
Quick fix
Codex 接入 Grok 时出现工具 schema 引用校验失败;原帖尚未提供可验证的解法,需关注 issue #7241 的后续反馈。
Symptom
Section titled “Symptom”CC Switch local proxy failed while handling Codex endpoint /responses. Provider: xAI (Grok) OAuth; model: grok-4.6; upstream_status: HTTP 400; cause: Invalid request content: Schema validation failed: [standard_violation] /properties/windows_params/properties/sort_by: unresolvable $ref '#/$defs/WindowsSortOption': key '$defs' not found in schema该报告中,Codex 通过 CC Switch 本地代理访问 /responses,使用 xAI (Grok) OAuth 供应商和 grok-4.6 模型,上游返回 HTTP 400。报错指出,schema 中 /properties/windows_params/properties/sort_by 引用了 '#/$defs/WindowsSortOption',但找不到 '$defs',因此引用无法解析,请求内容校验失败。
原帖未说明缺失的 '$defs' 在哪个环节产生,也未提供补丁、成功的绕过方式或维护者确认。该 issue 仍处于 open 状态,原帖尚未提供可验证的解法。
当前原帖尚未提供可验证的解法;关注 issue #7241 后续是否提供维护者确认的修复或用户验证成功的处理步骤。
Affected Versions
Section titled “Affected Versions”ToolCodex
Version3.20.2(报告受影响的 CC Switch 版本)
PlatformsWindows
Source Issues
Section titled “Source Issues”本页汇总自 1 个真实 issue
(暂无 FAQ)
HTTP 401 Unauthorized - CC Switch Anthropic升级 cc-switch 至修复版,以支持 Anthropic 所需的 x-api-key 和 anthropic-version 请求头。messages[1]: missing field `content`(HTTP将 CC Switch 升级到 v3.20.4;转换器会跳过无 content 的 additional_tools 载体,避免严格上游返回 400。上游 HTTP 502 - CC Switch (Claude Code检查本地网络代理(如 Clash/ZeroTier)配置,确保其不干扰直连请求。
这是一个非官方社区 wiki,与 cc-switch 作者及项目本身无隶属关系。内容整理自项目公开的 GitHub issues。本站不分发任何软件。