Codex CLI 接入 NoneLinear

Codex CLI 可以通过自定义 provider 接入 NoneLinear API。本文提供两种配置方式:
  • cc-switch 图形化配置:步骤更简单,适合只配置一个默认模型。
  • config.toml 配置文件方式:适合配置单个固定模型,或配置多个模型、多个 profile,并在 Codex 中通过 /model--profile-m 切换。
如果只是先跑通 Codex,建议先用 cc-switch;如果需要维护多个 NoneLinear 模型,建议再切换到配置文件方式。

方式一:使用 cc-switch 快速配置

cc-switch 可以图形化写入 Codex provider 配置,适合只需要一个默认模型的场景。它的优点是步骤少、容易检查;限制是当前更适合单模型配置,不像 model_catalog_json 那样适合维护多个常用模型和多个 profile。

前置要求

  • 已安装 Codex CLI。
  • 已安装 cc-switch。
  • 已获取 NoneLinear API Key:获取 API Key
  • 已确认要使用的模型 ID:模型列表

1. 进入 Codex 供应商页

打开 cc-switch,切换到顶部的 Codex 图标页,然后点击右上角 + 添加供应商。 cc-switch Codex 供应商入口

2. 添加自定义供应商

添加新供应商 页面中选择 Codex 供应商 → 自定义配置,然后填写基础信息:
字段填写内容
供应商名称NoneLinear
官网链接https://nonelinear.com/
API Key你的 NoneLinear API Key
cc-switch 添加 NoneLinear Codex 供应商

3. 填写 API 地址和模型名称

继续向下填写:
字段填写内容
API 请求地址https://api.nonelinear.com/v1
模型名称例如 gpt-5.4-mini
写入通用配置勾选
填写完成后点击 添加 cc-switch 配置 NoneLinear Codex 地址和模型

4. 测试并启用

添加完成后,可以点击测试按钮确认连通性。出现 NoneLinear 运行正常 后,启用该供应商。 cc-switch 测试并启用 NoneLinear Codex 供应商 之后重新打开终端,运行:
codex
如果可以正常进入 Codex 并收到模型回复,说明接入成功。
cc-switch 方式当前更适合配置一个默认模型。如果你需要同时维护多个模型,或者希望 Codex 的 /model 列表中出现多个 NoneLinear 模型,请使用下面的配置文件方式。

方式二:配置文件接入(单模型 / 多模型)

如果只需要在 Codex CLI 里固定使用一个模型,可以只配置 config.toml,不需要额外维护 model_catalog_json。如果需要同时维护多个 NoneLinear 模型,再使用 profilesmodel_catalog_json。下面以Windows环境下的两组配置为例,文档中统一把 provider 命名为 nonelinear

单模型配置

单模型配置适合先快速跑通一个固定模型,例如 gpt-5.4-mini。这种方式不需要创建 model-catalogs 目录,也不需要配置 /model picker。 Windows 下编辑:
notepad "C:\Users\<你的Windows用户名>\.codex\config.toml"
单模型示例使用 NONELINEAR_API_KEY 环境变量保存 API Key:
setx NONELINEAR_API_KEY "你的_NoneLinear_API_Key"
将下面内容写入 config.toml
model = "gpt-5.4-mini"
model_provider = "nonelinear"
model_reasoning_effort = "high"
disable_response_storage = true

[model_providers.nonelinear]
name = "nonelinear"
base_url = "https://api.nonelinear.com/v1"
env_key = "NONELINEAR_API_KEY"
wire_api = "responses"
这份单模型配置统一使用 nonelinear provider,避免后续多模型配置和单模型配置出现两个 provider 名称。 如果只是单模型使用,保存后重新打开终端并运行:
codex
如果后续要在 Codex 里切换多个 NoneLinear 模型,再改用下面的多模型配置。 多模型配置需要额外维护 model_catalog_json,适合同时配置多个模型、多个 profile,并在 Codex 中通过 /model--profile-m 切换。

模型目录与 /model 展示

