makecindy / makecindy/cindy

Codex 会话无法添加自定义 OpenAI 兼容 API(公司内部模型网关)

Open
#1,463 0 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
TypeScript
Stars
2.7k
Forks
401
Avg merge
21h 48m
Merged PRs (30d)
776

Description

**提交人**: 板栗
**客户端版本**: 0.1.27

---

## 使用场景

用户所在公司有自建的模型 API 网关(OpenAI 兼容接口,如 `https://xxx/v1/chat/completions`),提供了 gpt-5.5、deepseek 等模型供内部使用。用户在 cc-switch 中已正确配置该网关(Base URL + API Key + 模型名),并已验证 Codex CLI 能通过该网关正常调用(返回成功)。

用户希望在 Cindy 的 Codex 会话中也能使用公司 API 的这些模型,避免重复购买或依赖个人订阅。

## 诉求

在 Cindy 的 Codex 会话中,支持添加/使用自定义的 OpenAI 兼容 API 作为模型来源(类似 cc-switch 的做法),而不是被锁定在 Cindy 自有的云网关。

## 建议方案

1. 在 Cindy 的模型供应商设置中,为 Codex 会话开放「自定义 OpenAI 兼容 API」的配置入口(Base URL / API Key / 模型列表)。
2. 或者,让 Cindy 的 Codex 会话能够读取/继承 cc-switch 中配置好的第三方 Codex provider(当前 cc-switch 配置了公司 API 后,Cindy 启动 Codex 时仍强制使用 `cindy_gateway`,完全不读取 cc-switch 的 provider 配置)。

## 当前行为

- 在 cc-switch 中配置公司 API(codex provider,已验证可用)后,Cindy 的 Codex 会话仍无法使用这些模型。
- Cindy 启动 Codex 时通过命令行参数强制设置 `model_provider="cindy_gateway"`,指向 Cindy 自有的本地/云网关,不加载 cc-switch 或用户自定义的 provider。
- Cindy 的「自定义 provider」目前只支持 Claude Code runtime(`custom_providers` 表仅含 claude-code),没有 Codex runtime,界面中没有为 Codex 添加自定义 API 的入口。
- 结果:公司 API 的模型(gpt-5.5、deepseek 等)在 Cindy 的 Codex 会话中完全不可用。

## 期望行为

在 Cindy 的 Codex 会话中,用户应能添加并使用任意 OpenAI 兼容的自定义 API 作为模型来源,如同在 cc-switch 或 Codex CLI 中一样。
---
**版本区域**: CN
**OS**: darwin arm64 (24.2.0)
**界面语言**: zh-CN

Contributor guide

Open the contributing guide

Research direction

Start by tracing how Cindy launches Codex with the model_provider="cindy_gateway" argument and inspect the custom_providers table, which currently covers only the Claude Code runtime. Compare this provider-selection path with the existing Codex CLI or cc-switch configuration described in the issue. Done means a Codex session can select a configured OpenAI-compatible endpoint and use its models instead of being forced to cindy_gateway.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.