开源 · macOS / Windows 托盘小工具Open source · menu bar / tray utility for macOS and Windows

让 ChatGPT 桌面版里的 Codex,用上你自己的模型服务Use your own model service with Codex in the ChatGPT desktop app

填好 Base URL 和 API Key,模型接入助手替你改好 Codex 配置,并在本机 127.0.0.1:47311 转发请求。这个页面把你自己的模型服务叫作「中转」。Enter a Base URL and an API Key. ModelBridge updates the Codex configuration for you and forwards requests locally at 127.0.0.1:47311. This page calls your own model service the “relay”.

需要先装好 ChatGPT 桌面版 · macOS 13 及以上(Apple 芯片)· Windows 10 1809 及以上(64 位)Requires the ChatGPT desktop app · macOS 13 or later (Apple silicon) · Windows 10 1809 or later (64-bit)

界面长什么样What it looks like

下面是照 App 的样子画的示意图,里面的地址、Key、数字都是示例。These are drawn mock-ups of the app. Every address, key and number in them is an example.

在主窗口开关转发、看当前的接入方式、管理中转配置。Turn forwarding on or off, see the current access mode and manage relay configurations.

The app’s interface is available in Chinese only.

三步上手Set up in three steps

  1. 下载并安装Download and install

    先装好 ChatGPT 桌面版,再到 Releases 页面下载安装包。安装包没有开发者签名,第一次打开要手动放行,步骤写在「下载」一节。Install the ChatGPT desktop app first, then get the installer from the Releases page. The installer is not code-signed, so you approve it by hand the first time. The steps are in the Download section.

  2. 填 Base URL 和 API KeyEnter the Base URL and API Key

    打开模型接入助手,填中转提供的 Base URL(例如 https://relay.example.com/v1)和 API Key(例如 sk-example-0000),点「完成设置」。Open ModelBridge and enter the Base URL (for example https://relay.example.com/v1) and API Key (for example sk-example-0000) from your relay service, then click “完成设置” (Finish setup).

  3. 重启 ChatGPTRestart ChatGPT

    助手只提示"重启 ChatGPT 后生效",由你自己重启。重启后,在 Codex 的模型列表里就能选中转模型。ModelBridge only tells you that the change takes effect after ChatGPT restarts. You restart it yourself. After that, the relay models appear in the Codex model list.

两种接入方式,自动选Two access modes, picked automatically

助手检测 Codex 有没有登录 ChatGPT,按结果自动选一种。ModelBridge checks whether Codex is signed in to ChatGPT and picks a mode from the result.

已登录 ChatGPT 时When signed in to ChatGPT

官方 + 中转Official + relay

模型列表里官方模型在上,中转模型在下。选官方模型时,请求仍然访问官方服务。Official models come first in the list and relay models follow. Requests for official models still go to the official service.

没登录 ChatGPT 时When not signed in to ChatGPT

只用中转Relay only

不登录也能用。模型列表里只有中转模型,默认选中「中转 · auto」。登录 ChatGPT 后在主窗口点「重新检测」,就能同时用官方模型。It works without signing in. The list holds relay models only, with “中转 · auto” selected by default. After you sign in to ChatGPT, click “重新检测” (Re-check) in the main window to get official models as well.

Relay models are labelled “中转” (relay) in the list.

安全说明Security

全部源码公开在 GitHub 上,下面每一条都能在代码里查到。All source code is public on GitHub. You can check every point below in the code.

  • API Key 只存在系统凭据库The API Key lives in the system credential store

    macOS 存进钥匙串,Windows 存进凭据管理器。普通文件和日志里都没有它。Keychain on macOS, Credential Manager on Windows. It is absent from ordinary files and logs.

  • 官方凭据只发往官方服务Official credentials go to the official service only

    官方凭据只转发给官方服务,中转收不到;助手也不保存它。They are forwarded to the official service alone. The relay never receives them and ModelBridge does not store them.

  • 配置可以原样还原Your configuration is restored as it was

    助手只改自己的接入项。关闭转发或卸载时,Codex 配置还原为开启前的样子。ModelBridge changes only its own entries. When you turn forwarding off or uninstall, the Codex configuration returns to its earlier state.

  • 重启 ChatGPT 由你决定You decide when ChatGPT restarts

    改动要重启才生效时,助手只提示"重启 ChatGPT 后生效",什么时候重启由你定。When a change needs a restart, ModelBridge only shows a notice. The timing is yours.

常见问题FAQ

没登录 ChatGPT 能用吗?Does it work if I am not signed in to ChatGPT?

能。助手会自动用「只用中转」方式:Codex 里只有中转模型,默认选中「中转 · auto」。Yes. ModelBridge switches to the “Relay only” mode: Codex lists relay models only, with “中转 · auto” selected by default.

选了官方模型,请求会发给中转吗?If I pick an official model, is the request sent to the relay?

只发给官方服务。请求先到本机的助手,助手再把官方模型的请求转给官方服务,官方凭据也只发往官方服务。It goes to the official service only. The request reaches ModelBridge on your machine, which passes official-model requests to the official service. Official credentials go there and nowhere else.

API Key 存在哪里?Where is the API Key stored?

macOS 存在系统钥匙串,Windows 存在凭据管理器。In Keychain on macOS and in Credential Manager on Windows.

助手会重启我的 ChatGPT 吗?Will it restart ChatGPT for me?

助手只提示"重启 ChatGPT 后生效",重启由你自己操作。ModelBridge only shows a notice that the change takes effect after a restart. You restart ChatGPT yourself.

以后不想用了怎么办?What if I stop using it?

关闭转发,Codex 配置就还原为开启前的样子。要卸载时:macOS 用菜单里的「卸载模型接入助手…」(直接把 App 拖进废纸篓的话,Codex 配置得不到还原);Windows 用托盘菜单卸载,或者从「应用和功能」卸载。卸载后 ChatGPT 和聊天数据都还在。Turn forwarding off and the Codex configuration returns to its earlier state. To uninstall on macOS, use “卸载模型接入助手…” (Uninstall) in the menu, because dragging the app to the Trash leaves the Codex configuration unrestored. On Windows, uninstall from the tray menu or from “Apps & features”. ChatGPT and your chats stay in place.

第一次打开被系统拦住了怎么办?The system blocked the app on first launch. What now?

安装包没有开发者签名,手动放行即可。macOS:进入 系统设置 > 隐私与安全性,点「仍要打开」。Windows:在 SmartScreen 弹窗里点「更多信息 > 仍要运行」。The installer is not code-signed, so approve it by hand. macOS: open System Settings > Privacy & Security and click “Open Anyway”. Windows: in the SmartScreen dialog click “More info > Run anyway”.

支持哪些系统?Which systems are supported?

macOS 13 及以上(Apple 芯片)和 Windows 10 1809 及以上(64 位)。电脑上要先装好 ChatGPT 桌面版。macOS 13 or later (Apple silicon) and Windows 10 1809 or later (64-bit). The ChatGPT desktop app must be installed first.

下载Download

安装包放在 GitHub 的 Releases 页面。Installers are published on the GitHub Releases page.

首次打开要手动放行Approve the app by hand on first launch

macOS
把 App 拖进「应用程序」,双击打开被拦后,进入 系统设置 > 隐私与安全性,点「仍要打开」。Drag the app into Applications. When the first launch is blocked, open System Settings > Privacy & Security and click “Open Anyway”.
Windows
在 SmartScreen 弹窗里点「更多信息 > 仍要运行」。In the SmartScreen dialog click “More info > Run anyway”.

升级到新版本后,钥匙串可能会问一次是否允许访问,选允许即可。After an upgrade, Keychain may ask once whether to allow access. Choose Allow.