agents: Antigravity says how its own sign-in's models come back on magpie (T_t__biu on X)

T_t__biu on X: once magpie wires the Antigravity app, the Gemini models of
their own signed-in Google account leave the app's model list. Cause: magpie
connects the app through Google's Enterprise Gateway (gateway block in
~/.gemini/config/config.json and ~/.antigravity/settings.json). On a gateway
the app's language server runs in AUTH_MODE_ENTERPRISE_GATEWAY and drops the
Google sign-in (Google's docs: the two can't be used at once), so Code
Assist's fetchAvailableModels, which listed the account's models, is never
asked. No key in the file keeps both.

What does keep them: the same Google account signed in under magpie's
Antigravity subscription (the antigravity-auth plugin). The gateway's
antigravity catalog then lists that account's own models beside magpie's,
on that account's quota, pooled with any other Google account added there.
The notice shown on connecting now says so while magpie has no Antigravity
account (provider.Logins("antigravity") empty); with one, it reads as
before. Translated in zh, zh-TW, ja, de; the site's Antigravity page (en,
zh, ja), llms-full.txt and docs/subsystems/agent-wiring.md say the same,
and the subsystem page names what is not built: keeping the app's own
sign-in and adding magpie's models beside it would need the backend's
Code Assist endpoint (--cloud_code_endpoint / CLOUD_CODE_URL) pointed at
magpie.

Run at this head (base 331057743 = origin/main, fetched), on mote:
- go test -count=1 -timeout 45m ./internal/agent ./internal/gui ./internal/cli: ok
- go test -run 'Subsystem|Doc|Loop' ./internal/gateway: ok
- node --test i18n-keys, i18n-en-no-cjk, agent-notice-lang, about-notices
  (GUI): 50/50 pass
- site: node --test worker.test.mjs files.test.mjs: 52/52 (after
  regenerating llms-full.txt, which the first run caught stale)
- GOOS=linux and GOOS=windows go vet ./internal/agent: ok; gofmt -l clean
Real use, sandbox HOME on mote with one real Antigravity account (copied
plugin:antigravity entry only, @magpie-community/opencode-antigravity-auth):
- magpie antigravity magpie/up/g3 wrote the gateway block; GET
  /v1/models?format=antigravity with the app's key listed the account's
  models (Gemini 3.8 Flash, Gemini 3 Flash, Claude Sonnet/Opus 4.6, GPT-OSS
  120B, ...) beside up/g3; a chat on antigravity/gemini-3-flash:low through
  /v1/chat/completions answered "pong" on that account.
- the built binary prints the old notice in that HOME, and the old notice
  plus the new sentence in an empty sandbox HOME.
Broken by hand: Notice's account check forced off, TestAntigravityGateway
red ("no word of the app's own models with no Antigravity account").
Not tried: a real signed-in Antigravity app (none here; the app keeps its
token in the keyring); the whole GUI suite (app.js untouched, only i18n.js
keys added); Windows/Linux runs of the package (no OS-specific code).
This commit is contained in:
yetone
2026-11-14 02:44:12 +08:00
parent 331057743d
commit 70bd270ae2
8 changed files with 38 additions and 4 deletions
File diff suppressed because one or more lines are too long
+11 -3
View File
@@ -30,6 +30,10 @@ package agent
// experiments and the commands behind them (/boost, /teamwork, /plugin,
// /generative_ui: YujunT46308), is off while it's on magpie. Nothing in
// the file keeps both; noticeAntigravity says so where it is connected.
// The models its own sign-in gave it (Code Assist's fetchAvailableModels)
// leave its picker with it: with no account under magpie's Antigravity
// subscription, noticeAntigravityOwn says how to have them back, through
// the gateway on that account's quota (T_t__biu on X).
//
// The same file is read by agy (Antigravity's CLI) too, below its own
// ~/.gemini/antigravity-cli/settings.json: an agy connected on its own row
@@ -303,10 +307,13 @@ func antigravity(home string) *Agent {
// the names its catalog gives them (antigravityCatalog)
ListsModels: true,
Notice: func() string {
if wired() {
return noticeAntigravity.String()
if !wired() {
return ""
}
return ""
if len(provider.Logins("antigravity")) == 0 {
return noticeAntigravity.String() + " " + noticeAntigravityOwn.String()
}
return noticeAntigravity.String()
},
Sync: func() error {
w, ok := on()
@@ -445,6 +452,7 @@ func antigravityTidy(path string) error {
// what antigravity says after a change (notice.go)
var (
noticeAntigravity = newNotice("Antigravity reads its gateway at start-up — restart Antigravity to use magpie's models. On a gateway it uses no Google sign-in, so what Google turns on for your account (its experiments, and commands such as /boost, /teamwork, /plugin and /generative_ui) is gone while it's on magpie; turning it off here gives that back. An agy not connected on its own row follows it too.")
noticeAntigravityOwn = newNotice("The models your own Google sign-in gives Antigravity leave its list too; sign that Google account in under magpie's Antigravity subscription and they come back, on that account's quota.")
noticeAntigravityAdmin = newNotice("Antigravity's {path} sets a gateway of its own, which wins over ~/.antigravity/settings.json, so it doesn't reach magpie")
noticeAntigravityEnv = newNotice("AGY_LLM_GATEWAY_URL is set to {url}, which wins over ~/.antigravity/settings.json, so Antigravity started with it doesn't reach magpie")
)
+16
View File
@@ -104,6 +104,22 @@ func TestAntigravityGateway(t *testing.T) {
if a.Notice() == "" {
t.Error("no notice to restart the app")
}
// the models the app's own sign-in gave it leave its picker: with no
// account under magpie's Antigravity subscription the notice says how
// to have them back (T_t__biu on X); with one, they are in the list
if !strings.Contains(a.Notice(), noticeAntigravityOwn.String()) {
t.Errorf("no word of the app's own models with no Antigravity account: %q", a.Notice())
}
b, _ := json.Marshal([]map[string]any{{"agent": "antigravity", "user": "me@example.com", "on": true,
"auth": map[string]any{"access_token": "a", "refresh_token": "r"}}})
os.MkdirAll(filepath.Dir(provider.Path()), 0o755)
os.WriteFile(filepath.Join(filepath.Dir(provider.Path()), "logins.json"), b, 0o600)
if n := len(provider.Logins("antigravity")); n != 1 {
t.Fatalf("the Antigravity account isn't read: %d", n)
}
if got := a.Notice(); got != noticeAntigravity.String() {
t.Errorf("notice with an Antigravity account in magpie: %q", got)
}
opts := f.Options(map[string]string{"model": f.Get()})
if !slices.ContainsFunc(opts, func(o Option) bool { return o.Value == "magpie/anth/claude-sonnet-5" }) {
t.Errorf("magpie's model not offered: %v", opts)
+5
View File
@@ -5042,6 +5042,7 @@ const I18N = {
"Pencil reads its custom models at start-up — restart Pencil to see magpie's models in its model picker.": "Pencil 启动时读取自定义模型,需重启 Pencil 才能在它的模型选择器中看到 magpie 的模型。",
"Paseo reads its model list when its daemon starts — restart Paseo's daemon to see magpie's models. Claude Code must be connected to magpie too.": "Paseo 在守护进程启动时读取模型列表,需重启 Paseo 的守护进程才能看到 magpie 的模型。Claude Code 也须已接入 magpie。",
"Antigravity reads its gateway at start-up — restart Antigravity to use magpie's models. On a gateway it uses no Google sign-in, so what Google turns on for your account (its experiments, and commands such as /boost, /teamwork, /plugin and /generative_ui) is gone while it's on magpie; turning it off here gives that back. An agy not connected on its own row follows it too.": "Antigravity 启动时读取网关,需重启 Antigravity 才能使用 magpie 的模型。走网关时它不使用 Google 登录,所以 Google 为你的账号开启的功能(它的实验,以及 /boost、/teamwork、/plugin、/generative_ui 等命令)在接入 magpie 期间都没有;在这里关闭即可恢复。未在自己那一行接入的 agy 也会跟着它走。",
"The models your own Google sign-in gives Antigravity leave its list too; sign that Google account in under magpie's Antigravity subscription and they come back, on that account's quota.": "你自己的 Google 登录给 Antigravity 的模型也会从它的列表里消失;在 magpie 的 Antigravity 订阅下登录同一个 Google 账号,它们就会回来,用的是该账号的额度。",
"Antigravity's {path} sets a gateway of its own, which wins over ~/.antigravity/settings.json, so it doesn't reach magpie": "Antigravity 的 {path} 设置了自己的网关,它优先于 ~/.antigravity/settings.json,所以不会连到 magpie",
"AGY_LLM_GATEWAY_URL is set to {url}, which wins over ~/.antigravity/settings.json, so Antigravity started with it doesn't reach magpie": "AGY_LLM_GATEWAY_URL 被设为 {url},它优先于 ~/.antigravity/settings.json,所以这样启动的 Antigravity 不会连到 magpie",
"Qwen Code reads a session's model at start-up — start a new session, or /model anew, to use this.": "Qwen Code 在会话启动时读取模型,需开启新会话或重新执行 /model 才会生效。",
@@ -10283,6 +10284,7 @@ const I18N = {
"Pencil reads its custom models at start-up — restart Pencil to see magpie's models in its model picker.": "Pencil 啟動時讀取自訂模型,需重啟 Pencil 才能在它的模型選擇器中看到 magpie 的模型。",
"Paseo reads its model list when its daemon starts — restart Paseo's daemon to see magpie's models. Claude Code must be connected to magpie too.": "Paseo 在守護程序啟動時讀取模型清單,需重啟 Paseo 的守護程序才能看到 magpie 的模型。Claude Code 也須已接入 magpie。",
"Antigravity reads its gateway at start-up — restart Antigravity to use magpie's models. On a gateway it uses no Google sign-in, so what Google turns on for your account (its experiments, and commands such as /boost, /teamwork, /plugin and /generative_ui) is gone while it's on magpie; turning it off here gives that back. An agy not connected on its own row follows it too.": "Antigravity 啟動時讀取閘道,需重啟 Antigravity 才能使用 magpie 的模型。走閘道時它不使用 Google 登入,所以 Google 為你的帳號開啟的功能(它的實驗,以及 /boost、/teamwork、/plugin、/generative_ui 等指令)在接入 magpie 期間都沒有;在這裡關閉即可恢復。未在自己那一列接入的 agy 也會跟著它走。",
"The models your own Google sign-in gives Antigravity leave its list too; sign that Google account in under magpie's Antigravity subscription and they come back, on that account's quota.": "你自己的 Google 登入給 Antigravity 的模型也會從它的列表裡消失;在 magpie 的 Antigravity 訂閱下登入同一個 Google 帳號,它們就會回來,用的是該帳號的額度。",
"Antigravity's {path} sets a gateway of its own, which wins over ~/.antigravity/settings.json, so it doesn't reach magpie": "Antigravity 的 {path} 設定了自己的閘道,它優先於 ~/.antigravity/settings.json,所以不會連到 magpie",
"AGY_LLM_GATEWAY_URL is set to {url}, which wins over ~/.antigravity/settings.json, so Antigravity started with it doesn't reach magpie": "AGY_LLM_GATEWAY_URL 被設為 {url},它優先於 ~/.antigravity/settings.json,所以這樣啟動的 Antigravity 不會連到 magpie",
"Qwen Code reads a session's model at start-up — start a new session, or /model anew, to use this.": "Qwen Code 在會話啟動時讀取模型,需開啟新會話或重新執行 /model 才會生效。",
@@ -15526,6 +15528,7 @@ const I18N = {
"Pencil reads its custom models at start-up — restart Pencil to see magpie's models in its model picker.": "Pencil は起動時にカスタムモデルを読み込みます。モデル選択に magpie のモデルを表示するには Pencil を再起動してください。",
"Paseo reads its model list when its daemon starts — restart Paseo's daemon to see magpie's models. Claude Code must be connected to magpie too.": "Paseo は起動時にデーモンがモデル一覧を読み込みます。magpie のモデルを表示するには Paseo のデーモンを再起動してください。Claude Code も magpie に接続されている必要があります。",
"Antigravity reads its gateway at start-up — restart Antigravity to use magpie's models. On a gateway it uses no Google sign-in, so what Google turns on for your account (its experiments, and commands such as /boost, /teamwork, /plugin and /generative_ui) is gone while it's on magpie; turning it off here gives that back. An agy not connected on its own row follows it too.": "Antigravity は起動時にゲートウェイを読み込みます。magpie のモデルを使うには Antigravity を再起動してください。ゲートウェイ経由では Google のサインインは使われないため、Google がアカウントに有効にする機能(実験や、/boost、/teamwork、/plugin、/generative_ui などのコマンド)は magpie 接続中は使えません。ここでオフにすると元に戻ります。自分の行で接続していない agy もこれに従います。",
"The models your own Google sign-in gives Antigravity leave its list too; sign that Google account in under magpie's Antigravity subscription and they come back, on that account's quota.": "あなた自身の Google サインインで Antigravity に出ていたモデルもリストから消えます。magpie の Antigravity サブスクリプションで同じ Google アカウントにサインインすると、そのアカウントのクォータで戻ってきます。",
"Antigravity's {path} sets a gateway of its own, which wins over ~/.antigravity/settings.json, so it doesn't reach magpie": "Antigravity の {path} が独自のゲートウェイを設定しており、~/.antigravity/settings.json より優先されるため、magpie に届きません",
"AGY_LLM_GATEWAY_URL is set to {url}, which wins over ~/.antigravity/settings.json, so Antigravity started with it doesn't reach magpie": "AGY_LLM_GATEWAY_URL が {url} に設定されており、~/.antigravity/settings.json より優先されるため、これで起動した Antigravity は magpie に届きません",
"Qwen Code reads a session's model at start-up — start a new session, or /model anew, to use this.": "Qwen Code はセッション開始時にモデルを読み込みます。反映するには新しいセッションを始めるか、もう一度 /model を実行してください。",
@@ -20769,6 +20772,7 @@ const I18N = {
"Pencil reads its custom models at start-up — restart Pencil to see magpie's models in its model picker.": "Pencil liest seine eigenen Modelle beim Start – Pencil neu starten, um magpies Modelle in seiner Modellauswahl zu sehen.",
"Paseo reads its model list when its daemon starts — restart Paseo's daemon to see magpie's models. Claude Code must be connected to magpie too.": "Paseo liest seine Modellliste beim Start des Daemons – Paseo-Daemon neu starten, um magpies Modelle zu sehen. Claude Code muss ebenfalls mit magpie verbunden sein.",
"Antigravity reads its gateway at start-up — restart Antigravity to use magpie's models. On a gateway it uses no Google sign-in, so what Google turns on for your account (its experiments, and commands such as /boost, /teamwork, /plugin and /generative_ui) is gone while it's on magpie; turning it off here gives that back. An agy not connected on its own row follows it too.": "Antigravity liest sein Gateway beim Start – Antigravity neu starten, um magpies Modelle zu nutzen. Über ein Gateway nutzt es keine Google-Anmeldung, daher fehlt, was Google für dein Konto freischaltet (seine Experimente und Befehle wie /boost, /teamwork, /plugin und /generative_ui), solange es über magpie läuft; hier ausschalten gibt es zurück. Ein agy, das nicht in seiner eigenen Zeile verbunden ist, folgt ihm auch.",
"The models your own Google sign-in gives Antigravity leave its list too; sign that Google account in under magpie's Antigravity subscription and they come back, on that account's quota.": "Auch die Modelle, die Antigravity durch deine eigene Google-Anmeldung bekommt, verschwinden aus seiner Liste; melde dasselbe Google-Konto unter magpies Antigravity-Abo an, dann sind sie wieder da, auf dem Kontingent dieses Kontos.",
"Antigravity's {path} sets a gateway of its own, which wins over ~/.antigravity/settings.json, so it doesn't reach magpie": "Antigravitys {path} setzt ein eigenes Gateway, das Vorrang vor ~/.antigravity/settings.json hat, daher erreicht es magpie nicht",
"AGY_LLM_GATEWAY_URL is set to {url}, which wins over ~/.antigravity/settings.json, so Antigravity started with it doesn't reach magpie": "AGY_LLM_GATEWAY_URL ist auf {url} gesetzt, das Vorrang vor ~/.antigravity/settings.json hat, daher erreicht ein damit gestartetes Antigravity magpie nicht",
"Qwen Code reads a session's model at start-up — start a new session, or /model anew, to use this.": "Qwen Code liest das Modell einer Sitzung beim Start – eine neue Sitzung beginnen oder /model erneut ausführen, damit es gilt.",
@@ -21060,6 +21064,7 @@ const NOTICES = [
"Pencil reads its custom models at start-up — restart Pencil to see magpie's models in its model picker.",
"Paseo reads its model list when its daemon starts — restart Paseo's daemon to see magpie's models. Claude Code must be connected to magpie too.",
"Antigravity reads its gateway at start-up — restart Antigravity to use magpie's models. On a gateway it uses no Google sign-in, so what Google turns on for your account (its experiments, and commands such as /boost, /teamwork, /plugin and /generative_ui) is gone while it's on magpie; turning it off here gives that back. An agy not connected on its own row follows it too.",
"The models your own Google sign-in gives Antigravity leave its list too; sign that Google account in under magpie's Antigravity subscription and they come back, on that account's quota.",
"Antigravity's {path} sets a gateway of its own, which wins over ~/.antigravity/settings.json, so it doesn't reach magpie",
"AGY_LLM_GATEWAY_URL is set to {url}, which wins over ~/.antigravity/settings.json, so Antigravity started with it doesn't reach magpie",
"Qwen Code reads a session's model at start-up — start a new session, or /model anew, to use this.",
+1
View File
@@ -203,6 +203,7 @@ magpie agy deepseek/deepseek-v4-pro # agy on DeepSeek</pre></div>
<h2 id="google"><a class="anchor" href="#google">Your Google sign-in</a></h2>
<p>On a gateway, Antigravity uses no Google sign-in and its backend asks Google for nothing. What Google turns on for your account, its experiments and commands such as <code>/boost</code>, <code>/teamwork</code>, <code>/plugin</code> and <code>/generative_ui</code>, is gone while it is on magpie. Taking the row off magpie gives it back.</p>
<p>The models your own sign-in gave the app leave its picker too. To have them back on magpie, sign the same Google account in under magpie’s Antigravity subscription in the <span class="ui">Providers</span> tab: its models are then in the app’s list, served on that account’s quota, beside any other Google account you add there.</p>
<h2 id="agy"><a class="anchor" href="#agy">The agy CLI</a></h2>
<p><code>agy</code> follows the app’s gateway unless it is connected on its own row. Connected there, it runs on magpie through the Gemini API: magpie keeps its models in <code>magpie-settings.json</code>, beside agy’s own <code>~/.gemini/antigravity-cli/settings.json</code>, and starts agy with that file, <code>GOOGLE_GEMINI_BASE_URL</code>, <code>GEMINI_API_KEY</code> and <code>--model</code> for that session. So that typing <code>agy</code> just works, magpie adds a function named <code>agy</code> to each shell’s profile while agy is on one of its models. A terminal opened before takes the command from the row. Your <code>settings.json</code> stays yours, so <code>agy remote-control</code> still runs on your Google sign-in.</p>
+1
View File
@@ -203,6 +203,7 @@ magpie agy deepseek/deepseek-v4-pro # agy を DeepSeek で</pre></div
<h2 id="google"><a class="anchor" href="#google">Google サインイン</a></h2>
<p>ゲートウェイを使うと、Antigravity は Google サインインを使わず、バックエンドも Google に問い合わせません。Google がアカウントに有効にしている機能、実験や <code>/boost</code>、<code>/teamwork</code>、<code>/plugin</code>、<code>/generative_ui</code> などのコマンドは、magpie につないでいる間は使えません。行を magpie から外すと戻ります。</p>
<p>あなた自身のサインインでアプリに出ていたモデルも、モデル一覧から消えます。magpie で使い続けるには、<span class="ui">Providers</span> タブの Antigravity サブスクリプションで同じ Google アカウントにサインインしてください。そのモデルがアプリの一覧に並び、そのアカウントのクォータで動きます。そこに追加した他の Google アカウントも同じです。</p>
<h2 id="agy"><a class="anchor" href="#agy">agy CLI</a></h2>
<p><code>agy</code> は自分の行でつながない限り、アプリのゲートウェイに従います。自分の行でつなぐと Gemini API で magpie を使います:magpie はモデルを agy の <code>~/.gemini/antigravity-cli/settings.json</code> の横の <code>magpie-settings.json</code> に置き、そのセッションだけそのファイル、<code>GOOGLE_GEMINI_BASE_URL</code>、<code>GEMINI_API_KEY</code>、<code>--model</code> を付けて agy を起動します。<code>agy</code> と打つだけで動くように、agy が magpie のモデルを使う間、magpie は各シェルのプロファイルに <code>agy</code> という関数を追加します。それより前に開いたターミナルでは、行に表示されるコマンドを使ってください。あなたの <code>settings.json</code> はそのままなので、<code>agy remote-control</code> は引き続き Google サインインで動きます。</p>
+1
View File
@@ -203,6 +203,7 @@ magpie agy deepseek/deepseek-v4-pro # agy 用 DeepSeek</pre></div>
<h2 id="google"><a class="anchor" href="#google">你的 Google 登录</a></h2>
<p>走网关时,Antigravity 不使用 Google 登录,它的后端也不再请求 Google。Google 为你的账号开启的功能,包括实验功能和 <code>/boost</code>、<code>/teamwork</code>、<code>/plugin</code>、<code>/generative_ui</code> 等命令,在接入 magpie 期间不可用。把那一行从 magpie 取消即可恢复。</p>
<p>你自己的登录给应用的模型也会从它的模型列表里消失。想在 magpie 上用回它们,就在 <span class="ui">Providers</span> 页的 Antigravity 订阅下登录同一个 Google 账号:它的模型会出现在应用的列表里,用的是该账号的额度;在那里加的其他 Google 账号也一样。</p>
<h2 id="agy"><a class="anchor" href="#agy">agy CLI</a></h2>
<p>除非在自己那一行接入,<code>agy</code> 会跟随应用的网关。在自己那一行接入时,它通过 Gemini API 使用 magpie:magpie 把它的模型放在 <code>magpie-settings.json</code>,与 agy 自己的 <code>~/.gemini/antigravity-cli/settings.json</code> 并排,并在启动 agy 时为这次会话带上该文件、<code>GOOGLE_GEMINI_BASE_URL</code>、<code>GEMINI_API_KEY</code> 和 <code>--model</code>。为了让直接输入 <code>agy</code> 就能用,agy 使用 magpie 模型期间,magpie 会在每个 shell 的配置文件里添加一个名为 <code>agy</code> 的函数。之前已打开的终端,请用那一行给出的命令。你的 <code>settings.json</code> 保持不变,所以 <code>agy remote-control</code> 仍然用你的 Google 登录。</p>
+2
View File
@@ -4662,6 +4662,8 @@ The catalog lists a model at each of its reasoning levels, so the app’s own pi
On a gateway, Antigravity uses no Google sign-in and its backend asks Google for nothing. What Google turns on for your account, its experiments and commands such as `/boost`, `/teamwork`, `/plugin` and `/generative_ui`, is gone while it is on magpie. Taking the row off magpie gives it back.
The models your own sign-in gave the app leave its picker too. To have them back on magpie, sign the same Google account in under magpie’s Antigravity subscription in the Providers tab: its models are then in the app’s list, served on that account’s quota, beside any other Google account you add there.
## The agy CLI
`agy` follows the app’s gateway unless it is connected on its own row. Connected there, it runs on magpie through the Gemini API: magpie keeps its models in `magpie-settings.json`, beside agy’s own `~/.gemini/antigravity-cli/settings.json`, and starts agy with that file, `GOOGLE_GEMINI_BASE_URL`, `GEMINI_API_KEY` and `--model` for that session. So that typing `agy` just works, magpie adds a function named `agy` to each shell’s profile while agy is on one of its models. A terminal opened before takes the command from the row. Your `settings.json` stays yours, so `agy remote-control` still runs on your Google sign-in.