key '$defs' not found in schema: Codex error when connecting to Grok
Quick fix
Codex hits tool schema reference validation failures with Grok. No verifiable fix is available in the original report; follow issue #7241 for updates.
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 schemaIn this report, Codex accesses /responses through the CC Switch local proxy using the xAI (Grok) OAuth provider and grok-4.6 model. The upstream returns HTTP 400. The error indicates that /properties/windows_params/properties/sort_by in the schema references '#/$defs/WindowsSortOption', but '$defs' cannot be found. The reference cannot be resolved, so request content validation fails.
The original report does not identify where '$defs' went missing or provide a patch, successful workaround, or maintainer confirmation. The issue remains open, and the original report provides no verifiable fix.
The original report currently provides no verifiable fix. Follow issue #7241 for a maintainer-confirmed fix or steps that users have verified successfully.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 1 real issues
(No FAQ yet)
Related problems
Section titled “Related problems”This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.