The best way to control Claude Code, Codex and more from any computer or phone
fix(providers): Antigravity API-key setup says Connect (#27759)
Lakshmi Tanmay committed
Nov 2, 2026 at 03:18 UTC
c894d797cf64edc0f5629a8537a97273bada8111
4 files changed
+82
-32
apps/mobile/src/features/settings/SettingsProviderAccountsRouteScreen.tsx
+8
-3
@@ -215,6 +215,9 @@ function ProviderAccount({
215
!active && signedIn && (provider.auth.canLogout ?? provider.setup?.canAuthenticate);
216
const showCallback =
217
Boolean(url) && (interaction?.type === "browser" ? interaction.acceptsCallback : !interaction);
218
+ const usesCredentials =
219
+ provider.driver === "antigravity" &&
220
+ (provider.auth.type === "gemini-api-key" || provider.auth.type === "agent-platform");
221
const status =
222
active || state?.phase === "failed" || state?.phase === "cancelled"
223
? state.message
@@ -228,7 +231,9 @@ function ProviderAccount({
231
? "No in-app sign-in advertised. Follow the provider's docs to finish setup."
232
: !provider.installed
233
? "Not installed"
231
- : "Not signed in";
234
+ : usesCredentials
235
+ ? "Connect to load models"
236
+ : "Not signed in";
237
// A provider with several sign-in methods picks one from a menu on the same control.
238
const methodActions: MenuAction[] = methods.map((method) => ({
239
id: `method:${method.id}`,
@@ -339,8 +344,8 @@ function ProviderAccount({
344
) : canSignIn && !signedIn ? (
345
<ControlPill
346
variant="primary"
342
- label="Sign in"
343
- accessibilityLabel={`Sign in to ${name}`}
347
+ label={usesCredentials ? "Connect" : "Sign in"}
348
+ accessibilityLabel={usesCredentials ? `Connect to ${name}` : `Sign in to ${name}`}
349
disabled={signInDisabled}
350
onPress={() => startSignIn()}
351
/>
apps/server/src/provider/AntigravityProvider.test.ts
+43
-20
@@ -129,6 +129,7 @@ type ProbeError = EffectAcpErrors.AcpError | ProviderSetupError;
129
130
const makeHarness = Effect.fn("makeAntigravityProviderHarness")(function* (
131
options: {
132
+ readonly auth?: { readonly type: string; readonly label: string };
133
readonly enabled?: boolean;
134
readonly safe?: boolean;
135
readonly probeUsage?: Effect.Effect<ServerProviderUsageLimits>;
@@ -145,6 +146,7 @@ const makeHarness = Effect.fn("makeAntigravityProviderHarness")(function* (
146
decodeSettings({ enabled: options.enabled ?? true, customModels: ["do-not-seed-me"] }),
147
{
148
stampIdentity: (snapshot) => Effect.succeed({ ...snapshot, instanceId, driver }),
149
+ ...(options.auth ? { auth: options.auth } : {}),
150
...(options.probeUsage ? { probeUsage: options.probeUsage } : {}),
151
probe: Ref.update(probeCalls, (count) => count + 1).pipe(
152
Effect.andThen(Ref.get(probe)),
@@ -305,23 +307,35 @@ it.layer(layerTest)("Antigravity provider snapshots", (it) => {
307
it.effect("treats initialize as installation proof, not account or model discovery", () =>
308
Effect.scoped(
309
Effect.gen(function* () {
308
- const harness = yield* makeHarness();
309
- expect(yield* harness.provider.snapshot.getSnapshot).toMatchObject({
310
- installed: false,
311
- status: "warning",
312
- auth: { status: "unknown" },
313
- models: [],
314
- });
315
- yield* harness.initialize;
316
- const snapshot = yield* harness.provider.snapshot.getSnapshot;
317
- expect(snapshot).toMatchObject({
318
- installed: true,
319
- status: "warning",
320
- version: "agy_acp_server_20260818_01_RC01",
321
- auth: { status: "unknown" },
322
- models: [],
323
- });
324
- expect(yield* Ref.get(harness.probeCalls)).toBe(1);
310
+ for (const auth of [
311
+ undefined,
312
+ { type: "oauth-personal", label: "Google account" },
313
+ { type: "oauth-business", label: "Gemini Enterprise" },
314
+ { type: "gemini-api-key", label: "Gemini API key" },
315
+ { type: "agent-platform", label: "Agent Platform" },
316
+ ]) {
317
+ const harness = yield* makeHarness(auth ? { auth } : {});
318
+ expect(yield* harness.provider.snapshot.getSnapshot).toMatchObject({
319
+ installed: false,
320
+ status: "warning",
321
+ auth: { status: "unknown" },
322
+ models: [],
323
+ });
324
+ yield* harness.initialize;
325
+ const snapshot = yield* harness.provider.snapshot.getSnapshot;
326
+ expect(snapshot).toMatchObject({
327
+ installed: true,
328
+ status: "warning",
329
+ version: "agy_acp_server_20260818_01_RC01",
330
+ auth: { status: "unknown", ...(auth ? { type: auth.type } : {}) },
331
+ message:
332
+ auth?.type === "gemini-api-key" || auth?.type === "agent-platform"
333
+ ? `Antigravity is installed. Connect with ${auth.label} to load models.`
334
+ : "Antigravity is installed. Google account access is not checked yet.",
335
+ models: [],
336
+ });
337
+ expect(yield* Ref.get(harness.probeCalls)).toBe(1);
338
+ }
339
}),
340
),
341
);
@@ -360,7 +374,8 @@ it.layer(layerTest)("Antigravity provider snapshots", (it) => {
374
it.effect("clears all account metadata on sign-out and authentication failure", () =>
375
Effect.scoped(
376
Effect.gen(function* () {
363
- const harness = yield* makeHarness();
377
+ const auth = { type: "gemini-api-key", label: "Gemini API key" };
378
+ const harness = yield* makeHarness({ auth });
379
yield* harness.initialize;
380
for (const clear of [harness.provider.onSignedOut, harness.provider.onAuthRequired]) {
381
yield* harness.provider.onSessionStarted(started, "/workspace");
@@ -369,7 +384,8 @@ it.layer(layerTest)("Antigravity provider snapshots", (it) => {
384
expect(yield* harness.provider.snapshot.getSnapshot).toMatchObject({
385
installed: true,
386
status: "warning",
372
- auth: { status: "unauthenticated" },
387
+ auth: { status: "unauthenticated", type: auth.type, label: auth.label },
388
+ message: "Connect with Gemini API key to use Antigravity and load models.",
389
models: [],
390
slashCommands: [],
391
skills: [],
@@ -382,7 +398,14 @@ it.layer(layerTest)("Antigravity provider snapshots", (it) => {
398
expect((yield* harness.provider.snapshot.getSnapshot).models).toEqual([]);
399
}
400
const refreshed = yield* harness.provider.snapshot.refresh;
385
- expect(refreshed.auth.status).toBe("unauthenticated");
401
+ expect(refreshed.auth).toEqual({
402
+ status: "unauthenticated",
403
+ type: auth.type,
404
+ label: auth.label,
405
+ });
406
+ expect(refreshed.message).toBe(
407
+ "Connect with Gemini API key to use Antigravity and load models.",
408
+ );
409
expect(refreshed.supportsTextGeneration).toBe(false);
410
}),
411
),
apps/server/src/provider/AntigravityProvider.ts
+15
-4
@@ -164,6 +164,14 @@ export const makeAntigravityProvider = Effect.fn("makeAntigravityProvider")(func
164
settings: AntigravitySettings,
165
options: AntigravityProviderOptions,
166
) {
167
+ const usesCredentials =
168
+ options.auth?.type === "gemini-api-key" || options.auth?.type === "agent-platform";
169
+ const signInMessage = usesCredentials
170
+ ? `Connect with ${options.auth.label} to use Antigravity and load models.`
171
+ : SIGN_IN_MESSAGE;
172
+ const authUncheckedMessage = usesCredentials
173
+ ? `Antigravity is installed. Connect with ${options.auth.label} to load models.`
174
+ : AUTH_UNCHECKED_MESSAGE;
175
const checkedAt = DateTime.formatIso(yield* DateTime.now);
176
const initialDraft = {
177
...buildServerProvider({
@@ -243,8 +251,8 @@ export const makeAntigravityProvider = Effect.fn("makeAntigravityProvider")(func
251
(authenticated
252
? undefined
253
: draft.auth.status === "unauthenticated"
246
- ? SIGN_IN_MESSAGE
247
- : AUTH_UNCHECKED_MESSAGE);
254
+ ? signInMessage
255
+ : authUncheckedMessage);
256
return {
257
...state,
258
draft: {
@@ -420,9 +428,12 @@ export const makeAntigravityProvider = Effect.fn("makeAntigravityProvider")(func
428
authRevision: state.authRevision + 1,
429
draft: {
430
...state.draft,
423
- auth: { status: "unauthenticated" },
431
+ auth: {
432
+ status: "unauthenticated",
433
+ ...(usesCredentials ? options.auth : {}),
434
+ },
435
status: "warning",
425
- message: SIGN_IN_MESSAGE,
436
+ message: signInMessage,
437
checkedAt: updatedAt,
438
models: [],
439
slashCommands: [],
apps/web/src/components/settings/ProviderAuthenticationSection.tsx
+16
-5
@@ -73,11 +73,16 @@ export function ProviderAuthenticationSection({
73
!signedIn &&
74
(provider.setup?.canAuthenticate === false ||
75
(provider.driver === "acpRegistry" && auth?.methods?.length === 0));
76
+ const usesCredentials =
77
+ provider.driver === "antigravity" &&
78
+ (provider.auth.type === "gemini-api-key" || provider.auth.type === "agent-platform");
79
const accountDescription = active
80
? auth?.phase === "starting"
78
- ? (auth.message ?? "Starting sign-in…")
81
+ ? (auth.message ?? (usesCredentials ? "Connecting…" : "Starting sign-in…"))
82
: auth?.phase === "verifying"
80
- ? "Checking your account…"
83
+ ? usesCredentials
84
+ ? "Checking credentials and loading models…"
85
+ : "Checking your account…"
86
: interaction?.type === "terminal"
87
? "Complete sign-in in the terminal below."
88
: interaction?.type === "credentials"
@@ -89,7 +94,9 @@ export function ProviderAuthenticationSection({
94
? "Discovering sign-in methods…"
95
: needsExternalSetup
96
? "No in-app sign-in advertised. Follow the provider's docs to finish setup."
92
- : `Sign in on ${environmentLabel}.`;
97
+ : usesCredentials
98
+ ? `Connect on ${environmentLabel} to load models.`
99
+ : `Sign in on ${environmentLabel}.`;
100
const statusMessage = auth?.phase === "failed" ? auth.message : null;
101
const disabled = readOnly || pending || query.error !== null || isDiscovering;
102
const draftId = `${auth?.flowId ?? ""}:${interaction?.id ?? ""}`;
@@ -291,8 +298,12 @@ export function ProviderAuthenticationSection({
298
{signedIn
299
? "Change account"
300
: auth?.phase === "failed" || auth?.phase === "cancelled"
294
- ? "Retry sign-in"
295
- : "Sign in"}
301
+ ? usesCredentials
302
+ ? "Retry connection"
303
+ : "Retry sign-in"
304
+ : usesCredentials
305
+ ? "Connect"
306
+ : "Sign in"}
307
</Button>
308
) : null}
309
{!active && signedIn && (provider.auth.canLogout ?? provider.setup?.canAuthenticate) ? (