Skip to content

feat(ai-providers): add Google Antigravity and Cursor OAuth providers #234

Open

Description

@JS-banana

问题

OpenPI 目前没有内置订阅制模型的 OAuth Provider。想用 Google Antigravity 或 Cursor 账户里的模型,只能再装 omp、起本地代理,或 fork Pi。这和 OpenPI「沿用 Pi 原生 Provider / /login / Session 生命周期」的立场不一致。

建议

在 extensions/ai-providers/ 增加两个 opt-in provider,未登录、未选中前完全惰性,不进 /openpi-setup,凭据仍由 Pi 写入 auth.json:

  • google-antigravity:Google Cloud Code Assist。支持普通 Pi 工具调用、模型发现、thinking 签名回放、端点 failover。
  • cursor:实验性 chat-only。OAuth + 账户模型发现 + 文本/思考/图片/多轮。不广告、不执行 Cursor 原生 coding tools;服务端 exec / tool interaction / interaction query 显式失败,绝不映射成 Pi toolCall。

使用方式:

/login google-antigravity
/login cursor
/model

设计边界

  • 走 Pi 的 registerProvider + OAuth + streamSimple,不 fork Pi / agent-loop。
  • Cursor 完整 coding 工具链依赖宿主侧双向执行桥;纯 extension 不能安全复刻,因此本轮明确不做。
  • 安装保持零副作用:不绑定默认模型,不在启动时打 provider。

验收

  • /login google-antigravity 后可选账户模型,普通 Pi 工具回合可跑
  • /login cursor 后可对话;服务端工具请求 fail closed,不绕过 Pi 权限
  • 未登录时 provider 惰性,不改变普通回合工具面
  • bun run check 与 provider 行为测试通过

Activity

  1. changed the title [-]feat(ai-providers): add Google Antigravity and experimental chat-only Cursor OAuth providers[/-] [+]feat(ai-providers): add Google Antigravity and Cursor OAuth providers[/+] on Aug 29, 2026
  2. JS-banana commented on Aug 29, 2026

    @JS-banana
    ContributorAuthor

    认领

  3. tt-a1i commented on Sep 8, 2026

    @tt-a1i
    Collaborator

    Cursor native-request recovery is implemented in PR #484. A native preview no longer terminates a Pi tool-enabled turn; actual native execs receive bounded in-band rejection, with all real tools still owned by Pi. An actual Cursor Grok child recovered from one native rejection and completed Pi read/bash calls with an exact nonce check. Canonical investigation and normalized receipts: https://github.com/openpi-dev/openpi/blob/f680d83/docs/research/CURSOR_NATIVE_RECOVERY_2026-09-08.md . This is isolated acceptance, not a release or a proxy-timeout fix.

  4. tt-a1i commented on Sep 9, 2026

    @tt-a1i
    Collaborator

    2026-09-09 SHA-pinned leftover(研究,不关本票,不实现,不 cherry-pick)。

    对照:

    #269 之后本票还要的不是第二套 provider 栈,也不是在 a9b40f0 再做一遍适配器。拆三层:

    1. Tracker / 文档。 四条验收框仍空。正文仍写实验性 chat-only。origin README 能力地图与扩展 README 已是「/login cursor + Pi 工具桥、不执行 Cursor-native」。origin THIRD_PARTY_NOTICES.md 仍写 chat-only(偏旧)。SETUP.md 两边都没有 /login——这是正文「不进 /openpi-setup」,不是漏做 setup 登录。OPEN ≠ origin 没有代码。
    2. Pi /login 缝上的验收。 feat(ai-providers): add Antigravity and Cursor OAuth providers #269 精确头 d3a844ee 自己写:真实 Antigravity/Cursor 账号与真实 HTTP CONNECT + HTTP/2 代理未在该头复跑。/login / /model / auth.json 仍是 Pi 的;ai-providers/ 零 slash、零 registerTool。fix(cursor): recover from native tool requests without native execution #484 评论是隔离 Grok child 恢复,不是四条框全绿,也不是 proxy-timeout 修复。
    3. 不是 docs(routing): define provider/model selection, fallback, reasoning state, and invocation evidence #195 禁止的第二栈。 第二栈 = 嵌套 Claude/Cursor harness、平行 registry、自动跨 provider fallback、安装期打模型、包默认选中某家。feat(ai-providers): add Antigravity and Cursor OAuth providers #269 是 pi.registerProvider(createProvider)。capabilities: 定义 Browser、Web、GitHub、Computer 与 Security 的外部 Provider Seam #169 仍是外部能力缝,不是 LLM routing。后续缺陷已有家:bug(antigravity): 工具 Schema 转换静默删除 $ref 结果约束 #465(Antigravity $ref → {})、bug(cursor): system prompt says “openpi MCP tools” while advertised names are read/rg/bash [under investigation] #513(prompt「openpi MCP」vs 广告名 read/rg/bash)。feat(web): add Pi-native provider setup, reasoning controls, and OpenPI settings #348 / feat(web): integrate provider authentication diagnostics #443 是 Web 投影,不写凭据。chore(deps): define and enforce the supported Pi baseline #328 仍 OPEN 是 baseline 政策(chore(deps): update and align supported Pi baseline to 0.84.4 (#328) #330 未合;chore(deps): require Pi 0.85.1 and remove server shim #410 已把 origin peer 提到 >=0.85.1),不是「还要不要有 provider」。

    本 checkout 不要按本票开工或 cherry-pick。需要这两家用 origin / npm 0.8.1,先证明 pi list 单源,再 /reload、/login、/model。不要 pi install 社区 pi-cursor-sdk 当官方 Cursor。

    本地记录(尚未 commit;blob 链接在入库前不可解析):docs/research/EXPERIMENT_234_LEFTOVER_2026-09-09.md。不替换 #195 上的社区 Ignore 拆法 #195 (comment) 。未 pi install,未运行真实 /login。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions