Files
magpie/internal/provider/testdata
yetone 16327872c3 provider: Antigravity's retired 2.5 Flash models are named for themselves again, with no tagDescription to go by (新v学员 on Discord)
新v学员 (#feedback, 10-20; Antigravity on a Google AI Plus plan): three
chips in the subscription's model list read "Gemini 3.5 Flash Lite", and
only one was gemini-3.5-flash-lite; hovering the others showed
gemini-2.5-flash and gemini-2.5-flash-lite.

Cause: Antigravity's fetchAvailableModels still names gemini-2.5-flash,
gemini-2.5-flash-lite (and the hidden -thinking) "Gemini 3.5 Flash Lite".
b68377dae (#1918) renamed them only when their tagDescription named
another family. Google no longer sends a tagDescription for these, and
where it sends one now it is a notice ("GPT-OSS will be removed from
Antigravity on November 2, 2026."), so nothing was renamed. Checked on the
owner's account today: no tagDescription on any Gemini model.

Fix: a model is named for its own id (catalog.NameOf, else its id) when
its name is spelled by another family's id in the list
("Gemini 3.5 Flash Lite" is gemini-3.5-flash-lite), or when its enum
names its own id (MODEL_GOOGLE_GEMINI_2_5_FLASH is gemini-2.5-flash;
models Antigravity names correctly carry MODEL_PLACEHOLDER_M…), which
covers an account whose list has no gemini-3.5-flash-lite. Levels of one
model (gemini-3.7-flash, -low) and a name no id spells, such as
gemini-3-flash-agent "Gemini 3.5 Flash (High)", stay as given. The same
names reach /v1/models, agents' lists and Usage's windows, since all of
them read modelInfo. The GUI's own way of showing what tells same-named
models apart (a77ecbf8a) is unchanged.

Test: TestAntigravityRetiredModelNamedWithoutTag reads
testdata/antigravity-models-2026-10-20.json, the real fetchAvailableModels
reply of today with MIME types and experiments left out. It runs three
cases: the list as given (all three ids that read "Gemini 3.5 Flash
Lite"), the list without gemini-3.5-flash-lite, and the 2.5 models with
placeholder enums. In each, no two models read the same and both 2.5 ids
are named for themselves. On the old google.go it fails in two cases:
"gemini-2.5-flash and gemini-2.5-flash-lite both read "Gemini 3.5 Flash
Lite"", "gemini-2.5-flash is named "Gemini 3.5 Flash Lite", not for
itself", plus the same for Usage's windows. With the enum rule broken by
hand, "no gemini-3.5-flash-lite" fails; with the spelled-name rule
broken, "placeholder enums" fails. TestAntigravityRetiredModelNamedForItself
(#1918's fixture) still passes.

Real use: built with -tags nogui and run as `magpie serve` with
MAGPIE_ADDR=127.0.0.1:3488 in a sandbox HOME, holding only a copy of the
owner's Antigravity login (free tier). /v1/models listed
gemini-2.5-flash "Gemini 2.5 Flash", gemini-2.5-flash-lite "Gemini 2.5
Flash-Lite", gemini-3.5-flash-lite "Gemini 3.5 Flash Lite" and
gemini-3-flash-agent "Gemini 3.5 Flash (High)". Not tried on a Plus account
or in the reporter's Windows/Linux GUI.

Run in a fresh worktree on origin/main e4ac5e871: gofmt -l clean; go vet
./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./... all
clean; go build, GOOS=linux go build -tags nogui, GOOS=windows go build
ok; `set -o pipefail; go test -timeout 45m ./...` at load 360-450:
64 packages, 61 ok (internal/provider 806s), 3 red, each already filed:
internal/agent past 45m (TestMorphContextWindow at the deadline, #2544,
#2723), internal/gateway past 45m (TestTierRecordedPerTry at the
deadline, #2870, #2108), internal/middleware TestOnUsageRows
"strategies.seen: took too long" (#2687). None of them reads
Antigravity's names.
No GUI file changed, so the GUI suite was not run.
2026-10-20 02:49:50 +08:00
..