model_catalog_json 本身可以包含多个模型对象,外层结构是 { "models": [...] }。Codex 官方内置的 models.json 也是由多个模型对象组成的 catalog,每个模型对象会包含 priorityvisibilitysupported_in_api 等字段。 本文档中的 nonelinear.json 示例放入 7 个 NoneLinear 模型,不代表 catalog 有固定数量上限。根据 Windows 环境的测试,只要模型对象设置为 "visibility": "list",Codex 里的 /model 可以展示配置中的全部可见模型;例如配置 7 个模型时,/model 会显示 7 个。 Codex /model 展示多个 NoneLinear 模型 本文档采用以下策略:
  1. nonelinear.json 示例中保留多种模型,方便在 /model 中选择,也方便用 --profile-m 启动。
  2. 需要展示在 /model 中的模型统一设置为 "visibility": "list"
  3. priority 数值越小越靠前;本文档用 priority 控制模型在 picker 中的展示顺序。
  4. 修改 nonelinear.json 后,需要完全退出并重新启动 Codex,新的 /model 列表才会生效。

支持的模型

当前示例配置暂放以下模型,均设置为 visibility: list,会进入 /model 列表。
模型 ID用途建议/model 展示策略
gpt-5.5默认推荐模型,适合复杂编码任务visibility: list, priority: 0
gpt-5.4-mini轻量、快速任务visibility: list, priority: 10
gpt-5.2-mini轻量任务或兼容性测试visibility: list, priority: 20
deepseek-v4-proDeepSeek Pro 模型visibility: list, priority: 25
deepseek-v4-flashDeepSeek 快速模型visibility: list, priority: 30
kimi-k2.6Kimi 模型,适合备用/对照测试visibility: list, priority: 35
gpt-5.4-nano更轻量、更快的任务visibility: list, priority: 40

前置条件

在 PowerShell 中设置环境变量:
setx NONELINEAR_API_KEY "你的_NoneLinear_API_Key"
设置完成后,重新打开一个终端窗口,让环境变量生效。

文件路径

Windows 下需要准备两个文件:
C:\Users\<你的Windows用户名>\.codex\config.toml
C:\Users\<你的Windows用户名>\.codex\model-catalogs\nonelinear.json
创建目录:
mkdir "C:\Users\<你的Windows用户名>\.codex\model-catalogs"
编辑配置文件:
notepad "C:\Users\<你的Windows用户名>\.codex\config.toml"
notepad "C:\Users\<你的Windows用户名>\.codex\model-catalogs\nonelinear.json"

配置 config.toml

将下面内容写入 C:\Users\<你的Windows用户名>\.codex\config.toml
model = "gpt-5.5"
model_provider = "nonelinear"
model_catalog_json = "C:\\Users\\<你的Windows用户名>\\.codex\\model-catalogs\\nonelinear.json"
profile = "nonelinear-gpt-5-5"

[model_providers.nonelinear]
name = "nonelinear"
base_url = "https://api.nonelinear.com/v1"
env_key = "NONELINEAR_API_KEY"
wire_api = "responses"
requires_openai_auth = false
supports_websockets = false

[profiles.nonelinear-gpt-5-5]
model = "gpt-5.5"
model_provider = "nonelinear"
model_catalog_json = "C:\\Users\\<你的Windows用户名>\\.codex\\model-catalogs\\nonelinear.json"

[profiles.nonelinear-gpt-5-5.windows]
sandbox = "elevated"

[profiles.nonelinear-gpt-5-4-mini]
model = "gpt-5.4-mini"
model_provider = "nonelinear"
model_catalog_json = "C:\\Users\\<你的Windows用户名>\\.codex\\model-catalogs\\nonelinear.json"

[profiles.nonelinear-gpt-5-4-nano]
model = "gpt-5.4-nano"
model_provider = "nonelinear"
model_catalog_json = "C:\\Users\\<你的Windows用户名>\\.codex\\model-catalogs\\nonelinear.json"

[profiles.nonelinear-gpt-5-2-mini]
model = "gpt-5.2-mini"
model_provider = "nonelinear"
model_catalog_json = "C:\\Users\\<你的Windows用户名>\\.codex\\model-catalogs\\nonelinear.json"

[profiles.nonelinear-deepseek-v4-flash]
model = "deepseek-v4-flash"
model_provider = "nonelinear"
model_catalog_json = "C:\\Users\\<你的Windows用户名>\\.codex\\model-catalogs\\nonelinear.json"

[profiles.nonelinear-deepseek-v4-pro]
model = "deepseek-v4-pro"
model_provider = "nonelinear"
model_catalog_json = "C:\\Users\\<你的Windows用户名>\\.codex\\model-catalogs\\nonelinear.json"

[profiles.nonelinear-kimi-k2-6]
model = "kimi-k2.6"
model_provider = "nonelinear"
model_catalog_json = "C:\\Users\\<你的Windows用户名>\\.codex\\model-catalogs\\nonelinear.json"

