pppuuu (Discord) tested an Antigravity model, got Google's 403 "Verify your
account to continue." with a link, and opening the link gave Google's own
"400. That's an error. The server cannot process the request because it
is malformed."
What magpie showed was checked first, and it was Google's validation_url
whole: a realistic VALIDATION_REQUIRED body (ErrorInfo metadata with
validation_url, validation_error_message, validation_url_link_text, a
google.rpc.Help detail, & written raw and as &) sent through the
Antigravity model test (TestAntigravityModelTest) and through the gateway
to an agent (TestVerifyLinkWhole) shows the URL with every parameter on
the old code too. Google's own Antigravity flow gives the same 400 to
many accounts (discuss.ai.google.dev 119780: cleared google.com cookies,
Chrome, or removing Antigravity from third-party access fixed it).
What differed from Google's own client, and is fixed here:
- Gemini CLI (classifyValidationRequiredError) opens the google.rpc.Help
detail's link first, past a "Learn more" one, then the ErrorInfo's
validation_link, then validation_url. magpie took validation_url first
and never read validation_link. It now takes them in Gemini CLI's order.
- Metadata was read as map[string]string, so one non-string value made the
whole body unreadable and the link was lost; values are read one by one.
- A message magpie already put the link in, passed on again as a JSON
error body (a Remote magpie's, the gateway's), has & as &; the raw
read stopped at the \ and found no link. It is read from the decoded
words now.
Tests: TestVerificationLinkWhole and TestVerificationLinkAsGeminiCLI
(provider), TestVerifyLinkWhole and a verify case in
TestAntigravityModelTest (gateway).
Run on mote: go test -run 'TestVerification|TestAPIError' ./internal/provider
ok; go test -run 'TestAntigravityModelTest|TestVerify|Restricted'
./internal/gateway ok; go vet (darwin, linux, windows) of internal/provider
and go vet internal/gateway ok; go test ./internal/provider: ok (178s).
Broken by hand: with the old test.go, TestVerificationLinkWhole (escaped
read-back) and TestVerificationLinkAsGeminiCLI (Help link) are red; the
gateway cases pass on the old code too, which is the evidence the shown
link was already whole.
Not tried: a real account Google wants verified (none here), and
pppuuu's exact body and link, which aren't known; whether Google's Help
link and validation_url ever differ is not known.