Skip to content

Invalid schema for function 'codex_app__automation_update' error - CC Switch

Quick fix

Codex Desktop’s built-in automation_update tool schema lacks a top-level type, so DeepSeek rejects it. Upgrade CC Switch to a version that includes the fix.

Error output
CC Switch local proxy failed while handling Codex endpoint /responses. Provider: DeepSeek; model: deepseek-v4-pro; upstream_status: HTTP 400; cause: Invalid schema for function 'codex_app__automation_update': schema must be a JSON Schema of 'type: "object"', got 'type: null'.

Codex Desktop injects schemas for built-in tools such as codex_app__automation_update into /responses requests. The root of automation_update uses oneOf without declaring "type": "object". When converting Codex Responses format to OpenAI Chat Completions format, CC Switch does not normalize parameters with a null type to {"type": "object", "properties": {}}. DeepSeek therefore rejects the request with HTTP 400.

This issue was reported on CC Switch 3.14.3, 3.16.3, and 3.16.4. Another user reported a variant on 3.19.1: normalize_function_parameters() adds the type but retains the top-level oneOf, causing Databricks/OpenAI to report that the schema must not have 'oneOf'/'anyOf'/'allOf'/'enum'/'const'/'not' at the top level.

  1. Upgrade CC Switch to a version that includes the fix (later than 3.16.4). Check for updates in settings, or download the latest installer from GitHub Releases.

  2. After upgrading, restart Codex Desktop so the CC Switch local proxy can take over /responses routing again.

ToolCodex Desktop / Codex CLI
Version3.14.3 - 3.19.1(受影响范围)
PlatformsWindowsmacOS
Why did it work before, then start failing after I installed a few skills?
The automation_update tool schema in Codex Desktop lacks a type, but this usually does not cause a problem. The issue is triggered only when a request includes this tool definition (for example, when the AI calls it), at which point DeepSeek rejects it with HTTP 400.
Can this still fail after upgrading to 3.19.1?
The type:null case for DeepSeek is fixed in 3.19.1, but stricter upstreams such as Databricks/OpenAI may still reject top-level keywords such as oneOf/anyOf. A later version is needed to address this.

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.