Invalid schema: codex_app__automation_update - Codex
Quick fix
Upgrade CC Switch to v3.18.0 or newer to fix the 400 caused by type: null when Codex converts the DeepSeek protocol.
Symptom
Section titled “Symptom”Invalid schema for function 'codex_app__automation_update': schema must be a JSON Schema of 'type: "object"', got 'type: null'.Generating the schema for a built-in Codex tool (codex_app__automation_update, for instance), the parameters of some nullable fields are set to type: null or left empty. The official OpenAI interface tolerates that, but a model provider with strict validation such as DeepSeek rejects it outright with an HTTP 400.
When CC Switch converts the Codex Responses API into the Chat Completions protocol to forward to DeepSeek, earlier versions did not clean up this malformed schema, so type: null passed straight through. This was fixed in v3.18.0 by normalizing the schema in the proxy layer.
Upgrade CC Switch to v3.18.0 or newer. The new version has schema cleanup built into the Responses-to-Chat conversion bridge, normalizing parameters into a legal {"type": "object"} schema automatically.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 2 real issues
- Does Azure OpenAI hit this problem too?
- Yes — Azure OpenAI and other providers that validate schemas strictly can trigger it as well. On v3.18.0 the proxy layer normalizes every missing or null type to object, which resolves it.
- How do I modify the proxy layer by hand to remove type: null?
- You do not need to. Schema sanitization is built into the Responses-to-Chat conversion bridge in v3.18.0, normalizing parameters into a legal type: "object" schema automatically. Just upgrade.
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.