Repository navigation
Releases
Releases · fengye102/cli2api
CLI2API v0.6.13
English
- Add a system setting to let disabled accounts continue their opted-in automatic daily check-in without making them eligible for chat routing.
- Fix Qoder CN daily check-in by sending the machine identity headers required by the campaign service.
- A routing region latch no longer survives a large change in pool composition. Adding or migrating many accounts of another region now re-seats the route on the largest region instead of leaving the new accounts idle.
中文
- 新增系统设置,允许停用账号继续执行已开启的自动签到,同时不会让它们重新参与聊天调度。
- 修复 Qoder 国内版每日签到,补齐活动服务要求的机器身份请求头。
- 路由的区域锁定不再跨越大规模的账号池变化。新增或迁移大量其他区域的账号后,路由会重新落到账号最多的区域,而不会让新账号闲置。
镜像自官方仓库 caigee-cmd/cli2api,不含构建产物(assets)。
CLI2API v0.6.12
English
- The add-account type cards now show only the icon and title. Login details appear when you hover the info button.
- Codex account cards now read the current usage response, so the 5-hour and weekly windows show up instead of staying on "Getting quota…". The subscription tier from that response is shown above the windows.
- A stream that already finished is logged as success when the client disconnects afterward. A disconnect before the stream finishes is still canceled.
中文
- 添加账号的类型卡片现在只显示图标和标题。登录方式等说明放到信息按钮上,悬停后再展开。
- Codex 账号卡片现在按当前额度响应读取窗口,5 小时和每周额度会显示出来,不再一直停在「额度获取中…」。响应里的订阅等级会显示在额度窗口上方。
- 流已经结束后客户端再断开,请求日志记为成功。流还没结束就断开,仍然记为取消。
镜像自官方仓库 caigee-cmd/cli2api,不含构建产物(assets)。
CLI2API v0.6.11
English
- The add-account type cards now show only the icon and title. Login details appear when you hover the info button.
- Codex account cards now read the current usage response, so the 5-hour and weekly windows show up instead of staying on "Getting quota…". The subscription tier from that response is shown above the windows.
中文
- 添加账号的类型卡片现在只显示图标和标题。登录方式等说明放到信息按钮上,悬停后再展开。
- Codex 账号卡片现在按当前额度响应读取窗口,5 小时和每周额度会显示出来,不再一直停在「额度获取中…」。响应里的订阅等级会显示在额度窗口上方。
镜像自官方仓库 caigee-cmd/cli2api,不含构建产物(assets)。
CLI2API v0.6.10
English
- Codex free accounts no longer stay on login failed after a successful sign-in. The console now reads the ChatGPT account id from the login token, and an account that already signed in recovers on the next refresh.
中文
- Codex 免费账号登录成功后不再一直显示登录失败。控制台会从登录令牌里读出 ChatGPT 账号 ID,已经登录过的账号会在下次刷新时自动恢复。
镜像自官方仓库 caigee-cmd/cli2api,不含构建产物(assets)。
CLI2API v0.6.9
English
- Choose an account type from cards instead of a dropdown, with a Codex mark and a scrollable list that keeps the dialog width stable.
中文
- 新建账号改为卡片选择渠道,补上 Codex 图标;渠道过多时列表在固定高度内滚动,弹窗保持加宽后的宽度。
镜像自官方仓库 caigee-cmd/cli2api,不含构建产物(assets)。
CLI2API v0.6.8
English
- Show Codex 5-hour and weekly quota from the account usage probe, and keep a signed-in account on “getting quota” until a real window arrives.
中文
- Codex 账号改为从额度探测读取 5 小时和每周窗口;已登录但还没有窗口时显示「额度获取中」,不再显示「额度不可用」或 0/0。
镜像自官方仓库 caigee-cmd/cli2api,不含构建产物(assets)。
CLI2API v0.6.7
English
- Preserve OpenAI Responses items through Codex native forwarding, while applying the ChatGPT Codex request constraints used by CLIProxyAPI. Chat Completions and Messages requests translated to Codex use the same constraints.
- Add
codexprovider: OpenAI Codex accounts backed by a ChatGPT subscription, with browser OAuth login, automatic token refresh, streaming chat, model catalog, and rate-limit window display. - Add an experimental Command Code (
commandcode.ai) provider that speaks the CLI's own/alpha/generateprotocol. That endpoint is not plan-gated, so every plan works — including the $1 Go plan, whose Pro-gated/provider/v1/*generation endpoints return403 upgrade_required. The adapter serves the whole model catalog. Auth is a singleuser_…key, pasted through the existing PAT tab; the model list is read from the anonymous/provider/v1/models, and usage is shown from/alpha/billing/credits(monthly plan window plus the rolling 5-hour and weekly windows). Streaming is rewritten from the upstream newline-delimited JSON into OpenAI SSE. Experimental:/alpha/generateis unpublished and version-coupled, so the pinned CLI version fails loudly rather than degrading silently, and the provider is not production-ready. - Present Qoder's context window like Trae's Max-context switch. Qoder reports a default window and a larger selectable window per model but has no upstream toggle, so the console now shows the same "default → larger + switch" control it uses for Trae instead of a raw number input. Turning it on sends the model's largest window as the request's
context_length; turning it off clears the override so requests fall back to the model's default. The window values come from Qoder's own catalog (default_context_window/available_context_windows) rather than a hardcoded 180000, so glm-5.3-flash shows 1M instead of being capped at 180k. Qoder Global and CN. - Show Qoder model pricing on the account's model list. Qoder reports a per-model
price_factor(the multiplier its own client renders as0.50x Credit) plusis_free/tags, but the worker dropped them, so the console showed no price for any Qoder account. The worker now forwards them and the adapter renders the multiplier as the console's credits text. The free badge follows the Qoder client's own rule — thelimited_time_freetag (or a zero factor) is free, a positive factor is priced — so a model that reportsis_freealongside a real multiplier (Qwen3.8-Max:is_free+0.5) shows its multiplier instead of the contradictory "免费 / x0.5" pair. Applies to Qoder Global and Qoder CN. - Qoder accounts now show their real remaining credits: the account card's headline sums the plan quota, the add-on pack, and the organization resource package instead of reading only the plan quota. Daily check-in rewards are credited to the add-on pack upstream, so before this a plan-only account's card never moved after a check-in (it stayed at e.g. 300 while the reward sat unshown). This matches how the Qoder client itself totals the buckets.
中文
- Codex 原生转发保留 OpenAI Responses 的 item,同时按 CLIProxyAPI 的方式改写 ChatGPT Codex 不接受的请求字段。Chat Completions 与 Messages 转成 Codex 请求时使用同一套约束。
- 新增
codexprovider:基于 ChatGPT 订阅的 OpenAI Codex 账号,支持浏览器 OAuth 登录、自动刷新 token、流式聊天、模型目录和限速窗口展示。 - 新增实验性 Command Code(
commandcode.ai)渠道,走 CLI 自身的/alpha/generate协议。该端点不受档位限制,所有套餐均可用 —— 包括 $1 Go 套餐(其 Pro 专属的/provider/v1/*生成端点会返回403 upgrade_required)。适配层覆盖整个模型目录。认证只需一把user_…密钥,经现有 PAT 页签粘贴;模型列表读取匿名的/provider/v1/models;用量从/alpha/billing/credits展示(月套餐窗口,以及滚动的 5 小时 / 周窗口)。流式响应由上游的换行分隔 JSON 改写为 OpenAI SSE。实验性:/alpha/generate未公开且与 CLI 版本耦合,故钉版不匹配时明确报错而非静默降级,不承诺生产可用。 - Qoder 的上下文窗口改为按 Trae 的「更大上下文」开关呈现。Qoder 每个模型都会上报默认窗口和一个可选更大窗口,但上游没有开关字段,因此控制台不再用裸数字输入框,而是复用 Trae 同款的「默认档 → 更大档 + 开关」。开启时把该模型的最大窗口作为请求的
context_length发出;关闭时清除覆盖值,请求回落到模型默认窗口。窗口数值来自 Qoder 自身目录(default_context_window/available_context_windows),不再是硬编码的 180000,因此 glm-5.3-flash 显示 1M 而不再被压到 180k。国际版与国内版均适用。 - 账号的模型列表现在会显示 Qoder 模型价格。Qoder 每个模型都带
price_factor(其客户端显示为0.50x Credit的那个倍率)以及is_free/tags,但 worker 之前把它们丢掉了,所以控制台对所有 Qoder 账号都不显示价格。现在 worker 透传这些字段,适配层把倍率渲染为控制台的额度文案。免费标记对齐 Qoder 客户端自身的规则——带limited_time_free标签(或倍率为 0)才算免费,正倍率即视为计费——因此像 Qwen3.8-Max 这种「is_free为真但同时带 0.5 倍率」的模型会显示倍率,而不再出现自相矛盾的「免费 / x0.5」。Qoder 国际版与国内版均适用。 - Qoder 账号现在显示真实剩余额度:账号卡片的主数值改为把「套餐额度 + 加量包 + 组织资源包」三桶相加,而不是只读套餐额度。每日签到奖励在上游是记入加量包的,因此此前仅靠套餐额度的账号在签到后卡片数字始终不动(例如一直停在 300,奖励金额不显示)。这与 Qoder 客户端自身的合计口径一致。
镜像自官方仓库 caigee-cmd/cli2api,不含构建产物(assets)。
CLI2API v0.6.6
English
- Devin: resolve
chat_model_uidfrom the live model catalog instead of hardcoded suffix tables, so renamed or removed thinking variants (e.g.swe-1-7,glm-5-2) no longer emit stale upstream model IDs. "None" is never chosen as an implicit default effort. - Devin: pass images embedded in tool results through to the upstream prompt instead of dropping them.
- Stack Devin daily, weekly, and monthly quota meters as separate full-width rows on the account card, instead of sitting side by side.
- Expose WorkBuddy credit-pack expiry in
GET /api/accountsquota: a newpackagesarray carries each pack's remain/used/size plus itsCycleEndTime(asend_timeand a Unixends_at), and the top-levelexpires_at/expiring_remainreport the soonest expiry and how much remaining credit lapses then. The console quota tooltip now shows "N credits expire on D". All fields areomitempty; providers that do not report expiry (Trae, Qoder) simply omit them.
中文
- Devin:
chat_model_uid改为按实时模型目录解析,不再使用硬编码后缀表;上游已改名或移除的思考档变体(如swe-1-7、glm-5-2)不会再发出过期模型 ID。默认档不会隐式选择none。 - Devin:工具结果中携带的图片现在会透传给上游,不再被丢弃。
- Devin 日额度、周额度、月额度在账号卡片上各自单独占一行铺满,不再并排挤在一起。
- 在
GET /api/accounts的 quota 中透出 WorkBuddy 积分包到期时间:新增packages数组按包返回 remain/used/size 以及CycleEndTime(end_time原始串与 Unix 秒ends_at),顶层expires_at/expiring_remain给出最近一次到期时间及该时点将过期的剩余量;控制台配额 tooltip 现在会显示「N 积分将于某日到期」。所有字段均为omitempty,不上报到期信息的 provider(Trae、Qoder)保持缺省。
镜像自官方仓库 caigee-cmd/cli2api,不含构建产物(assets)。
CLI2API v0.6.5
English
- Console copy buttons now fall back to a hidden-textarea copy when the async Clipboard API is unavailable, so copying works when the console is served over plain http (a non-secure context), not just https/localhost.
- Trae account quota now counts only the General credit bucket; the Work-only bucket (parsed separately) is excluded so it is not summed into the General figure.
- Stretch Devin daily and weekly quota meters across the account card, with the title, used percent, bar, and reset time in one compact stack.
- Add concise acknowledgements for open-source projects that informed the project.
- Preserve cached input token usage in Responses API output for both streaming and non-streaming requests without double-counting total tokens.
- Map upstream
finish_reason: lengthresults to the Responses APIincompleteterminal state, including streaming events, request logs, statistics, and UI filters. - Recover Responses requests from malformed historical function-call arguments by skipping the invalid call/output pair, and avoid emitting invalid JSON arguments in generated Responses output.
- Trae max mode is now only offered on models that declare a real second tier. Models upstream tags for max mode without a larger window or larger ceilings no longer show a toggle that changes nothing (affects Doubao-Seed-2.1-Turbo, kimi-k2.6, kimi-k2.7-code).
- Turning Trae max mode off now restores the default-tier prompt/output ceilings immediately. The toggle only switches the context window server-side; the console derives the shown ceilings from the Max tier at render time, so the previously stuck Max values (e.g. 936k prompt / 64k output) no longer linger until a full catalog refresh.
- Trae login now uses the IDE (PKCE) authorization-code flow: the login URL carries a S256
code_challenge, and the pasted callback'sauthCodeInfocode is exchanged at/trae/api/v3/oauth/ExchangeTokenwith the matching verifier and a device public key (EC P-256). Accounts created before the switch keep refreshing with the OAuth client that minted their token (refresh_client_id). - The Trae model catalog now also fetches a second scene (
chat_v3) and merges it into the primary scene, so models the primary catalog hides as invisible become selectable. Duplicates prefer the entry carrying a credit rate. - Trae chats are now routed to the catalog scene that actually serves each model. The whole catalog is served through
chat_v3(which also carries the Max-mode tiers), and only models that scene does not list fall back tosolo_work_lite. Previously every chat went throughsolo_work_lite, so the six models that scene does not carry (Doubao-Seed-Code, deepseek-v4.1-flash, glm-5.3-flash, glm-5.3-flashx, kimi-k2.8-preview, qwen3.8-flash) failed with a param error, and Max mode was sent to a scene without Max tiers. This is derived from catalog membership, so new models route correctly on the next refresh without changes. - Preserve WorkBuddy cache-read and cache-write token usage when converting aggregated streaming responses into non-streaming results.
- Retry WorkBuddy daily check-ins when the upstream temporarily reports that a request is still being processed.
中文
- 控制台复制按钮在异步剪贴板 API 不可用时回退到隐藏文本框 + execCommand,因此在纯 http(非安全上下文)下打开控制台时复制也能生效,不再只支持 https/localhost。
- Trae 账号额度只统计「通用积分」桶;「Work 专属积分」桶(单独解析)不计入,避免混入通用额度。
- Devin 日额度和周额度条铺满账号卡片,标题、已用百分比、进度条和重置时间落在同一组紧凑块里。
- 在 README 增加简短的开源项目致谢。
- 在 Responses API 的流式与非流式输出中保留缓存输入 Token 用量,同时避免在总 Token 数中重复计数。
- 将上游
finish_reason: length结果映射为 Responses API 的incomplete终止状态,并同步支持流式事件、请求日志、统计与界面筛选。 - 当 Responses 历史记录包含格式错误的函数调用参数时,跳过对应的调用与输出以恢复请求,并避免在生成的 Responses 输出中发送无效 JSON 参数。
- Trae 的「更大上下文」开关现在只在确有第二档的模型上出现。上游标了 max mode 但没有更大窗口、也没有更大上限的模型,不再显示一个点了没反应的开关(涉及 Doubao-Seed-2.1-Turbo、kimi-k2.6、kimi-k2.7-code)。
- 关掉 Trae max mode 后,输入/输出上限立即回到默认档。开关在服务端只切上下文窗口;控制台展示层在渲染时从 Max 档取值,因此之前会残留的最大值(如 936k 输入 / 64k 输出)不再需要整表刷新才恢复。
- Trae 登录改用 IDE(PKCE)授权码流程:登录链接带 S256
code_challenge,粘贴回调里的authCodeInfocode 连同 verifier 与设备公钥(EC P-256)交到/trae/api/v3/oauth/ExchangeToken换取令牌。切换前创建的账号继续用签发其 refresh token 的 OAuth client 刷新(refresh_client_id)。 - Trae 模型目录额外拉取
chat_v3场景并与主场景合并,使主目录里被标为 invisible 的模型变为可选;重复项优先保留带倍率的条目。 - Trae 聊天现在按「实际提供该模型的目录场景」路由。整个目录默认走
chat_v3(该场景也是唯一带 Max 档的),仅当chat_v3不收录某模型时才回退到solo_work_lite。此前所有聊天一律走solo_work_lite,导致该场景没有的 6 个模型(Doubao-Seed-Code、deepseek-v4.1-flash、glm-5.3-flash、glm-5.3-flashx、kimi-k2.8-preview、qwen3.8-flash)报参数错误,且 Max 模式被发到了没有 Max 档的场景。该路由由目录收录关系推导,新模型下次刷新即自动归位,无需改码。 - 将 WorkBuddy 聚合流式响应转换为非流式结果时,保留缓存读取与缓存写入 Token 用量。
- 当 WorkBuddy 上游暂时返回“请求处理中”时,自动重试每日签到。
镜像自官方仓库 caigee-cmd/cli2api,不含构建产物(assets)。
CLI2API v0.6.4
English
- Send Qoder CN campaign check-in with the official desktop
Cosy-ClientTypeheaders so the daily credit activity is not filtered out as unavailable.
中文
- Qoder 国内版活动签到补上官方桌面端
Cosy-ClientType请求头,避免每日积分活动被过滤成未开放。
镜像自官方仓库 caigee-cmd/cli2api,不含构建产物(assets)。