Repository navigation
Releases
v1.17.2
v1.17.2
English
- Show the Volcengine Ark Coding Plan model catalog in Pi under the existing
subswap-volcengineprovider. Existing scopes keep working, custom channels keep their own model, and changing pool accounts preserves the model selected in Pi. - Restore quota display for Volcengine Coding Plan accounts in Pi. Existing quota credentials survive migration, and accounts without quota credentials do not show invented usage.
- Skip accounts with exhausted quotas when rotating the Pi pool. The CLI highlights the reset countdown for exhausted windows in red.
Upgrade with brew upgrade subswap. Restart an independently managed daemon. Reload Pi or start a new Pi session to load the updated extension.
简体中文
- 在 Pi 中通过原有的
subswap-volcengine提供火山方舟 Coding Plan 模型目录。已有模型范围继续生效,自定义渠道保留自己的模型,池内换号会保留在 Pi 中选定的模型。 - 恢复 Pi 中火山方舟 Coding Plan 账号的额度显示。迁移时保留已有额度凭据,未配置额度凭据时不显示虚构用量。
- Pi 账号池轮换时跳过额度耗尽的账号;CLI 用红色突出显示耗尽窗口的重置倒计时。
Homebrew 用户可运行 brew upgrade subswap 升级。若独立管理后台服务,升级后请重启服务。在 Pi 中重新加载或新建会话,以使用新版扩展。
v1.17.1
v1.17.1
English
Changes
- Add a
piprovider for Pi's multi-slot authentication drawer.subswap login piimports live slots and installs the optional Pi extension,subswap add-api piadds a key, andswap,rm,run,shell,envandauthacceptpi/<id>.swap --no-defaultchanges only the live slot without changing Pi's default selection, and removing an account deletes only that slot. - Add the optional
integrations/piextension (subswap login piormake install-pi). It maps each Subswap channel to one Pi provider (subswap-codex,subswap-volcengine,subswap-opencode-go,subswap-opencode-zen, plus custom Codex and Volcengine channels) and fails over between that channel's accounts inside a single request, preserving the model, thinking level, conversation and task. It reads request-scoped credentials throughsubswap auth, never receives refresh tokens, and adds no prompts, commands or notifications. - Import Volcengine Ark Coding Plan keys into the Pi drawer with
subswap login volcengine -- <key>(aliasark) orsubswap add-api pi --preset volcengine. Existing top-level Volcengine accounts migrate intopi/volcengineon first run; the retired AK/SK quota lookup is dropped because Pi accounts are flat-rate. - Add an Antigravity (
agy) provider for the macOS keychain login. The default view,statusandstatus --jsonshow the independent Gemini and Claude/GPT pools on separate rows, with same-name windows disambiguated in JSON (gemini_5h,claude_5h, ...); automatic switching considers every pool, and external native logins are imported before quota collection. - Extend
add-apito choose Claude Code, Codex or Pi first. Codex custom channels use the official[model_providers.subswap]entry with a command-backed auth helper, so the key stays in Subswap's credential store and out ofconfig.toml; switching back to OAuth or deleting the active channel restores the managedmodel/model_provider. Deleting an active custom channel is no longer refused, and--json add-apireturns one structured receipt. - Add
subswap auth <id|N>, a trusted local consumer projection that writes exactly one JSON object with the request-scoped access token or API key (kind=credential) or its environment mapping (kind=environment). It never returns refresh tokens, stays read-only apart from an optional--renewthat renews only that account near expiry, and supports--rawfor Codex's auth helper. - Add
status --refreshfor explicit client-side refreshes; the defaultstatusremains a read-only snapshot.subswap --json swap <target>returns a structured receipt (provider,id, optionalnotice), andsubswap <id|N>switches directly, matchingsubswap swap <id|N>. - Fix quota rendering for accounts without quota: an empty successful reading is a valid cache hit, so such accounts show
custominstead of a repeated quota-fetch error. Add integration coverage for credential projection and structured swaps, refresh the app icon and READMEs, and document the JSON IPC, MSRV 1.80 and request-failover contracts.
Verification and limits
macOS ARM64 (Rust 1.99.1) passed cargo fmt --all --check, strict Clippy (cargo clippy --workspace --all-targets -- -D warnings), all 573 Rust tests (cargo test --workspace --all-targets), the workspace debug build and the locked CLI/daemon release build without compiler or lint warnings. Cross-target checks with RUSTFLAGS=-D warnings also passed for x86_64-unknown-linux-gnu and x86_64-pc-windows-gnu; these are check-only runs, because this Mac cannot link MSVC targets. CI run 43686216600 passed formatting, strict Clippy, workspace check, the macOS/Linux/Windows test matrix and the Pi extension job. The v1.17.0 tag was not published: its release run 43686922892 passed validation plus the Linux and Windows builds, but GitHub had retired the macos-14 runner image, so both macOS builds were cancelled and publication was skipped. That tag and its draft remain as failed history; this release rebuilds the same source on macos-15. The release workflow 43687759219 passed all fourteen jobs: three-platform validation, all five release builds, the v1.17.1 Windows draft installation, publication and the automatic Homebrew update. Both Linux CLI/daemon pairs met the max GLIBC_2.28 guard. All five archives and five checksum files downloaded anonymously from v1.17.1 with HTTP 200 and their recorded sizes (macOS ARM64 9,810,283; macOS Intel 10,447,408; Linux ARM64 9,840,640; Linux x64 10,528,340; Windows x64 5,669,611 bytes); every SHA-256 matched its checksum file. The downloaded ARM64 macOS package reports subswap 1.17.1 and contains the CLI, daemon, README and LICENSE; the Windows zip contains the CLI only. The Homebrew tap formula points at v1.17.1 with all four platform checksums matching. The v1.17.0 tag and draft remain unpublished failed history.
Existing accounts and configuration need no manual migration. On first run this version moves top-level Volcengine accounts into pi/volcengine and maps the removed Pi aliases (coding-plan, coding-plan-2, codex-1, codex-2) to the corresponding pools. Antigravity is macOS-only and has no run/shell/env isolation or auth projection; Pi slots without an environment mapping cannot use run/shell/env. The Pi extension requires a current Pi release (verified with 1.5.0/1.5.2) and a /reload or restart after upgrading, and account changes require a Pi reload or a new session. Windows packages contain the CLI only; macOS and Linux packages also include the daemon.
Upgrade
brew upgrade subswapRestart an independently managed daemon after upgrading. Reload Pi (/reload or restart) to pick up the extension update.
简体中文
更新内容
- 新增
piProvider,管理 Pi 的多槽位认证文件。subswap login pi导入 live 槽位并安装可选 Pi 扩展,subswap add-api pi添加 Key,swap、rm、run、shell、env、auth均接受pi/<id>。swap --no-default只改写 live 槽位、不改 Pi 的默认选择;删除账号只清对应槽位。 - 新增可选
integrations/pi扩展(subswap login pi或make install-pi安装)。它把每个 Subswap 渠道映射为一个 Pi Provider(subswap-codex、subswap-volcengine、subswap-opencode-go、subswap-opencode-zen,以及 Codex / Volcengine 自定义渠道),在同一次请求内于该渠道的账号间补位,保持模型、思考等级、会话与任务不变。它经subswap auth按请求读取凭证,永远拿不到 refresh token,也不注入提示词、命令或通知。 - 火山方舟 Coding Plan Key 改为用
subswap login volcengine -- <key>(别名ark)或subswap add-api pi --preset volcengine导入 Pi 抽屉。既有顶层火山账号在首次运行后迁移到pi/volcengine;顶层渠道退役后不再提供 AK/SK 查额度,Pi 账号按固定订阅展示。 - 新增 Antigravity(
agy)Provider,导入 macOS 钥匙串登录。默认入口、status与status --json把相互独立的 Gemini 与 Claude/GPT 额度池分行显示,同名窗口在 JSON 中消歧(gemini_5h、claude_5h等);自动换号按各池判断,采额度前会先把原生客户端外部新登录的账号入池。 add-api改为先选择 Claude Code、Codex 或 Pi。Codex 自定义渠道写入官方[model_providers.subswap],用 command 形式的 auth helper 取 Key,Key 只存 Subswap 凭证仓库、不写config.toml;切回 OAuth 或删除当前渠道时恢复受管model/model_provider。删除 active 自定义渠道不再被拒绝,--json add-api只输出一份结构化回执。- 新增
subswap auth <id|N>:面向受信本机消费者的凭证投影,恰好输出一个 JSON 对象,包含当前请求所需的 access token / API Key(kind=credential)或其环境变量映射(kind=environment)。绝不返回 refresh token;除--renew在临近过期时只续期该账号外全程只读,并支持给 Codex auth helper 用的--raw。 - 新增
status --refresh供客户端显式刷新;默认status仍是只读快照。subswap --json swap <目标>返回结构化回执(provider、id、可选notice),subswap <id|N>可直接切换,语义与subswap swap <id|N>相同。 - 修复无额度账号的额度显示:空成功结果视为有效缓存命中,这类账号显示
custom,不再反复显示额度查询错误。新增凭证投影与结构化切换的集成测试,更新应用图标与各语言 README,并记录 JSON IPC、MSRV 1.80 与请求补位契约。
验证与限制
macOS ARM64(Rust 1.99.1)通过 cargo fmt --all --check、严格 Clippy(cargo clippy --workspace --all-targets -- -D warnings)、全部 573 项 Rust 测试(cargo test --workspace --all-targets)、workspace debug 构建及 locked CLI/daemon release 构建,没有编译或 lint 警告。带 RUSTFLAGS=-D warnings 的跨目标检查也通过 x86_64-unknown-linux-gnu 与 x86_64-pc-windows-gnu;这只是检查构建,本机无法链接 MSVC 目标。CI 运行 43686216600 已通过格式检查、严格 Clippy、workspace 检查、macOS/Linux/Windows 测试矩阵及 Pi 扩展作业。v1.17.0 未发布:其发布运行 43686922892 通过了校验及 Linux、Windows 构建,但 GitHub 已下线 macos-14 运行器镜像,两个 macOS 构建被取消,发布被跳过。该 tag 与草稿保留为失败历史;本版本用同一份源码在 macos-15 上重新构建。发布流程 43687759219 的全部十四个作业通过:三平台校验、五个发布构建、v1.17.1 的 Windows 草稿安装、发布及 Homebrew 自动更新。两组 Linux CLI/daemon 均满足 max GLIBC_2.28 地板。五个压缩包与五个校验和文件均已从 v1.17.1 匿名下载,HTTP 200 且大小与记录一致(macOS ARM64 9,810,283;macOS Intel 10,447,408;Linux ARM64 9,840,640;Linux x64 10,528,340;Windows x64 5,669,611 字节);每个 SHA-256 都与校验和文件一致。下载的 ARM64 macOS 包报告 subswap 1.17.1,包含 CLI、daemon、README 与 LICENSE;Windows zip 只含 CLI。Homebrew tap formula 已指向 v1.17.1,四个平台校验和全部一致。v1.17.0 的 tag 与草稿保留为未发布的失败历史。
现有账号与配置无需手工迁移。本版本首次运行会把顶层火山账号搬进 pi/volcengine,并把已移除的 Pi 别名(coding-plan、coding-plan-2、codex-1、codex-2)映射到对应账号池。Antigravity 仅支持 macOS,且不支持 run/shell/env 隔离运行与 auth 投影;没有环境变量映射的 Pi 槽位不能用于 run/shell/env。Pi 扩展要求较新的 Pi 版本(已在 1.5.0/1.5.2 验证),升级后需 /reload 或重启,增删账号后也需重载或在 Pi 中新开会话。Windows 安装包只包含 CLI;macOS 和 Linux 安装包同时包含 daemon。
升级
brew upgrade subswap升级后重启自行管理的 daemon。Pi 需 /reload 或重启以加载扩展更新。
v1.16.6
v1.16.6
English
Changes
- Order quota windows by their real duration in the default quota table and the human-readable
subswap statusview. A provider's new 20-day window now appears between 7 days and a month instead of after the monthly window; non-time quota pools remain after timed windows. - Preserve non-standard window lengths as duration tokens such as
20d,3h,90mand45sin cached quotas and JSON snapshots. Codex and Kimi retain upstream durations, and quota-cache expiry uses the actual window length. Existing standard tokens (five_hour,seven_day,month) remain unchanged.
Verification and limits
macOS ARM64 workspace check, formatting, strict Clippy (-D warnings), all 474 Rust tests, debug build and locked release build pass without compiler or lint warnings. The installer regression suite also passes with PowerShell 7.6.6. The release binary was run against synthetic cached quotas: 45s → 90m → 3h → five_hour → seven_day → 20d → month → non-time pools; JSON retains each duration token, --no-metrics preserves account data, and reads leave fixture files unchanged. The release workflow passed three-platform CI, all five release builds and the exact Windows draft installer check. All five public archives and checksums were downloaded anonymously and verified. The published Mac ARM64 CLI/daemon were installed with matching hashes; the real default entry, daemon and duration-token smoke checks passed. Homebrew updated automatically. Two third-party Zig-setup action runtime deprecation notices are assessed in the operations guide; there are no compiler/lint warnings.
Snapshot consumers should accept duration tokens in the window field and parse their length for sorting and labels. Windows packages contain the CLI only; macOS and Linux packages also include the daemon.
Upgrade
brew upgrade subswapRestart an independently managed daemon after upgrading. Existing accounts and configuration require no migration.
简体中文
更新内容
- 默认额度表和
subswap status人读视图按窗口的实际时长排序。厂商新增的 20 天窗口现在排在 7 天与月度窗口之间,不再排到月度窗口之后;非时间额度池仍放在时间窗口之后。 - 缓存额度和 JSON 快照使用
20d、3h、90m、45s等时长 token 保留非标准窗口长度。Codex 和 Kimi 保留上游提供的时长,额度缓存过期计算使用真实窗口长度。现有标准 token(five_hour、seven_day、month)保持不变。
验证与限制
macOS ARM64 workspace 检查、格式检查、严格 Clippy(-D warnings)、全部 474 项 Rust 测试、debug 构建及 locked release 构建通过,没有编译或 lint 警告。安装器回归套件也已在 PowerShell 7.6.6 下通过。使用合成缓存额度运行 release 二进制,顺序为 45s → 90m → 3h → five_hour → seven_day → 20d → month → 非时间池;JSON 保留各时长 token,--no-metrics 保留账号数据,读取前后夹具文件不变。发布流程 已通过三平台 CI、全部五个发布构建及本次版本的 Windows 草稿安装验证。五个公开压缩包及校验和均已匿名下载并核对。公开的 Mac ARM64 CLI/daemon 已安装,哈希一致;真实默认入口、daemon 和时长 token 冒烟验证通过。Homebrew 已自动更新。两条第三方 Zig 安装 Action 的运行时弃用提示及其评估见运行指南;没有编译或 lint 警告。
快照消费者应接受 window 字段中的时长 token,并解析其长度用于排序和标签。Windows 安装包只包含 CLI;macOS 和 Linux 安装包同时包含 daemon。
升级
brew upgrade subswap升级后重启自行管理的 daemon。现有账号和配置无需迁移。
v1.16.5
English
Changes
- Add
subswap status --json --no-metricsfor GUI and widget consumers that poll frequently. It omits only the diagnosticrequest_metricsblock, leaving every account, quota, freshness and daemon field unchanged, and keeps the default full output for diagnostics. The full payload had grown past 160 KiB, so pollers that drained it slowly or incorrectly paid a large per-refresh cost. - Document the pipe-capacity contract for snapshot consumers: a child that writes more than 64 KiB into a pipe while the parent waits for exit deadlocks. The companion Subswap Apple client now redirects CLI output to temporary files with a hard timeout; this release provides the smaller polled payload it prefers, with a fallback for older binaries.
Verification and limits
macOS ARM64 workspace check, strict Clippy (-D warnings), cargo fmt --all --check, the read-only status regression suite and the locked release build pass. A real status --json --no-metrics run was compared against the full output and against the installed client, which now refreshes on its own timer.
Upgrade
brew upgrade subswapRestart an independently managed daemon after upgrading.
简体中文
更新内容
- 新增
subswap status --json --no-metrics,面向高频轮询的 GUI 与小组件消费者。它只省略诊断用的request_metrics,账号、额度、新鲜度与 daemon 字段完全不变;默认完整输出继续服务诊断场景。完整载荷已增长到 160 KiB 以上,读取方式不当或较慢的轮询方每次刷新都要付出很高代价。 - 明确快照消费者的管道容量约束:子进程写管道超过 64 KiB、父进程却在等退出时会双向死锁。配套的 Subswap Apple 客户端已改为把 CLI 输出重定向到临时文件并加硬超时;本版本提供它优先请求的精简载荷,并保留旧二进制回退路径。
验证与限制
macOS ARM64 workspace 检查、严格 Clippy(-D warnings)、cargo fmt --all --check、只读状态回归测试与加锁 release 构建均通过。已用真实 status --json --no-metrics 与完整输出对比,并确认已安装客户端按自身定时器恢复刷新。
升级
brew upgrade subswap独立管理的 daemon 升级后需重启。
v1.16.4
v1.16.3
v1.15.1
Fixes
- Active Claude account quota no longer shows
usage unavailable. 1.15.0 read the active account's quota by starting Claude Code's experimental usage request. That request calls the same usage service, can rotate the shared sign-in, and returns no reason when it fails. subswap now reuses Claude Code's own fresh snapshot when available, otherwise sends one read-only usage request with the current sign-in, sharing the existing per-account interval andRetry-After/429 backoff. It never refreshes the active sign-in. If the active sign-in has expired, subswap sends no request and showscredentials expired; open native client; Claude Code renews it on next use. - Linux prebuilt binaries run on glibc 2.28+ (Ubuntu 20.04+, Debian 10+, RHEL 8+). They are built with
cargo zigbuild, and the release checks the glibc symbol floor. subswap rmnever refuses an active or manual-only account. Removing the active custom Claude API profile first restores the managed Claude Code settings. A failed native sign-out is a warning, and the local record is still removed.
Upgrade
No action needed. An account that currently shows usage unavailable updates once its existing retry time passes (at most 30 minutes).
修复
- 当前 Claude 账号的余量不再显示
usage unavailable。 1.15.0 读取当前账号余量时会拉起 Claude Code 的实验性用量请求。这个请求访问的还是同一个用量服务,可能轮换共享的登录凭据,失败时也不给原因。现在 subswap 先复用 Claude Code 自己的最新快照;没有快照时,用当前登录发一次只读用量请求,沿用原有的按账号查询间隔和Retry-After/429 退避,绝不刷新当前账号的登录。当前登录已过期时不发请求,直接显示credentials expired; open native client,下次使用 Claude Code 时它会自行续期。 - Linux 预编译包支持 glibc 2.28 及以上(Ubuntu 20.04+、Debian 10+、RHEL 8+)。改用
cargo zigbuild构建,发布流程会校验 glibc 符号版本下限。 subswap rm不再拒绝删除当前账号或仅手动账号。 删除正在使用的 Claude 自定义 API 配置时,先恢复 Claude Code 的受管设置;原生客户端登出失败只给警告,仍会删除本地记录。
升级
无需额外操作。当前显示 usage unavailable 的账号,会在原有重试时间到达后(最多 30 分钟)自动恢复显示。
v1.15.0
English
- Coordinate Claude subscription usage through the official client for active accounts, with account validation and shared retry deadlines across CLI and daemon. Preserve distinct states for rate limiting, expired credentials and unavailable native readings.
- Review and align all four README languages: quota checking and account switching, Codex reset counts and expiration, first use, installation, platform support and provider limits.
- Patch Rustls to 0.23.45 and rustls-webpki to 0.103.15, addressing GHSA-2mjx-qc3c-rqvc.
- Validation: 360 local tests passed; workspace format, check, strict Clippy, debug and locked release builds passed. Installed macOS binaries match the committed build; the default status command displays Codex quota and reset details.
简体中文
- 当前 Claude 订阅账号通过官方客户端查询额度,并在命令行与后台进程间共享账号校验、查询间隔与重试期限;区分限流、凭证过期和官方暂未提供数据。
- 全面审查并统一四种语言 README:查额度和切换账号、Codex reset 次数与到期时间、首次使用、安装、平台支持和各客户端的功能边界。
- 将 Rustls 更新至 0.23.45、rustls-webpki 更新至 0.103.15,修复 GHSA-2mjx-qc3c-rqvc。
- 验证:本机 360 项测试全部通过,格式、检查、严格静态检查、普通构建和锁定依赖的发布构建均通过;macOS 已安装文件与提交后的构建产物一致,默认列表可显示 Codex 额度和 reset 详情。
v1.14.6
Fixed
- Query active Codex accounts through the native Unix WebSocket control channel, removing the repeated eight-second protocol timeout and proxy startup.
- Check the running Codex daemon account before querying quotas when identity is available; always validate the returned quota account. Stale daemons fall back to a read-only query for the selected account.
- Reuse inline reset-credit details. Active quotas no longer wait for a separate detail request; parked detail requests have a one-second default budget. Preserve the available reset count when detail rows are missing or capped.
Validation
- 352 workspace tests passed on macOS, with formatting, all-target compiler checks, clippy, debug builds and locked release builds passing without compiler/lint warnings.
- Fresh live samples completed the active Codex row in 1.52 seconds from the debug build and 3.13 seconds from the installed release. The installed command completed in 3.14 seconds. Actual network latency varies.
- Linux/macOS/Windows CI, all five platform packages and the Windows installer check passed. Published archives were downloaded and their SHA-256 values verified.
修复
- 当前 Codex 账号通过原生 Unix WebSocket 控制通道查询,消除每次固定的八秒协议超时及代理启动等待。
- 查询前检查可用的后台账号身份,并始终核对额度归属;后台仍是旧账号时,直接使用所选账号的只读查询。
- 复用同次响应中的重置道具详情。当前账号不再等待额外详情请求;停用账号的详情默认最多等待一秒。详情缺失或被截断时保留正确的可用数量。
验证
- macOS 全仓 352 项测试通过,格式、全部目标编译检查、clippy、调试构建及锁定依赖的正式构建均通过,无编译或静态检查警告。
- 实机新鲜查询中,当前 Codex 账号在调试版约 1.52 秒、已安装正式版约 3.13 秒显示额度;正式版整次命令约 3.14 秒。实际耗时会随网络变化。
- Linux/macOS/Windows CI、五个平台打包及 Windows 安装验收全部通过;发布包已下载并核对 SHA-256。