[projects.'c:\users\<你的Windows用户名>']
trust_level = "trusted"

配置说明

  • model_provider = "nonelinear":告诉 Codex 默认使用 nonelinear 这个 provider。
  • model = "gpt-5.5":默认启动模型。
  • model_catalog_json:让 Codex 在启动时加载自定义模型目录。该配置是启动时读取,修改后必须重启 Codex 才会生效。
  • [model_providers.nonelinear]:定义 NoneLinear API 的连接信息。
  • env_key = "NONELINEAR_API_KEY":Codex 会从该环境变量读取 API Key。
  • wire_api = "responses":使用 Responses API 协议。
  • [profiles.*]:为同一个 provider 下的不同模型建立启动 profile。
  • [profiles.nonelinear-gpt-5-5.windows]:Windows 环境下为该 profile 设置沙盒模式。
  • [projects.'c:\users\<你的Windows用户名>']:把对应 Windows 用户目录标记为可信项目路径;请把占位符替换成自己的 Windows 用户名。

配置 nonelinear.json

将下面内容写入 C:\Users\<你的Windows用户名>\.codex\model-catalogs\nonelinear.json
{
  "models": [
    {
      "slug": "gpt-5.5",
      "display_name": "GPT-5.5",
      "description": "Frontier model served through nonelinear.",
      "default_reasoning_level": "medium",
      "supported_reasoning_levels": [
        {
          "effort": "low",
          "description": "Fast responses with lighter reasoning"
        },
        {
          "effort": "medium",
          "description": "Balanced speed and reasoning depth"
        },
        {
          "effort": "high",
          "description": "Greater reasoning depth for complex tasks"
        },
        {
          "effort": "xhigh",
          "description": "Extra high reasoning depth for complex tasks"
        }
      ],
      "shell_type": "shell_command",
      "visibility": "list",
      "supported_in_api": true,
      "priority": 0,
      "additional_speed_tiers": [],
      "service_tiers": [],
      "default_service_tier": null,
      "availability_nux": null,
      "upgrade": null,
      "base_instructions": "You are Codex, a coding agent. Help the user with software engineering tasks, use tools carefully, and keep answers concise and actionable.",
      "model_messages": null,
      "supports_reasoning_summaries": false,
      "default_reasoning_summary": "none",
      "support_verbosity": true,
      "default_verbosity": "medium",
      "apply_patch_tool_type": "freeform",
      "web_search_tool_type": "text",
      "truncation_policy": {
        "mode": "tokens",
        "limit": 10000
      },
      "supports_parallel_tool_calls": false,
      "supports_image_detail_original": false,
      "context_window": 272000,
      "max_context_window": 272000,
      "auto_compact_token_limit": null,
      "effective_context_window_percent": 95,
      "experimental_supported_tools": [],
      "input_modalities": [
        "text",
        "image"
      ],
      "supports_search_tool": false
    },
    {
      "slug": "gpt-5.4-mini",
      "display_name": "GPT-5.4 Mini",
      "description": "Fast mini model served through nonelinear.",
      "default_reasoning_level": "medium",
      "supported_reasoning_levels": [
        {
          "effort": "low",
          "description": "Fast responses with lighter reasoning"
        },
        {
          "effort": "medium",
          "description": "Balanced speed and reasoning depth"
        },
        {
          "effort": "high",
          "description": "Greater reasoning depth for complex tasks"
        }
      ],
      "shell_type": "shell_command",
      "visibility": "list",
      "supported_in_api": true,
      "priority": 10,
      "additional_speed_tiers": [],
      "service_tiers": [],
      "default_service_tier": null,
      "availability_nux": null,
      "upgrade": null,
      "base_instructions": "You are Codex, a coding agent. Help the user with software engineering tasks, use tools carefully, and keep answers concise and actionable.",
      "model_messages": null,
      "supports_reasoning_summaries": false,
      "default_reasoning_summary": "none",
      "support_verbosity": true,
      "default_verbosity": "medium",
      "apply_patch_tool_type": "freeform",
      "web_search_tool_type": "text",
      "truncation_policy": {
        "mode": "tokens",
        "limit": 10000
      },
      "supports_parallel_tool_calls": false,
      "supports_image_detail_original": false,
      "context_window": 128000,
      "max_context_window": 128000,
      "auto_compact_token_limit": null,
      "effective_context_window_percent": 95,
      "experimental_supported_tools": [],
      "input_modalities": [
        "text",
        "image"
      ],
      "supports_search_tool": false
    },
    {
      "slug": "gpt-5.4-nano",
      "display_name": "GPT-5.4 Nano",
      "description": "Very fast nano model served through nonelinear.",
      "default_reasoning_level": "medium",
      "supported_reasoning_levels": [
        {
          "effort": "low",
          "description": "Fast responses with lighter reasoning"
        },
        {
          "effort": "medium",
          "description": "Balanced speed and reasoning depth"
        },
        {
          "effort": "high",
          "description": "Greater reasoning depth for complex tasks"
        }
      ],
      "shell_type": "shell_command",
      "visibility": "list",
      "supported_in_api": true,
      "priority": 40,
      "additional_speed_tiers": [],
      "service_tiers": [],
      "default_service_tier": null,
      "availability_nux": null,
      "upgrade": null,
      "base_instructions": "You are Codex, a coding agent. Help the user with software engineering tasks, use tools carefully, and keep answers concise and actionable.",
      "model_messages": null,
      "supports_reasoning_summaries": false,
      "default_reasoning_summary": "none",
      "support_verbosity": true,
      "default_verbosity": "medium",
      "apply_patch_tool_type": "freeform",
      "web_search_tool_type": "text",
      "truncation_policy": {
        "mode": "tokens",
        "limit": 10000
      },
      "supports_parallel_tool_calls": false,
      "supports_image_detail_original": false,
      "context_window": 128000,
      "max_context_window": 128000,
      "auto_compact_token_limit": null,
      "effective_context_window_percent": 95,
      "experimental_supported_tools": [],
      "input_modalities": [
        "text",
        "image"
      ],
      "supports_search_tool": false
    },
    {
      "slug": "kimi-k2.6",
      "display_name": "Kimi K2.6",
      "description": "Kimi K2.6 served through nonelinear.",
      "default_reasoning_level": "medium",
      "supported_reasoning_levels": [
        {
          "effort": "low",
          "description": "Fast responses"
        },
        {
          "effort": "medium",
          "description": "Balanced responses"
        },
        {
          "effort": "high",
          "description": "Deeper reasoning"
        }
      ],
      "shell_type": "shell_command",
      "visibility": "list",
      "supported_in_api": true,
      "priority": 35,
      "additional_speed_tiers": [],
      "service_tiers": [],
      "default_service_tier": null,
      "availability_nux": null,
      "upgrade": null,
      "base_instructions": "You are Codex, a coding agent. Help the user with software engineering tasks, use tools carefully, and keep answers concise and actionable.",
      "model_messages": null,
      "supports_reasoning_summaries": false,
      "default_reasoning_summary": "none",
      "support_verbosity": false,
      "default_verbosity": null,
      "apply_patch_tool_type": "freeform",
      "web_search_tool_type": "text",
      "truncation_policy": {
        "mode": "tokens",
        "limit": 10000
      },
      "supports_parallel_tool_calls": false,
      "supports_image_detail_original": false,
      "context_window": 128000,
      "max_context_window": 128000,
      "auto_compact_token_limit": null,
      "effective_context_window_percent": 95,
      "experimental_supported_tools": [],
      "input_modalities": [
        "text",
        "image"
      ],
      "supports_search_tool": false
    },
    {
      "slug": "deepseek-v4-pro",
      "display_name": "DeepSeek V4 Pro",
      "description": "DeepSeek pro model served through nonelinear.",
      "default_reasoning_level": "medium",
      "supported_reasoning_levels": [
        {
          "effort": "low",
          "description": "Fast responses"
        },
        {
          "effort": "medium",
          "description": "Balanced responses"
        },
        {
          "effort": "high",
          "description": "Deeper reasoning"
        }
      ],
      "shell_type": "shell_command",
      "visibility": "list",
      "supported_in_api": true,
      "priority": 25,
      "additional_speed_tiers": [],
      "service_tiers": [],
      "default_service_tier": null,
      "availability_nux": null,
      "upgrade": null,
      "base_instructions": "You are Codex, a coding agent. Help the user with software engineering tasks, use tools carefully, and keep answers concise and actionable.",
      "model_messages": null,
      "supports_reasoning_summaries": false,
      "default_reasoning_summary": "none",
      "support_verbosity": false,
      "default_verbosity": null,
      "apply_patch_tool_type": "freeform",
      "web_search_tool_type": "text",
      "truncation_policy": {
        "mode": "tokens",
        "limit": 10000
      },
      "supports_parallel_tool_calls": false,
      "supports_image_detail_original": false,
      "context_window": 128000,
      "max_context_window": 128000,
      "auto_compact_token_limit": null,
      "effective_context_window_percent": 95,
      "experimental_supported_tools": [],
      "input_modalities": [
        "text",
        "image"
      ],
      "supports_search_tool": false
    },
    {
      "slug": "gpt-5.2-mini",
      "display_name": "GPT-5.2 Mini",
      "description": "Efficient mini model served through nonelinear.",
      "default_reasoning_level": "medium",
      "supported_reasoning_levels": [
        {
          "effort": "low",
          "description": "Fast responses with lighter reasoning"
        },
        {
          "effort": "medium",
          "description": "Balanced speed and reasoning depth"
        },
        {
          "effort": "high",
          "description": "Greater reasoning depth for complex tasks"
        }
      ],
      "shell_type": "shell_command",
      "visibility": "list",
      "supported_in_api": true,
      "priority": 20,
      "additional_speed_tiers": [],
      "service_tiers": [],
      "default_service_tier": null,
      "availability_nux": null,
      "upgrade": null,
      "base_instructions": "You are Codex, a coding agent. Help the user with software engineering tasks, use tools carefully, and keep answers concise and actionable.",
      "model_messages": null,
      "supports_reasoning_summaries": false,
      "default_reasoning_summary": "none",
      "support_verbosity": true,
      "default_verbosity": "medium",
      "apply_patch_tool_type": "freeform",
      "web_search_tool_type": "text",
      "truncation_policy": {
        "mode": "tokens",
        "limit": 10000
      },
      "supports_parallel_tool_calls": false,
      "supports_image_detail_original": false,
      "context_window": 128000,
      "max_context_window": 128000,
      "auto_compact_token_limit": null,
      "effective_context_window_percent": 95,
      "experimental_supported_tools": [],
      "input_modalities": [
        "text",
        "image"
      ],
      "supports_search_tool": false
    },
    {
      "slug": "deepseek-v4-flash",
      "display_name": "DeepSeek V4 Flash",
      "description": "Fast DeepSeek model served through nonelinear.",
      "default_reasoning_level": "medium",
      "supported_reasoning_levels": [
        {
          "effort": "low",
          "description": "Fast responses"
        },
        {
          "effort": "medium",
          "description": "Balanced responses"
        },
        {
          "effort": "high",
          "description": "Deeper reasoning"
        }
      ],
      "shell_type": "shell_command",
      "visibility": "list",
      "supported_in_api": true,
      "priority": 30,
      "additional_speed_tiers": [],
      "service_tiers": [],
      "default_service_tier": null,
      "availability_nux": null,
      "upgrade": null,
      "base_instructions": "You are Codex, a coding agent. Help the user with software engineering tasks, use tools carefully, and keep answers concise and actionable.",
      "model_messages": null,
      "supports_reasoning_summaries": false,
      "default_reasoning_summary": "none",
      "support_verbosity": false,
      "default_verbosity": null,
      "apply_patch_tool_type": "freeform",
      "web_search_tool_type": "text",
      "truncation_policy": {
        "mode": "tokens",
        "limit": 10000
      },
      "supports_parallel_tool_calls": false,
      "supports_image_detail_original": false,
      "context_window": 128000,
      "max_context_window": 128000,
      "auto_compact_token_limit": null,
      "effective_context_window_percent": 95,
      "experimental_supported_tools": [],
      "input_modalities": [
        "text",
        "image"
      ],
      "supports_search_tool": false
    }
  ]
}

为什么不能使用简化版 catalog

当前 Codex 的模型 catalog 解析以 Rust 里的 ModelsResponse / ModelInfo 为准,外层必须是:
{
  "models": []
}
模型对象不要写成旧式或示例式字段,例如:
{
  "slug": "gpt-5.5",
  "displayName": "GPT-5.5",
  "provider": "nonelinear",
  "hidden": false
}
上面这种写法容易触发连续 schema 报错。

常见 schema 报错

missing field display_name

说明字段名写错了。当前 schema 使用 snake_case
"display_name": "GPT-5.5"
不要写成:
"displayName": "GPT-5.5"

missing field priority

说明模型对象缺少 priority。本文档使用较小的数字控制模型在 /model picker 中的展示顺序,例如 gpt-5.5 使用 0gpt-5.4-mini 使用 10

missing field experimental_supported_tools

说明模型对象缺少 experimental_supported_tools。即使暂时不用实验工具,也要保留空数组:
"experimental_supported_tools": []

/model 列表没有同步怎么办?

如果修改 nonelinear.json 后,/model 中还没有展示最新模型,通常是 Codex 还没有重新加载 catalog,或者模型对象没有设置为可见。建议按下面顺序判断:
  1. 先完全退出 Codex,再重新运行 codex
  2. 运行 codex debug models,确认 catalog 里的模型都被加载。
  3. 检查每个需要显示的模型是否都设置了 "visibility": "list"
  4. 检查 priority 是否符合预期;数值越小,展示越靠前。
如果 codex debug models 能看到全部模型,且这些模型都是 visibility: list,重新进入 Codex 后 /model 应显示这些可见模型。

启动方式

使用默认 profile:
codex
指定 profile 启动:
codex --profile nonelinear-gpt-5-5
codex --profile nonelinear-gpt-5-4-mini
codex --profile nonelinear-gpt-5-4-nano
codex --profile nonelinear-kimi-k2-6
codex --profile nonelinear-deepseek-v4-pro
codex --profile nonelinear-gpt-5-2-mini
codex --profile nonelinear-deepseek-v4-flash
临时指定模型:
codex -m gpt-5.5
codex -m gpt-5.4-mini
codex -m gpt-5.4-nano
codex -m kimi-k2.6
codex -m deepseek-v4-pro
codex -m gpt-5.2-mini
codex -m deepseek-v4-flash
进入 Codex TUI 后,也可以尝试:
/model
如果 /model 中没有展示自定义模型,请先使用 codex debug models 检查 catalog 是否被加载。

验证配置

1. 检查模型 catalog

codex debug models
按本文示例配置时,输出中应能看到下面这些模型:
gpt-5.5
gpt-5.4-mini
gpt-5.4-nano
kimi-k2.6
deepseek-v4-pro
gpt-5.2-mini
deepseek-v4-flash

