Releases: LeenixP/Codex-Bridge
Releases · LeenixP/Codex-Bridge
v1.3.0
v1.3.0
Added
- Model fallback page — New dedicated sidebar page "Model Fallback" between Providers and Settings. Select a configured model to automatically handle requests for unconfigured models (e.g.
gpt5.4-mini), preventing Codex retry loops.
Changed
- LAN access toggle — Replaced listen address radio buttons with a single toggle switch and help-tip tooltip for a cleaner UI.
Fixed
- Provider edit/delete buttons unresponsive — Restored missing event bindings for edit and delete buttons on provider cards.
v1.2.0
v1.2.0
Added
- key/modelId routing — Provider-level routing key (auto-generated from name with ZH→EN mapping) enables
key/modelIdformat routing (e.g.GLM/glm-5.1), eliminating model name conflicts across providers. - Multi-model per provider — Each provider supports a
models[]array with per-modelmaxOutputKandmaxContextKsettings, replacing the singlemodelfield. - LAN access toggle — Settings page toggle switch to enable LAN access; Quick Start page shows hint about using machine IP for LAN devices.
- Quickstart dual-mode — Quick Start page shows two usage modes: cc-switch (API Key) and direct config.toml (ChatGPT account), with auto-generated config templates and clickable model selector.
- Markdown-aware tag parser — Thinking-tag parser tracks backtick code spans/blocks to avoid false positives on literal
<thinking>text inside markdown. - DeepSeek
user_idpassthrough — Provider-leveluserIdfield passes through asuser_id(OpenAI Chat) ormetadata.user_id(Anthropic) for account-level KVCache and safety isolation.
Changed
- Removed active provider concept — Routing is now purely request-based (
key/modelId); no more "set as current" button or active badge. - Provider data migration —
loadProviders()auto-migrates old{ model: "xxx" }format to{ models: [{ id: "xxx" }] }and generateskeyfor providers without one. - Thinking parser conditional skip — OpenAI Chat adapter skips the thinking-tag parser when upstream sends
reasoning_contentfield, preventing false-positive truncation. - Anthropic adapter —
max_tokensdefaults to 65536 (from 8192) to prevent long response truncation. /v1/modelsendpoint — Returns models inkey/modelIdformat.
Fixed
- Response truncation on OpenAI Chat — Thinking-tag parser no longer misidentifies literal
<thinking>text in markdown content as thinking tags. - CI pipeline — Fixed Prettier formatting inconsistencies and ESLint errors that caused all CI runs to fail.
v1.1.0 - Stability, Quality and Comprehensive Testing
Changes
Bug Fixes
- Fix duplicate anthropic-beta header in Anthropic non-streaming adapter
- Replace broken Atomics.wait hack in catalog.js with async execFile
- Fix port || 8629 to ?? 8629 so port 0 is handled correctly
- Fix Chinese character encoding corruption in catalog.js
- Add missing await on injectCodexConfig() in main process
- Remove conflicting ESLint quotes rule override
Code Quality
- Replace all console.warn calls with shared logger across adapters
- Change all var to const/let across all source files
- Move inline require() calls to top of files
- Remove unused getFeatures export from presets
- Lint: 0 errors, 0 warnings
Testing (402 tests)
- Add 289 comprehensive unit tests covering adapters, SSE bridge, events, cache, stream parser, presets, and edge cases
- Replace hardcoded ports with random port allocation in all integration tests
- Add npm run test:unit and npm run test:integration scripts
v1.0.0 — First Stable Release
Codex-Switch v1.0.0
将 Codex Desktop 桥接到任意 LLM 供应商。把 OpenAI Responses API 转换为 Anthropic/OpenAI Chat 协议,支持基于预设的供应商扩展。
亮点
- DeepSeek 思考透传 — 完整的多轮对话 thinking/reasoning 支持,适应 DeepSeek Anthropic 端点,并保留加密签名
- 模型别名系统 — 所有 Codex 原生模型标识(gpt-5.5、gpt-5.4、gpt-5.4-mini 等)自动别名到当前供应商模型,防止后台任务将原生模型名泄露到上游
- 混合 OAuth + 代理鉴权 — 双层架构:ChatGPT OAuth 处理 plugins/Mobile/quotas,模型请求则通过本地代理路由
- 预设注册表 — 供应商预设结合协议专用 Hook,无需修改核心适配器即可扩展
自 v0.1.1 以来的变更
修复
- DeepSeek 思考透传错误(
content[].thinking must be passed back)在多轮工具调用对话中- 根因:
function_call类型的条目在 reasoning 到目标消息的搜索中被跳过,导致 thinking 块注入到错误的 assistant 消息 - 新增签名缓存层(
reasoning-cache.js),在 Codex 无状态协议中保留 DeepSeek 加密签名 - 修复 SSE 桥接:新建 reasoning 项前先关闭之前打开的 message 项
- Anthropic 适配器现在捕获
signature_delta事件并在 block 完成时存入缓存
- 根因:
- Codex 启动卡死(无限加载)— 由
preferred_auth_method = "apikey"与混合 OAuth 模式冲突所致,现已自动检测并禁用 - 原生模型名泄露 — Codex 后台任务(标题生成等)将原生模型名发送到上游;现已将所有已知标识别名化
- 原生 Catalog 读取增加带指数退避的重试机制,应对启动缓慢的场景
新增
src/proxy/core/reasoning-cache.js— 内存级 reasoning 文本到签名缓存catalog.js中基于原生 Catalog 的模型别名生成- Thinking 注入和输入结构的详细诊断日志
安装
- 下载下方的
Codex-Switch-v1.0.0-Windows_Setup.exe - 运行安装程序(已签名)
- 启动 Codex-Switch,选择供应商预设,启动代理
- Codex Desktop/CLI 会自动通过本地代理路由
校验
MD5: 9cac237aae5bc8f118c068363ce06419
环境要求
- Windows 10/11 x64
- 已安装 Codex Desktop 或 CLI
- 至少一个 LLM 供应商的 API Key(DeepSeek、OpenAI、Anthropic 等)