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.
Symptom
Section titled “Symptom”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']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.
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"]Add model_catalog_json = "cc-switch-model-catalog-text-only.json" to the CC configuration so it uses the text-only model catalog.
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.