Skip to content

Default 1M Context Causes 422, Codex

Quick fix

Upgrade to v4.0; context window and other model parameters are filled in automatically when adding or pulling a model.

Error output
导致经常出现422错误
English translation

This frequently results in a 422 error.

In cc-switch 3.16.3, Codex model configuration uses a default 1M context window, while the user said the model supports only 400K. The context window may therefore exceed the limit and cause a 422. The maintainer said v4.0 adjusted model context window configuration: when adding or pulling a model, the context window, output limit, and reasoning level are filled in based on presets and models.dev.

  1. Upgrade to v4.0 or later. After adding or pulling a Codex model, check the automatically populated context window setting. If 422 still occurs, provide the provider, model name, cc-switch version, the `model_context_window` setting in `~/.codex/config.toml`, and the full error.

ToolCodex
Version3.16.3(受影响版本;维护者建议在 v4.0 验证修复)
PlatformsWindows
What information should I provide if 422 still occurs after updating to the latest version?
Provide the provider and model name, CC Switch version, the `model_context_window` setting in `~/.codex/config.toml`, and the full 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.