Skip to content

Third-party model still claims based on GPT-5 - Codex

Quick fix

Move the baseInstructions override out of the if profile != ProxyChat block so it applies to ProxyChat. Currently it is not injected even when set.

Error output
模型回答中提到 "GPT-5",而非实际模型名
English translation

The model response mentions "GPT-5" instead of the actual model name

The root cause is in `codex_catalog_model_entry()` (L498) in `src-tauri/src/codex_config.rs`: the `baseInstructions` override logic is wrapped in an `if profile != CodexCatalogToolProfile::ProxyChat` condition. `CodexCatalogToolProfile::from_api_format()` (L146-153) classifies every provider whose `apiFormat` is not `"openai_responses"` or `"anthropic"` as ProxyChat. ProxyChat templates come from `models_cache.json`, `codex debug models --bundled`, or the static `gpt5_5_template.json`, and the first sentence of `base_instructions` in these sources is "You are Codex, a coding agent **based on GPT-5**.". As a result, when DeepSeek, Qwen, Moonshot, or similar providers connect to Codex through `openai_chat`, the model reuses the template and introduces itself as GPT-5. Issue #5969 suggests moving the override logic out of that `if` block. At the time of that issue it was still open, with no merged fix or maintainer confirmation visible; this is currently a code-level fix.

  1. Confirm that your provider uses `apiFormat: "openai_chat"` (or any format other than `openai_responses` / `anthropic`). Codex then enters the ProxyChat branch.

  2. Edit `src-tauri/src/codex_config.rs` and move the `baseInstructions` override logic outside the `if profile != CodexCatalogToolProfile::ProxyChat` block so it applies to all profiles.

    // src-tauri/src/codex_config.rs
    if let Some(base_instructions) = spec
    .base_instructions
    .as_deref()
    .map(str::trim)
    .filter(|s| !s.is_empty())
    {
    entry_obj.insert("base_instructions".to_string(), json!(base_instructions));
    }
    if profile != CodexCatalogToolProfile::ProxyChat {
    // 原有 tools 清理 + supports_parallel_tool_calls 逻辑保持不变
    // ...
    }
  3. Rebuild and run cc-switch, then ask Codex "What model are you based on?" and confirm the answer no longer contains "based on GPT-5".

ToolCodex
VersionUnknown
PlatformsUnknown

(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.