You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(antigravity): sign Antigravity chats in with a Gemini API key or Google Agent Platform (ADC) - #43939
Antigravity chat could only sign in with a Google account. Now you can also pick Gemini API key (paste it into Settings) or Google Agent Platform (your gcloud login). Orca fills in the rest.
Files
Added
Deleted
Net
Test
2
$\color{#1a7f37}{\Huge{\mathbf{+}}}$105
0
$\color{#1a7f37}{\Huge{\mathbf{+}}}$105
Prod
22
$\color{#1a7f37}{\Huge{\mathbf{+}}}$756
$\color{#cf222e}{\Huge{\mathbf{−}}}$98
$\color{#1a7f37}{\Huge{\mathbf{+}}}$658
What Changed
Settings › Antigravity › Sign in with has two new options:
Gemini API key
Paste a key and press Save.
Orca checks the key with Google, stores it encrypted on the chat's host, and signs the chat in right away.
If no key is saved, GEMINI_API_KEY from your shell or from Antigravity's environment variables still works, and the field says so.
A Get a key from Google AI Studio link is right under the field. Replace and Remove are there too; saving or removing a key restarts any running Antigravity chats.
Google Agent Platform (ADC)
Run gcloud auth application-default login once and you're done.
Project and Location are optional. Orca picks the project in this order: the saved value, GOOGLE_CLOUD_PROJECT, ADC's quota project, a service account key's project_id, CLOUDSDK_CORE_PROJECT, then gcloud's active configuration. The location defaults to global.
Orca passes the resolved values as GOOGLE_CLOUD_PROJECT/GOOGLE_CLOUD_LOCATION, because the server prefers those variables over its settings file.
Under the hood:
The managed launch used to scrub GEMINI_API_KEY and every GOOGLE_* variable. The saved account type now reaches scrubEnvironment, which keeps only the variables that type needs.
Both new methods run on Orca's managed server. The host's agy still serves only a personal Google sign-in.
New host capability accounts.antigravity-chat-auth-key-adc.v1: older SSH/WSL hosts are offered only the Google options.
The key never returns to the renderer.
Orca refuses to save the key when the OS keyring would only obfuscate it.
A key that no longer decrypts falls back to the environment.
Fixed during end-to-end testing (after rebasing on main):
When the server rejects a Gemini API key, or Agent Platform finds no usable gcloud credentials, the server sends the error as its whole reply and ends the turn normally. Orca saved it as Antigravity's answer and counted the turn as a success. The Antigravity dialect now turns these one-line notices into a turn failure, the same way it already handles agy's streamed 401.
When CLOUDSDK_CONFIG is set, Orca reads ADC from that folder, but the server's Google client only looks under HOME. The chat signed in with a project and then failed with "could not find default credentials". Orca now passes the file it read in GOOGLE_APPLICATION_CREDENTIALS, unless that variable is already set.
Why
Requested: Antigravity chat should work with an Antigravity subscription (Google account), a Gemini API key, and ADC, as easily as possible. Both new methods are first-class ACP auth methods (gemini-api-key, agent-platform), advertised by Orca's managed server and by agy acp. Docs: https://antigravity.google/docs/ide/extensions/acp/ and https://antigravity.google/docs/install/.
Linked Issue
Internal request (no GitHub issue).
Visual Proof
Real dev Orca after the rebase on main, running Orca's managed Antigravity server 1.5.0 installed from Settings, with real gcloud ADC.
A chat on Google Agent Platform gets a real reply. The earlier turn shows the server's error from before the CLOUDSDK_CONFIG fix:
A rejected Gemini API key (GEMINI_API_KEY=dummy-not-a-real-key) now fails the turn as an error row instead of appearing as Antigravity's reply. The offer under it to switch comes from #44965:
Earlier proof, from before the rebase:
The account types, with Google Agent Platform selected and its optional project and location:
The Gemini API key field. Here it detects a GEMINI_API_KEY already set in the shell:
A chat answering on Google Agent Platform with project and location left empty (resolved to the ADC quota project, global):
An earlier chat answering on a Gemini API key:
Testing
I manually tested these changes locally (macOS dev build, managed server 1.5.0):
A bogus pasted key shows "Google rejected this Gemini API key".
A real key saves encrypted and signs in automatically, and a chat answers.
Agent Platform with both fields empty signs in; the server's settings show stably-gemini/global and a chat answers.
Switching back to Google account runs the chat on the host's agy.
Outside Orca: the server rejects a bogus key at the first turn, and an env project overrides settings.json, which is why Orca sets the env vars.
Automated tests added/updated, or explained why not below: antigravity-acp-environment-sanitizer.test.ts and antigravity-agent-platform-project.test.ts (project resolution order, gcloud INI parsing, service-account project).
Every added test fails without this change and avoids the test anti-patterns
Not tested: a Google sign-in on Orca's own server (needs an Antigravity subscription), Windows, Linux, and SSH/WSL hosts.
Risk
Level: Medium.
New saved state: two new antigravityChatAuth.method values, and an encrypted key file under <userData>/antigravity-chat/. An older Orca reading a newer host's key/ADC choice shows an empty select and asks for setup again; the reverse case is gated by the new capability.
With the API key method, the key reaches the chat server's tool subprocesses.
Back out with a plain revert. A user who picked a new method would then see Antigravity's account settings marked incomplete until they choose a Google method, and the encrypted key file would stay on disk.
No actionable comments were generated in the recent review.
Walkthrough
The changes add Gemini API key and Agent Platform as Antigravity chat authentication methods. The account form exposes these methods when the runtime capability is supported and displays the relevant GCP settings. The host adds encrypted API key storage and status, save, and clear RPC operations. Launch environment scrubbing receives the saved authentication configuration and preserves method-specific credentials. Sign-in handling updates token cleanup and missing-key error instructions.
Merge Risk: Moderate · up to 4ca6f
The new Gemini API key and Agent Platform sign-in options work in the author's manual test, but several open issues remain. A project set in gcloud can be ignored in favor of the ADC quota project. A browser-helper failure can block key and ADC sign-in. Key save and clear can leave running chats on the old key. Resolve at least the first two before merging.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: Antigravity chat sign-in gains Gemini API key and Google Agent Platform (ADC) options. The changeset adds these methods, including key storage, ADC project resolution,…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description follows the repository template closely. It has ELI5, What Changed, Why, Visual Proof, Testing, Risk, and Checklist-style content, with specific manual test steps and a stated Risk lev…
Full details: Title check
Explanation
The title names the main change: Antigravity chat sign-in gains Gemini API key and Google Agent Platform (ADC) options. The changeset adds these methods, including key storage, ADC project resolution, environment scrubbing, and UI fields, so the title matches the primary change. The title is long (97 characters) but remains specific and on-topic.
Full details: Description check
Explanation
The description follows the repository template closely. It has ELI5, What Changed, Why, Visual Proof, Testing, Risk, and Checklist-style content, with specific manual test steps and a stated Risk level of Medium with a back-out path. The main gaps are in the Linked Issue section, which states 'Internal request (no GitHub issue)' instead of a 'Fixes #' reference, and in the AI Disclosure section, which is empty. The Review and Agent skill upstream boundary sections are also absent. The Testing checklist claims 'Every added test fails without this change' without evidence. Because the core content is complete and specific, the description is mostly complete.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Data Integrity & Integration · Quick win
Recheck the account-method revision after the proxy wait for launches without an operation.
readAcpLaunchInvocation captures the account method and the environment before prepareAntigravityAcpProxyEnvironment awaits. The publication guard at line 142 rejects only a save already in progress when settings are read. A save that starts during the wait passes the post-wait check, because assertStructuredAgentResolutionCurrent does nothing when deps.operation is undefined. The at-rest discovery call in acp-at-rest-commands.ts passes no operation and does not enter ANTIGRAVITY_LAUNCH_GATE. Its launch can therefore start with the previous method after a save completes.
The launch stays internally consistent, since its environment, scrub input, and auth come from one snapshot. The consequence is a discovery child that uses the previous method for the length of the proxy wait. Require this path to detect a method change that occurs during the wait, either by rechecking the saved method revision after the wait or by tying the launch to an operation that the save invalidates.
Scope of the claim
The review comment's "mismatched settings" wording overstates the defect. The problem is a stale snapshot on an ungated path. The model-catalog probe and the gated session start paths were not traced to their invalidation or gate behavior, so this comment does not extend to them.
nwparker
changed the title
feat(antigravity): sign Antigravity chats in with a Gemini API key or ADC
feat(antigravity): sign Antigravity chats in with a Gemini API key or Google Agent Platform (ADC)
Nov 18, 2026
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 15
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Major · Run the browser sign-in preflight only for OAuth. · antigravity-chat-account.ts:103
src/main/antigravity/antigravity-chat-account.ts:103 Major · Functional Correctness · Quick win
Run the browser sign-in preflight only for OAuth.
When antigravityBrowserHelperWorks() returns false, prepare exits before writing the selected auth method. This blocks users with a valid Gemini API key or working ADC even though neither method uses Orca's browser callback. Gate the preflight on oauth-personal and oauth-business so both Google sign-in methods keep the existing check. (antigravity.google)
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 8b2c394d-60ec-46e7-8498-8f0fb06f31a4
Commits
Reviewing files that changed from the base of the PR and between a1bcb39 and c2d4383.
Files ignored due to path filters: 1
src/shared/rpc-contract/rpc-params-catalog.generated.ts is excluded by !**/*.generated.*
Files skipped from review as they are similar to previous changes: 1
src/renderer/src/i18n/locales/en.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Data Integrity & Integration · Quick win
Read the configured Windows project regardless of environment-name casing.
On Windows, resolveAgentPlatformProject reads env.GOOGLE_CLOUD_PROJECT from a plain object. The scrubber keeps a mixed-case key such as Google_Cloud_Project as it is, and nothing normalizes it before the lookup. A blank saved project with no ADC or gcloud fallback therefore resolves to null, even though the launch environment configures a project. agentPlatformEnvironment then omits GOOGLE_CLOUD_PROJECT.
Apply the documented precedence to the launch environment on Windows. Either normalize the retained project key before the lookup, or perform a case-insensitive lookup for it. Keep the resolved project consistent with the value the launch environment configures.
The reason will be displayed to describe this comment to others. Learn more.
Major · Data Integrity & Integration · Quick win
Do not use the ADC quota project as the Agent Platform target.
If gcloud is configured for app-prod and ADC has quota_project_id: "shared-quota", leaving the project blank in Settings sends shared-quota to Agent Platform. Google treats the ADC quota project as a billing and quota setting, separate from the resource project. Orca publishes the selected value as gcp.project and GOOGLE_CLOUD_PROJECT, so chat can fail even though app-prod is configured correctly. (docs.cloud.google.com)
Keep saved and explicit environment overrides first. Then use the configured gcloud project. Use a service account's project_id as a fallback when no target is configured. Update the quota-first test to cover distinct target and quota projects.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Heavy lift
Distinguish a stored key file from a usable saved key.
If gemini-api-key.enc exists but is empty, status reports saved: true. The launch reader returns null for the same file. With no GEMINI_API_KEY in the environment, Settings shows a saved key but chat receives none. An undecryptable file has the same mismatch.
If status must avoid keychain prompts, report that the file exists but has not been verified. When launch detects an unreadable key, show a replace-or-clear message and preserve the environment fallback.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Reject malformed keys before applying the offline fallback.
A key with an embedded newline passes the save schema, but Fetch rejects the x-goog-api-key header before contacting Google. The catch treats that rejection as an outage. The save then replaces the previous key with a value that cannot be sent in the header. Validate the trimmed header value before entering the catch, and keep offline saving for well-formed keys. (fetch.spec.whatwg.org)
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Apply the sign-in project requirement before an Agent Platform chat launches.
The launch path builds the Agent Platform environment without checking for a project. resolveAgentPlatformProject can return null, and agentPlatformEnvironment then omits GOOGLE_CLOUD_PROJECT and starts the managed server with only GOOGLE_CLOUD_LOCATION. The "needs a Google Cloud project" guidance appears only in the sign-in preparation path (gcpProjection), which launches do not call. A launch with no resolvable project therefore gets no Orca guidance. The user sees only the server's own error, if any.
Add the same project requirement to the launch path. When no project resolves, the launch should stop before spawn and show the same setup guidance that sign-in shows. A launch that resolves a project should keep its current environment unchanged.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Discard the replacement key when the user cancels.
If the user types a replacement key, selects Cancel, then selects Replace key again, the password input still contains the canceled key. The user can submit it without re-entering it. Clear the draft and its error on Cancel. Leave the saved key unchanged.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Data Integrity & Integration · Quick win
Do not apply an auth draft after the form closes.
If the key save finishes after the form unmounts, latestStart still points to the old Gemini draft. Its start() can call the auth config RPC before checking mounted.current. The later check prevents sign-in, but it does not prevent the write. Check mounted.current before invoking the callback. Keep automatic sign-in when the form is still mounted and Gemini API key is still selected.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Keep settings recovery available when a key is missing.
If the form has recorded a missing key and a later settings read fails, unavailable hides the key field. The stale keyMissing flag also disables the recovery action, so the user can neither add a key nor retry the settings read from this form. Apply the missing-key gate only when settings are available. Keep the gate for normal sign-in.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Keep the saved method visible while the capability check is pending.
If the config read returns agent-platform before the capability check finishes, the form selects agent-platform but this list contains only OAuth items. The trigger gets its text from the matching item, so it shows no method. Pass the loaded method’s label to SelectValue explicitly. Keep filtering the selectable options until the host confirms support. (radix-ui.com)
The reason will be displayed to describe this comment to others. Learn more.
Minor · Security & Privacy · Quick win
Bind the Gemini API key save to the host whose capability was checked.
callAntigravityChatApiKey checks the capability with assertRuntimeEnvironmentCapability, which discards the pairing revision it checked. callRuntimeRpc then captures the environment's current revision when it starts. If the environment is re-paired after the check starts and before the save call begins, the key is sent to the new host while the check answered for the old one. The save path therefore does not guarantee that the host receiving the key was the host that passed the capability check.
Use runtimeEnvironmentCapabilityProof in the save path. Pass the returned pairingRevision as expectedEnvironmentPairingRevision to callRuntimeRpc, as structured-agent-session-launch-fork-support.ts already does. The proof helper throws when the pairing changes while its status read is in flight, so a re-pair during the check fails before the key is sent.
… ADC
Orca's Antigravity chat offered only Google sign-ins (personal or Gemini
Enterprise), and its launch stripped GEMINI_API_KEY and every GOOGLE_*
variable, so a Gemini API key or Application Default Credentials could
not reach the chat.
Settings › Antigravity › Sign in with now also offers:
- Gemini API key: the server reads GEMINI_API_KEY from the chat's launch
environment (the shell or Antigravity's environment variables in Orca).
- Agent Platform (ADC): the host's Application Default Credentials with a
Google Cloud project and location saved like Gemini Enterprise's.
The saved account type now reaches the environment scrub, which keeps only
the credentials that type reads. Both methods run on Orca's own server
(the host's agy still serves only a personal Google sign-in). A missing
key gets a sentence naming GEMINI_API_KEY, and a failed saved-session check
no longer deletes a Google token for methods that save none.
Verified in a dev build: API key and ADC sign-ins each finish and a chat
answers; switching back to Google account answers on the host's agy.
…roject
- Gemini API key: paste the key in Settings. Orca checks it with Google,
stores it encrypted on the chat's host, and signs the chat in right away.
GEMINI_API_KEY in the environment still works when no key is saved.
- Google Agent Platform (ADC): the project and location are optional. Orca
takes the project from GOOGLE_CLOUD_PROJECT, ADC's quota project, or
gcloud's active project, and uses the global location.
- Shorter option labels, and 'Google' before 'Agent Platform'.
- Write the saved key asynchronously, and refuse to save it where the
host's keyring would only obfuscate it.
- A saved key that no longer decrypts falls back to GEMINI_API_KEY.
- Saving or removing a key restarts running Antigravity chats.
- A key save that finishes after switching methods no longer signs in.
- Agent Platform also reads a service account key's project_id,
CLOUDSDK_CORE_PROJECT and CLOUDSDK_ACTIVE_CONFIG_NAME, and passes the
resolved project and location as GOOGLE_CLOUD_PROJECT/LOCATION, which
the server prefers over its settings file.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Minor · Gate the new auth methods on their own capability… · runtime-antigravity-accounts-client.ts:94
src/renderer/src/runtime/provider-accounts/sign-in/runtime-antigravity-accounts-client.ts:94 Minor · Functional Correctness · Quick win
Gate the new auth methods on their own capability when applying them.
The method selector hides gemini-api-key and agent-platform on hosts without the new capability. However, a saved value from the host is loaded into the method state without a check. If that value is one of the new methods, the project and location fields remain editable, and an edit re-applies the config. callAntigravityChatAuthConfig checks only accounts.antigravity-chat-auth-config.v1, so the new method reaches the host without the capability that supports it.
Check the new capability in the apply helper when config.method is one of the new methods.
Suggested fix
if (owner.kind === 'environment') {
await assertRuntimeEnvironmentCapability(
owner.environmentId,
ANTIGRAVITY_CHAT_AUTH_CONFIG_RUNTIME_CAPABILITY,
'Update Orca on this host to configure Gemini Enterprise for Antigravity chats.'
)
+ if (config?.method === 'gemini-api-key' || config?.method === 'agent-platform') {+ await assertRuntimeEnvironmentCapability(+ owner.environmentId,+ ANTIGRAVITY_CHAT_KEY_AND_ADC_AUTH_RUNTIME_CAPABILITY,+ 'Update Orca on this host to use Gemini API key or Google Agent Platform sign-in.'+ )+ }
}
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 383766c7-bae8-4e81-86b9-72a6445d0852
Commits
Reviewing files that changed from the base of the PR and between c2d4383 and c9a3646.
Files ignored due to path filters: 1
src/shared/rpc-contract/rpc-params-catalog.generated.ts is excluded by !**/*.generated.*
Files skipped from review as they are similar to previous changes: 1
src/renderer/src/i18n/locales/en.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Stability & Availability · Quick win
Run the key save and clear under the Antigravity launch gate.
restartLiveChats closes only chats that are already loaded. It does not abort or wait for chat starts that are pending. A start that read the old GEMINI_API_KEY before the save or clear can still spawn with that key after the RPC returns. Chats that stay loaded keep the removed key until they restart.
The existing Antigravity settings path avoids this. It calls ANTIGRAVITY_LAUNCH_GATE.run(stopLiveChats, …). That call aborts registered starts and refuses new starts while it runs. Wrap the key write or clear in the same gate, and keep the stop inside the gate's stop step. Keep the current behavior that logs a stop failure instead of failing the save. Import ANTIGRAVITY_LAUNCH_GATE from antigravity-chat-account.ts, and reuse the existing gate rather than adding a second fence.
…DK_CONFIG
Orca reads ADC from CLOUDSDK_CONFIG when it is set, but the server's Google
client only looks under HOME, so a chat signed in with a project and then
failed with 'could not find default credentials'. Name the file Orca read in
GOOGLE_APPLICATION_CREDENTIALS unless one is already set.
…or finds no ADC
Orca's managed server answers a bad Gemini API key, or Agent Platform with no
usable gcloud credentials, by streaming its error as the whole reply and
ending the turn normally. The chat saved it as Antigravity's answer and the
turn as a success. Map those one-line notices to a turn failure, as agy's
streamed 401 already is.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Antigravity chat could only sign in with a Google account. Now you can also pick Gemini API key (paste it into Settings) or Google Agent Platform (your gcloud login). Orca fills in the rest.
What Changed
Settings › Antigravity › Sign in with has two new options:
Gemini API key
GEMINI_API_KEYfrom your shell or from Antigravity's environment variables still works, and the field says so.Google Agent Platform (ADC)
gcloud auth application-default loginonce and you're done.GOOGLE_CLOUD_PROJECT, ADC's quota project, a service account key'sproject_id,CLOUDSDK_CORE_PROJECT, then gcloud's active configuration. The location defaults toglobal.GOOGLE_CLOUD_PROJECT/GOOGLE_CLOUD_LOCATION, because the server prefers those variables over its settings file.Under the hood:
GEMINI_API_KEYand everyGOOGLE_*variable. The saved account type now reachesscrubEnvironment, which keeps only the variables that type needs.agystill serves only a personal Google sign-in.accounts.antigravity-chat-auth-key-adc.v1: older SSH/WSL hosts are offered only the Google options.Fixed during end-to-end testing (after rebasing on main):
CLOUDSDK_CONFIGis set, Orca reads ADC from that folder, but the server's Google client only looks underHOME. The chat signed in with a project and then failed with "could not find default credentials". Orca now passes the file it read inGOOGLE_APPLICATION_CREDENTIALS, unless that variable is already set.Why
Requested: Antigravity chat should work with an Antigravity subscription (Google account), a Gemini API key, and ADC, as easily as possible. Both new methods are first-class ACP auth methods (
gemini-api-key,agent-platform), advertised by Orca's managed server and byagy acp. Docs: https://antigravity.google/docs/ide/extensions/acp/ and https://antigravity.google/docs/install/.Linked Issue
Internal request (no GitHub issue).
Visual Proof
Real dev Orca after the rebase on main, running Orca's managed Antigravity server 1.5.0 installed from Settings, with real gcloud ADC.
A chat on Google Agent Platform gets a real reply. The earlier turn shows the server's error from before the

CLOUDSDK_CONFIGfix:A rejected Gemini API key (

GEMINI_API_KEY=dummy-not-a-real-key) now fails the turn as an error row instead of appearing as Antigravity's reply. The offer under it to switch comes from #44965:Earlier proof, from before the rebase:

The account types, with Google Agent Platform selected and its optional project and location:
The Gemini API key field. Here it detects a

GEMINI_API_KEYalready set in the shell:A chat answering on Google Agent Platform with project and location left empty (resolved to the ADC quota project,

global):An earlier chat answering on a Gemini API key:

Testing
stably-gemini/globaland a chat answers.agy.settings.json, which is why Orca sets the env vars.antigravity-acp-environment-sanitizer.test.tsandantigravity-agent-platform-project.test.ts(project resolution order, gcloud INI parsing, service-account project).Not tested: a Google sign-in on Orca's own server (needs an Antigravity subscription), Windows, Linux, and SSH/WSL hosts.
Risk
Level: Medium.
antigravityChatAuth.methodvalues, and an encrypted key file under<userData>/antigravity-chat/. An older Orca reading a newer host's key/ADC choice shows an empty select and asks for setup again; the reverse case is gated by the new capability.