Files
magpie/internal
yetone 69eb93e0a2 antigravity: an account's tiers are asked again each hour, so one that became Ultra lists Gemini 4 without a restart (rick_49551 on Discord)
rick_49551 reports an Antigravity account on Google AI Ultra whose model
list in magpie has no Gemini 4. magpie lists whatever fetchAvailableModels
gives, less chat_/tab_ ids, six fixed ids and the models Google marks
disabled; which models Google gives depends on the tier named in
entitlement.userTier, and that tier came from loadCodeAssist once per
magpie run: googleState.projects kept it with no expiry, while Gemini
CLI's experiments (flags) are asked again each hour. An account that
became Pro or Ultra after magpie first asked went on naming its old tier
(none, for a free account) in every hourly relist, and Google went on
listing it gemini-4-argon-disabled with "disabled": true, as it does the
owner's free account today (app.log 11-04: "disabled
[gemini-4-argon-disabled]"), which a7ed2f61d leaves out. Only a restart
asked again.

Now the list (modelInfo) asks loadCodeAssist again once the tiers are an
hour old, keeps the project, and takes the new current/paid tier and plan;
a failed or empty answer keeps the old ones for another hour. A change is
logged with the old tiers. The request path (project()) is unchanged, so
no request waits on loadCodeAssist.

Tests: TestAntigravityTierAskedAgainAfterUpgrade (free account, then the
fake's loadCodeAssist says g1-ultra-tier "Google AI Ultra": within the hour
no new loadCodeAssist; an hour on the list names g1-ultra-tier and has
gemini-4-argon, the plan reads Google AI Ultra; a failed loadCodeAssist
keeps it).
Broken by hand: with the antigravityTiers call commented out it fails
"Ultra: models [gemini-3.8-flash-high], want [gemini-3.8-flash-high
gemini-4-argon]"; restored, it passes.
Run (mote, at this tree): gofmt -l; go vet ./internal/provider/ on darwin,
GOOS=linux -tags nogui, GOOS=windows; go test -tags nogui -count=1
./internal/provider/ (ok, 138s).
Not tried: a real Ultra account. The Ultra fixture (gemini-4-argon enabled
under g1-ultra-tier) is inferred from the free account's real list and
Google's forum notes, not rick's bytes. Whether this is rick's case
depends on his magpie log's loadCodeAssist/fetchAvailableModels lines:
if loadCodeAssist itself has no paid tier, or Google refuses
g1-ultra-tier (400), this change doesn't help, and those lines say so.
2026-11-04 17:46:30 +08:00
..
…
…
…
…
…
…
…
…