Repository navigation
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 或重启以加载扩展更新。