<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Config on</title><link>https://coolbeevip.github.io/tags/config/</link><description>Recent content in Config on</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Thu, 23 Apr 2026 16:00:00 +0800</lastBuildDate><atom:link href="https://coolbeevip.github.io/tags/config/index.xml" rel="self" type="application/rss+xml"/><item><title>如何让 Codex 连接第三方模型平台</title><link>https://coolbeevip.github.io/posts/codex/codex-connect-third-party-model-provider/</link><pubDate>Thu, 23 Apr 2026 16:00:00 +0800</pubDate><guid>https://coolbeevip.github.io/posts/codex/codex-connect-third-party-model-provider/</guid><description>Codex 接第三方平台，只改 config.toml 两段：
model_providers：声明网关地址、协议和密钥变量 profiles：绑定 provider 和具体模型参数 如果你是第一次找这个文件，默认位置通常是 $CODEX_HOME/config.toml，很多机器上会落在 ~/.codex/config.toml。
本文配置在 OpenAI Codex v0.123.0 下验证。版本变化快，后续行为以官方文档和 release notes 为准。
配置完成后，通过 profile 切换模型。
配置片段 # 模型平台 [model_providers.aliyuncs] name = &amp;#34;dashscope aliyuncs&amp;#34; base_url = &amp;#34;https://dashscope.aliyuncs.com/compatible-mode/v1&amp;#34; supports_websockets = false env_key = &amp;#34;MY_API_KEY&amp;#34; # 模型配方 [profiles.minimax] model_provider = &amp;#34;aliyuncs&amp;#34; model = &amp;#34;MiniMax-M2.5&amp;#34; model_context_window = 131072 model_max_output_tokens = 8192 关键字段说明 base_url: 第三方网关根路径，示例为 https://dashscope.aliyuncs.com/compatible-mode/v1。 supports_websockets: 是否启用 WebSocket 通道。这个配置走 HTTP，请设为 false。 env_key: 读取 API Key 的环境变量名，示例为 MY_API_KEY。 model_provider: profile 绑定的 provider 名，必须与 [model_providers.</description></item></channel></rss>