2. 验证 profile 启动

codex --profile nonelinear-gpt-5-5
codex --profile nonelinear-kimi-k2-6
codex --profile nonelinear-gpt-5-4-nano
进入后发一条简单请求,例如:
当前目录下面有py脚本吗
Codex profile 启动测试

3. 验证临时模型覆盖

codex -m gpt-5.4-mini
codex -m kimi-k2.6
codex -m deepseek-v4-flash

常见问题

/model 里没有显示新模型怎么办?

先确认 nonelinear.json 中的模型对象设置正确:
"visibility": "list",
"supported_in_api": true,
"priority": 20
然后完全退出 Codex 并重新运行 codex。如果仍然没有显示,运行 codex debug models 检查 catalog 是否被读取。

/model 里还是显示默认模型怎么办?

先确认 model_catalog_json 路径正确:
model_catalog_json = "C:\\\\Users\\\\<你的Windows用户名>\\\\.codex\\\\model-catalogs\\\\nonelinear.json"
也可以使用正斜杠路径:
model_catalog_json = "C:/Users/<你的Windows用户名>/.codex/model-catalogs/nonelinear.json"
然后完全退出 Codex,重新运行:
codex
model_catalog_json 是启动时加载的配置,修改后必须重启 Codex 才会生效。

codex debug models 看不到模型怎么办?

如果 debug 输出里看不到 nonelinear.json 中配置的模型,优先检查 model_catalog_json 路径是否正确,以及 JSON 是否符合 schema。路径确认后,重新打开终端再启动:
codex
codex debug models

DeepSeek / Kimi 系列模型无法运行怎么办?

如果 gpt-5.5gpt-5.4-mini 可以正常运行,但 deepseek-v4-flashdeepseek-v4-prokimi-k2.6 失败,通常说明问题在 NoneLinear 平台侧模型路由、模型权限或模型服务可用性,而不是 Codex 配置本身。 可以先测试:
codex --profile nonelinear-gpt-5-5
确认 Codex 与 NoneLinear provider 连通后,再排查具体模型在平台侧的可用性。

GPT-5.4 系列有 token 消耗但没有输出怎么办?

如果使用 gpt-5.4gpt-5.4-minigpt-5.4-nano 等模型时出现空输出,通常是 max_tokens 设置过小。可以参考 错误处理:GPT-5.4 空输出

推荐使用方式

日常推荐使用 profile 启动:
codex --profile nonelinear-gpt-5-5
轻量任务使用:
codex --profile nonelinear-gpt-5-4-mini
需要 Kimi:
codex --profile nonelinear-kimi-k2-6
临时切换模型使用:
codex -m gpt-5.2-mini

参考依据