Skip to content

Invalid schema for function — Codex

Quick fix

Upgrade CC Switch to a version including the v3.18.0 fix for parameters.type:null; track the original issues for other null schema variants.

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'.

Early reports showed that Codex could send `codex_app__automation_update` tool parameters in `/responses` requests as `null`, `type:null`, or `oneOf`/`anyOf` without a root-level `type:"object"`. CC Switch previously forwarded these schemas unchanged through its Responses-to-Chat Completions conversion path, so strictly validating upstreams such as DeepSeek returned HTTP 400. Maintainers confirmed that this `type:null` path was fixed in v3.18.0 by normalizing it to an object parameter schema. Do not assume all variants are fixed solely because an issue is closed.

This group also includes later variants: in the v3.20.0 xAI native Responses path, a root-level union type for `mcp__codex_app__automation_update` was rejected. Maintainers said a fix was merged into main and would ship in the next release. The `list_mcp_resources` `required:null` variant remains an open report; its original issue contains only a proposed patch and no verified general solution.

  1. If the error explicitly includes `codex_app__automation_update` and `type: null`, upgrade to a CC Switch version that includes the v3.18.0 fix, then verify again. This fix covers `parameters:null`, `type:null`, and missing parameters in the Responses-to-Chat path.

  2. If the error changes to `list_mcp_resources: null is not of type "array"`, or `mcp__codex_app__automation_update` still appears in the xAI OAuth native Responses path, the original issues do not provide a verified fix for every scenario. Track the relevant source issue for maintainer releases and verification results.

ToolCodex
VersionUnknown
PlatformsWindowsmacOS
Is there currently a solution for this issue?
For the `codex_app__automation_update` `parameters.type:null` variant, maintainers said it was fixed in v3.18.0. Check the original issue status separately for later variants such as xAI and `required:null`.
How should this be fixed?
First confirm whether this is the `type: null` variant. If so, upgrade to a version that includes the v3.18.0 fix. If the error is `null is not of type "array"` for `list_mcp_resources`, the original issue does not yet provide a verified solution.

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.