Skip to content

cc-switch-model-catalog.json schema incompatible with Codex #3848

@ai-zen-future

Description

@ai-zen-future

Self Checks / 自检

CC Switch Version / 版本号

v3.16.1

Operating System / 操作系统

macOS

Related App / 涉及应用

Codex

Steps to Reproduce / 重现步骤

Description

The cc-switch-model-catalog.json generated by CC Switch does not conform to the Codex CLI model catalog schema, causing Codex to fail on startup. The file is also overwritten every time a model is switched or a Provider is edited, invalidating any manual fixes.

Error Messages

The following errors appear sequentially:

unknown variant public, expected one of list, hide, none
missing field supported_reasoning_levels
missing field shell_type

Analysis

The generated JSON has two issues:

Invalid visibility value — Codex only accepts list / hide / none, not public
Missing required fields — supported_reasoning_levels, shell_type, input_modalities, supports_reasoning_summaries, etc.

Expected Behavior / 期望行为

The generated catalog should include all fields required by Codex. Reference schema from ~/.codex/model.json:

json

{
"models": [{
"slug": "model-name",
"display_name": "Model Name",
"context_window": 200000,
"max_context_window": 200000,
"input_modalities": ["text"],
"shell_type": "default",
"supported_reasoning_levels": [],
"supports_reasoning_summaries": false,
"supports_parallel_tool_calls": false,
"support_verbosity": true,
"supported_in_api": true,
"default_verbosity": "low",
"visibility": "list",
"priority": 1000
}]
}/

Actual Behavior / 实际行为

No response

Additional Context / 补充信息

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions