Skip to content

unknown variant `image_url`, expected `text`: Codex

Quick fix

Do not send images to models that do not support image input. Use text only, or wait for/use the merged automatic retry mechanism that removes images.

Error output
{"error":{"message":"CC Switch local proxy failed while handling Codex endpoint /responses. Provider: DeepSeek; model: deepseek-v4-pro; upstream_status: HTTP 400; cause: Failed to deserialize the JSON body into the target type: messages[4]: unknown variant `image_url`, expected `text` at line 1 column 56209","type":"invalid_request_error","code":"invalid_request_error","param":null,"provider":"DeepSeek","model":"deepseek-v4-pro","endpoint":"/responses","upstream_status":400}}

These reports occurred when Codex sent messages containing images through cc-switch to models that do not support image or multimodal input. The DeepSeek report shows that requests containing `image_url` cause HTTP 400. A maintainer comment explicitly states that DeepSeek is not a multimodal model and that the “automatic retry mechanism that removes image normalization” was merged into the main branch. The comment does not identify a release version, so no specific fixed version can be confirmed.

Issue #3890 attributed the problem to request deserialization and suggested changing the catalog or proxy enum, but this was the reporter's analysis and temporary workaround, not confirmed by a maintainer. Issue #5101 shows the same behavior for a self-hosted GLM-5.2 service: text works, while image input triggers upstream HTTP 400. The original post requested capability detection, image filtering, or a clear message, but provided no verifiable implemented fix.

  1. Do not paste, drag in, or send images in Codex conversations to the current model that does not support image input. Send text only.

  2. If you need to continue using DeepSeek, check whether the merged “automatic retry mechanism that removes image normalization” is included in your version. The original post does not provide a confirmable release version.

  3. The reporter of Issue #3890 suggested a temporary workaround: set `supports_image_detail_original` for `deepseek-v4-pro` to `false` to prevent Codex from sending images. This prevents the model from receiving images, and the original post does not confirm the configuration file path.

  4. For self-hosted GLM-5.2 services, the original post provides no verifiable fix. Keep input text-only and follow the source issue's feature request for image filtering or a clear message.

ToolCodex
Version3.16.1(报告的受影响版本;#5101 仅称 latest)
PlatformsWindowsmacOS
The entire conversation is unusable. Is there any temporary solution?
Do not continue sending images to the model that does not support image input; use text only. For `deepseek-v4-pro`, the reporter also suggested setting `supports_image_detail_original` to `false` as a temporary workaround, but did not provide a configuration file path, and it disables image input.
I also get an error when trying mimo in codex; mimo is a multimodal large model.
This report provides no follow-up verification, confirmed root cause, or verifiable fix for Mimo. The known maintainer comment only explicitly states that DeepSeek is not a multimodal model; it cannot establish the specific cause of the Mimo error.

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.