Skip to content

messages.content.type invalid parameter; allowed values ['text'] — Codex

Quick fix

Remove the image capability flag for glm-5.3 and use a text-only model catalog configuration.

Error output
CC Switch local proxy failed while handling Codex endpoint /responses. Provider: Zhipu GLM; model: glm-5.3; upstream_status: HTTP 400; cause: messages.content.type 参数非法,取值范围 ['text']
English translation

CC Switch local proxy failed while handling Codex endpoint /responses. Provider: Zhipu GLM; model: glm-5.3; upstream_status: HTTP 400; cause: messages.content.type invalid parameter; allowed values ['text']

When sending a screenshot to the model while testing Codex, cc-switch marked glm-5.3 as image-capable in its model catalog and therefore sent image content upstream. However, this model endpoint accepts only ['text'], so the upstream returned HTTP 400.

The original post provided a temporary workaround to remove the image capability flag. The maintainer stated that glm-5.3 lacks an exact text-only capability registry entry and planned a fix and regression tests; the comment did not state that a fix had been merged or released.

  1. Modify the model catalog: remove the image entry from glm-5.3 input_modalities, then save the modified file as cc-switch-model-catalog-text-only.json.

    cc-switch-model-catalog.json
    "input_modalities": ["text", "image"]
    "input_modalities": ["text"]
  2. Add model_catalog_json = "cc-switch-model-catalog-text-only.json" to the CC configuration so it uses the text-only model catalog.

ToolCodex
Versionv3.20.0(受影响)
PlatformsWindows

(No FAQ yet)

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.