lc: "antigravity的测试按钮不可用,别的供应商正常" — even after restarting
magpie and signing in again. A Google sign-in speaks only Code Assist, an
API whose envelope (project, model variant, request wrapper) the gateway
builds for each agent request. The provider test only sends its own tiny
request to a Chat/Responses/Anthropic/Gemini URL, so ModelTest() returned
"own-api" and the GUI turned Test models and each model's test off.
Now the gateway registers provider.ProbeTranslatedVia, the same pattern as
ProbeClaudeVia. For a Google Code Assist account, Test and TestModels ask
the model a "hi" (max 16 tokens) through askTranslated, the same path an
agent's request takes. The reply is read up to the first word, thought or
tool call, or until the vendor's error, which is reported with its status.
ModelTest() is "" for such an account, so the GUI's buttons are on. Plugin
providers and other own-API sign-ins (Kiro, Cursor…) are unchanged.
Run:
- TestAntigravityModelTest (internal/gateway): an Antigravity login and a
fake Code Assist upstream. ModelTest is "". TestModels is OK on
CodeAssist with the account named, and sent one :streamGenerateContent
with project p1 and "hi". Provider Test is OK. A 403 PERMISSION_DENIED
comes back as status 403 with its message. With testsTranslated forced
false by hand (the old behaviour), it fails: "own-api".
- go test -tags nogui ./internal/{provider,gateway,gui} under a temp HOME
with pinned caches: ok. gofmt -l clean. go vet darwin/linux/windows on
those packages: ok.
- Not tried against a real Antigravity account. Live state was read only.