
用 OpenAI 项目密钥接中转时带工具就 400 的两个叠加原因,以及维护者给出的两条接法与额度不烧钱的四项配置。
/v1/responses 该挂在哪一段、怎么和现有 Codex 号池隔开2。openai-compatibility 里挂 api.openai.com 的、想把订阅 credits 吃干净的、担心额度打穿烧到付款方式的。| 你要的效果 | 挂哪一段 | 必须改的键 |
|---|---|---|
| sk-proj 打 chat/completions,下游客户端不动 | openai-compatibility | 模型条目补 thinking.levels(含 none 或写空数组);use-max-completion-tokens: true |
sk-proj 打原生 /v1/responses,要 function 工具 | api-keys.codex | base-url: https://api.openai.com/v1、disable-codex-cloaking: true |
| 两个都不许和 Codex OAuth 号池串味 | 两条都行 | 用 alias,不要只靠 prefix |
prefix 看起来像隔离,实际不隔离。/v1/responses 时,这段代码先翻成 Chat Completions 发出去,回程再翻回来。所以工具调用走的是 chat 语义,不是 responses 语义。thinking,服务启动时就会给它补上一套三档的 ThinkingSupport。
thinkingSupport == nil && !model.Image 时直接给 Levels: []string{"low","medium","high"}。仓库 router-for-me/CLIProxyAPI,文件 v8.0.52 的 sdk/cliproxy/service_models.go4none。所以客户端写 reasoning.effort: "none" 时,校验会先判这个模型是否允许关闭思考:ZeroAllowed 为假、none 也不在可用档位里。config.Level = lowest。
ModeNone 落到 lowestSupportedLevel。仓库 router-for-me/CLIProxyAPI,文件 v8.0.52 的 internal/thinking/validate.go5thinking: { levels: [] }。空名单时校验走不到夹档分支。requests.payload.filter 里把 reasoning_effort 过滤掉,上游收到的 body 里就没有这个字段。max_completion_tokens。所以带工具 400 修好之后如果发现输出被截断,先把这一项打开。api-keys.codex(旧名 codex-api-key),base-url 写 https://api.openai.com/v11。Originator: codex-tui,再盖一串 codex-tui/0.154.0 … 的 User-Agent。disable-codex-cloaking: true,applyCodexCloakingHeaders 才跳过这两行。
isCodexCloakingDisabled,命中即 return,两行头都不写。仓库 router-for-me/CLIProxyAPI,文件 v8.0.52 的 internal/runtime/executor/codex_executor_request.go6alias 是最稳的:配了别名之后,这段凭据只注册别名、不注册裸模型名,与现有 Codex OAuth 零重叠,也不会被回落命中1。priority:两边暴露同一型号或同一别名,数值大的先走。这是设计成两条路互相兜底,不是隔离手段。insufficient_quota 或 billing_hard_limit_reached。request-retry: 0。默认会多打几轮,每一轮都是真实计费。data: 帧9。data: 的行,裸 JSON 块在这一步被判成空、整块丢掉10。
if !bytes.HasPrefix(rawJSON, dataTag) 命中就返回空切片,dataTag 在第 22 行定义为 []byte("data:")。仓库 router-for-me/CLIProxyAPI,文件 v8.0.52 的 internal/translator/openai/claude/openai_claude_response.go10message_delta 与 message_stop,正文为空、用量为 0。看起来像模型什么都没说,实际是链路把内容丢了。7ae8044)是同一个。局域网访问开关与其管理密钥校验,beta 里就已经有了。ccd7bd8,main 仍停在 7ae8044。追新的人不必再下一次包。| 仓库 | 当前版本(北京时间) | 窗口内动作 |
|---|---|---|
| router-for-me/CLIProxyAPI | v8.0.52(11-03 03:15)15 | 零发版;#7188 关闭并给口径、PR #7217 新开、#7189 转讨论 |
| Wei-Shaw/sub2api | v0.2.19(10-28 18:16)16 | 零发版;#8488 一条新评审 |
| icebear0828/codex-proxy | v2.1.22(11-03 07:23)13 | 正式版发布,同 beta 提交 |
| james-6-23/codex2api | v3.1.2(10-28 04:40)17 | 零动作 |
thinking.levels,要么含 none、要么写空数组;同时打开 use-max-completion-tokens。api-keys.codex 加 disable-codex-cloaking: true,靠 alias 与现有号池隔开,别只写 prefix。request-retry: 0,两个配额 429 文案接 stop-and-cooldown。github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
status.openai.com
status.anthropic.com
status.cloud.google.com
codex-reset.com
reddit.com
This story was produced automatically by a channel. One sentence is all it takes for Neodrop to keep producing for you.