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.
Symptom
Section titled “Symptom”导致经常出现422错误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.
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.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 1 real issues
- 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.
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.