Skip to content

Commit de50758

Browse files
authored
fix: retire Antigravity subscription imports (#4026)
1 parent 22bf34c commit de50758

25 files changed

Lines changed: 123 additions & 123 deletions

File tree

‎docs/architecture/subscription-account-routing-design.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
|---|---|
1313
| 多服务商 | 已接入的 OpenAI Chat/Responses、Anthropic、Gemini 及订阅渠道可被用户明确选为主备;不同模型名称也可显式选入,不推测模型等价 |
1414
| 多渠道、多 key | 引用现有模型配置 ID,每个连接使用自己的端点、协议、模型及凭据;同一服务商的多把 API key 可配置为多个独立连接 |
15-
| 多账号 | Codex、Antigravity、OpenCode Zen、Grok、Hermes 和 ZCode 均使用独立账号槽位、固定账号和顺序账号池;登录、可信路由与额度查询分别按 adapter 能力处理 |
15+
| 多账号 | Codex、OpenCode Zen、Grok、Hermes 和 ZCode 使用独立账号槽位、固定账号和顺序账号池;登录、可信路由与额度查询分别按 adapter 能力处理;历史 Antigravity 槽位保留读取但已失效 |
1616

1717
首版仅支持明确的顺序主备和手动固定选择。复用现有 Rust 模型链路、认证存储、客户端工厂与 Agent 回合,不引入网关、sidecar、daemon 或另一套工具执行循环。
1818

@@ -23,7 +23,7 @@
2323
| 订阅渠道 | 授权与身份 | 多账号请求路由 | 额度查询 |
2424
|---|---|---|---|
2525
| Codex | 浏览器 / 设备码;ChatGPT 席位身份 | 每槽位凭据与刷新租约,沿用账号绑定的 Responses 路由 | 现有服务商快照 |
26-
| Antigravity | 执行主机浏览器回调;Google 用户 ID / ID token subject | 每槽位 Code Assist 凭据,沿用可信项目发现与请求链路 | 暂不支持,显示未知,由请求验证 |
26+
| Antigravity(已下线) | 历史执行主机浏览器回调凭据仅保留读取 | 不支持,所有历史订阅配置拒绝请求 | 不支持,显示下线状态 |
2727
| OpenCode Zen | 设备码;Console 用户身份与各账号目录 | 按所选账号解析协议、模型、组织请求头及可信 Console 端点;不向公开 Zen/Go key 路由发送 OAuth token | 暂不支持,显示未知,由请求验证 |
2828
| Grok | 设备码;服务商 JWT subject | 每槽位刷新,使用 Grok Build 的可信 Responses 与模型目录端点 | 暂不支持,显示未知,由请求验证 |
2929
| Hermes | 设备码;推理 scope 与 JWT subject | 每槽位轮换刷新,沿用可信 Nous 推理端点及 Chat 协议 | 暂不支持,显示未知,由请求验证 |

‎docs/interactive-capabilities/capabilities.json‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"title": "OpenBitFun Playbook",
55
"origin": "https://playbook.openbitfun.com",
66
"source": "src/shared/interactive-capabilities/catalog.json",
7-
"digest": "3d50d21ee69fe9a54f064e9364529f0effb58315ba85093d302cb7f6d395cfd9",
7+
"digest": "3f6c6936d3a543526f6a768b31c8058041ab3704f44be401086eb9174440d5cc",
88
"ownerDigest": "6f0746578f3c56479f7c289bb05395dfe6917042f4d419de8c9a2f719d31f815",
99
"searchAcceptance": [
1010
{
@@ -32993,8 +32993,8 @@
3299332993
},
3299432994
{
3299532995
"id": "subscription-auth",
32996-
"titleZh": "登录 Codex、ZCode、OpenCode、Grok、Antigravity、Hermes 等订阅账号与多号订阅池",
32997-
"titleEn": "Sign in to Codex, ZCode, OpenCode, Grok, Antigravity, Hermes, and multi-account subscription pools",
32996+
"titleZh": "登录 Codex、ZCode、OpenCode、Grok、Hermes 等订阅账号与多号订阅池",
32997+
"titleEn": "Sign in to Codex, ZCode, OpenCode, Grok, Hermes, and multi-account subscription pools",
3299832998
"descriptionZh": "支持浏览器或设备码授权登录(含智谱国内版与 Z.ai 国际版 ZCode),可在卡片上直观查看 OpenCode 与 Grok 实时额度面板,并将多个账号编成订阅池在限流时自动故障轮换。",
3299932999
"descriptionEn": "Sign in via browser or device code (including ZCode CN and Z.ai Intl), view live OpenCode and Grok quota panels, and group multiple accounts into a subscription pool that rotates automatically on rate limits.",
3300033000
"control": {
@@ -33270,8 +33270,8 @@
3327033270
"Add built-in or custom providers, probe Magpie gateways, and set up standalone image services",
3327133271
"配置 API Key、Base URL、请求格式(含实时派生 URL 预览)与备用通道",
3327233272
"Configure API keys, base URLs, API formats with live derived URL preview, and fallback channels",
33273-
"登录 Codex、ZCode、OpenCode、Grok、Antigravity、Hermes 等订阅账号与多号订阅池",
33274-
"Sign in to Codex, ZCode, OpenCode, Grok, Antigravity, Hermes, and multi-account subscription pools",
33273+
"登录 Codex、ZCode、OpenCode、Grok、Hermes 等订阅账号与多号订阅池",
33274+
"Sign in to Codex, ZCode, OpenCode, Grok, Hermes, and multi-account subscription pools",
3327533275
"选择主模型、快速模型、经济模型以及图像理解、图像生成和语音识别默认模型",
3327633276
"Choose Primary, Fast, Economy, image-understanding, image-generation, and speech-recognition defaults",
3327733277
"按模型能力选择推理预设或自定义思考预算",

‎docs/interactive-capabilities/capabilities/setting.ai.models.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ Manage AI providers and subscription accounts in one place, assign Primary, Fast
3434
- Configure API keys, base URLs, API formats with live derived URL preview, and fallback channels
3535
- 说明:切换 chat/completions、responses、Anthropic messages、Gemini generateContent 或 Gemini Code Assist 时可实时查看最终请求路径,一键拉取远端模型清单,并为单模型绑定备用通道路由。
3636
- Why & how: See the exact derived request URL update live as you switch between chat/completions, responses, Anthropic messages, Gemini generateContent, or Gemini Code Assist, fetch remote model lists, and bind fallback channel routing.
37-
- **智能体可定位入口,需交互完成 / Agent opens; interaction required** · 登录 Codex、ZCode、OpenCode、Grok、Antigravity、Hermes 等订阅账号与多号订阅池
38-
- Sign in to Codex, ZCode, OpenCode, Grok, Antigravity, Hermes, and multi-account subscription pools
37+
- **智能体可定位入口,需交互完成 / Agent opens; interaction required** · 登录 Codex、ZCode、OpenCode、Grok、Hermes 等订阅账号与多号订阅池
38+
- Sign in to Codex, ZCode, OpenCode, Grok, Hermes, and multi-account subscription pools
3939
- 说明:支持浏览器或设备码授权登录(含智谱国内版与 Z.ai 国际版 ZCode),可在卡片上直观查看 OpenCode 与 Grok 实时额度面板,并将多个账号编成订阅池在限流时自动故障轮换。
4040
- Why & how: Sign in via browser or device code (including ZCode CN and Z.ai Intl), view live OpenCode and Grok quota panels, and group multiple accounts into a subscription pool that rotates automatically on rate limits.
4141
- **智能体可定位入口,需交互完成 / Agent opens; interaction required** · 选择主模型、快速模型、经济模型以及图像理解、图像生成和语音识别默认模型

‎docs/interactive-capabilities/technical/product-control-open-audit.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"schemaVersion": 1,
33
"generatedFrom": "src/shared/interactive-capabilities/catalog.json",
4-
"catalogDigest": "3d50d21ee69fe9a54f064e9364529f0effb58315ba85093d302cb7f6d395cfd9",
4+
"catalogDigest": "3f6c6936d3a543526f6a768b31c8058041ab3704f44be401086eb9174440d5cc",
55
"count": 231,
66
"reasonCounts": {
77
"externalAuth": 4,
@@ -2845,8 +2845,8 @@
28452845
{
28462846
"capabilityId": "setting.ai.models",
28472847
"itemId": "subscription-auth",
2848-
"titleZh": "登录 Codex、ZCode、OpenCode、Grok、Antigravity、Hermes 等订阅账号与多号订阅池",
2849-
"titleEn": "Sign in to Codex, ZCode, OpenCode, Grok, Antigravity, Hermes, and multi-account subscription pools",
2848+
"titleZh": "登录 Codex、ZCode、OpenCode、Grok、Hermes 等订阅账号与多号订阅池",
2849+
"titleEn": "Sign in to Codex, ZCode, OpenCode, Grok, Hermes, and multi-account subscription pools",
28502850
"reasonCode": "externalAuth",
28512851
"reasonZh": "订阅账户登录需要在供应商网页或设备授权流程中确认;智能体可以打开入口,但不能代替用户完成外部认证。",
28522852
"reasonEn": "Subscription sign-in requires confirmation in a provider web or device-authorization flow; the Agent can open the entry but cannot complete external authentication for the user.",

‎docs/interactive-capabilities/technical/tauri-command-map.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"schemaVersion": 2,
33
"generatedFrom": "src/shared/interactive-capabilities/catalog.json",
4-
"catalogDigest": "3d50d21ee69fe9a54f064e9364529f0effb58315ba85093d302cb7f6d395cfd9",
4+
"catalogDigest": "3f6c6936d3a543526f6a768b31c8058041ab3704f44be401086eb9174440d5cc",
55
"commandCount": 701,
66
"coverage": {
77
"commandCount": 701,

‎src/crates/adapters/ai-adapters/AGENTS.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ provider-neutral contracts owned by `openbitfun-agent-stream`.
4848
separate from the configured request model. Never infer an observation from
4949
URLs, model selection or error text. Inline-think buffering must not hide it,
5050
and metadata alone must not satisfy TTFT or become effective output.
51-
- Subscription auth (Codex/Antigravity codex CLI user-agent probing) may reuse
51+
- Subscription auth (Codex and legacy Antigravity codex CLI user-agent probing) may reuse
5252
lower-layer service command helpers for PATH and process-platform behavior; do
5353
not introduce host framework calls.
5454
- Keep `subscription-auth` optional so standalone protocol adapters do not pull
@@ -77,7 +77,7 @@ Compared on 2026-09-08 against [OpenCode v1.18.29](https://github.com/anomalyco/
7777
- Subscription credentials own authentication and account headers regardless
7878
of saved replace mode or header casing. Use OpenBitFun attribution for Codex;
7979
retain provider-required compatibility headers for xAI and
80-
Antigravity. Public API-key configurations retain their authentication policy.
80+
legacy Antigravity. Public API-key configurations retain their authentication policy.
8181
- `prepare_account_request_route` exposes credential-free provider protocol/model facts
8282
without credential IO or subscription identity. It shares the route definition
8383
with real credential resolution for static routes; OpenCode's final route
@@ -126,7 +126,7 @@ Compared on 2026-09-08 against [OpenCode v1.18.29](https://github.com/anomalyco/
126126

127127
- Explicit account slots use `<provider>-account-<canonical UUID v4>` in the
128128
existing v2 credential store; each provider key remains its legacy default.
129-
Codex, Antigravity, OpenCode Zen, Grok and Hermes share slot validation,
129+
Codex, legacy Antigravity, OpenCode Zen, Grok and Hermes share slot validation,
130130
conditional identity commits and resolved-client binding through `accounts`;
131131
each provider owns authorization, refresh and trusted routing. Named-slot
132132
reauthentication must preserve its upstream account identity. Resolve,
@@ -215,9 +215,9 @@ business-session token for inference or silently switch Coding Plan requests ont
215215
Start/gift plans. Region and project endpoints are adapter-owned. Catalog
216216
failures remain errors.
217217

218-
WorkBuddy (`workbuddy`, `workbuddy_ai`) is retired. The vendor stopped allowing
219-
subscription-token access, so its sign-in, refresh, catalog, request-dialect and
220-
billing protocols were deleted. `SubscriptionProvider::{Workbuddy, WorkbuddyAi}`
218+
Antigravity and WorkBuddy (`workbuddy`, `workbuddy_ai`) are retired. Their
219+
subscription import and access paths were removed. `SubscriptionProvider::{Antigravity,
220+
Workbuddy, WorkbuddyAi}`
221221
stay deserializable, keep their store keys, and are absent from
222222
`SubscriptionProvider::ALL` so nothing offers them; every login, resolve,
223223
catalog, quota and route path returns `SubscriptionProvider::retired_error()`.
@@ -301,7 +301,7 @@ cargo test --locked -p openbitfun-ai-adapters --features local-tokenizer --lib l
301301
```
302302

303303
Subscription model discovery must use the authenticated account catalog.
304-
Antigravity uses `v1internal:fetchAvailableModels`; preserve returned wire IDs
304+
Legacy Antigravity uses `v1internal:fetchAvailableModels`; preserve returned wire IDs
305305
and restrict alias translation to known legacy names. Codex's `supported_in_api`
306306
flag describes the public API, not subscription availability. OpenCode public catalog
307307
models must stay grouped by plan and wire format. Never mask a failed account

‎src/crates/adapters/ai-adapters/src/subscription_auth/accounts.rs‎

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! Existing v2 readers/writers preserve those entries without a schema change.
44
55
use super::{
6-
antigravity, build_account, codex, grok, hermes, opencode, store, zcode, LoginStartResult,
6+
build_account, codex, grok, hermes, opencode, store, zcode, LoginStartResult,
77
SubscriptionAccount, SubscriptionHttpOptions, SubscriptionLoginMethod,
88
SubscriptionLogoutResult, SubscriptionProvider,
99
};
@@ -49,7 +49,7 @@ fn build_instance(
4949
account_id: id.into(),
5050
is_default: id == provider.key(),
5151
supports_multiple_accounts: true,
52-
enabled: metadata.is_none_or(|metadata| metadata.enabled),
52+
enabled: !provider.is_retired() && metadata.is_none_or(|metadata| metadata.enabled),
5353
upstream_account_id: metadata.and_then(|metadata| metadata.upstream_account_id.clone()),
5454
account,
5555
}
@@ -166,13 +166,12 @@ pub async fn resolve_account_with_options(
166166
validate_account_id(provider, id)?;
167167
match provider {
168168
SubscriptionProvider::Codex => codex::resolve_account(id, options).await,
169-
SubscriptionProvider::Workbuddy | SubscriptionProvider::WorkbuddyAi => {
170-
Err(provider.retired_error())
171-
}
169+
SubscriptionProvider::Antigravity
170+
| SubscriptionProvider::Workbuddy
171+
| SubscriptionProvider::WorkbuddyAi => Err(provider.retired_error()),
172172
SubscriptionProvider::Zcode | SubscriptionProvider::ZcodeCn => {
173173
zcode::resolve(provider, id, options).await
174174
}
175-
SubscriptionProvider::Antigravity => antigravity::resolve_account(id, options).await,
176175
SubscriptionProvider::Grok => {
177176
grok::resolve_for_account(id, provider.suggested().2, options).await
178177
}
@@ -207,18 +206,15 @@ pub async fn recover_rejected_account_with_options(
207206
));
208207
}
209208
match provider {
210-
SubscriptionProvider::Workbuddy | SubscriptionProvider::WorkbuddyAi => {
211-
Err(provider.retired_error())
212-
}
209+
SubscriptionProvider::Antigravity
210+
| SubscriptionProvider::Workbuddy
211+
| SubscriptionProvider::WorkbuddyAi => Err(provider.retired_error()),
213212
SubscriptionProvider::Zcode | SubscriptionProvider::ZcodeCn => {
214213
zcode::recover(provider, id, rejected_access, options).await
215214
}
216215
SubscriptionProvider::Codex => {
217216
codex::recover_rejected_account(id, rejected_access, upstream_account_id, options).await
218217
}
219-
SubscriptionProvider::Antigravity => {
220-
antigravity::recover_rejected_account(id, rejected_access, options).await
221-
}
222218
SubscriptionProvider::Grok => {
223219
grok::recover_rejected_account(id, rejected_access, options).await
224220
}

0 commit comments

Comments
 (0)