ac4af582301a4e8a29245dbba767eba31334ddf9
30
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
d9f63dfee8 |
antigravity: a model read apart from its group is a pool of its own; a model no window counts rests alone
runking on Discord: Antigravity has three groups (Gemini 3, Gemini 4,
Claude); Claude was used up, Gemini 4 not, and the card showed only
Gemini 5h/7d and Claude 5h/7d, no Gemini 4.
Cause: when retrieveUserQuotaSummary has no "Gemini 4 Argon" group (an
Ultra account's, whose Argon quota Antigravity-Manager reads in
Gemini's; or the prod endpoint's, per CodexBar), pools() put every
Gemini model into the family-wide "Gemini Models" pool, gemini-4-argon
too, though fetchAvailableModels gave it a reading of its own. The card
then showed Gemini's reading for it and hid Argon's.
Now a model is folded into its family's pool only when its own reading
matches the pool's 5 hours (share left within half a point, reset within
a minute when both tell one). Otherwise it is a pool of its own, named
as Google names the model without its level ("Gemini 4 Argon (High)" is
Gemini 4 Argon), with a week's span when its reset is past 5 hours. It
is Aside, as every pool is, so routing still reads the model's own
window. The GUI already shows a model's own pool ("Gemini 4 7d" ring);
its code is unchanged.
Routing: Allowance.Pooled said a model no window counts was the
account's. Antigravity's Gemini models that fetchAvailableModels gives
no quotaInfo (#3737) have no window, so a 429 on one rested the whole
account. When every window an account has is some models' only, a
refusal of a model none counts now rests the model. An account with a
window of its whole stays as before. A used-up Claude group already
rested only Claude's models.
pools() logs the summary's group names and bucket ids once per change
per account, under an 8-hex hash of the account, with no token or
email, so the next report shows the shape Google sent.
Run (mote, at this head): go test ./internal/provider ./internal/gateway
-count=1 -timeout 45m ok; GUI quota-pool-model, quota-pools,
quota-pool-order (Chromium and WebKit, en and zh) 12/12 ok; gofmt; GOOS
linux and windows go vet ./internal/provider ok.
Red on the old code: TestAntigravityQuotaModelApartFromGroup (Argon
folded into Gemini) and TestAllowancePooledModelNoWindowCounts (rests
the account).
Broken by hand: sameReading always false makes the "read alike" case red
(every Gemini model split off).
Not tried: a real account. The fixtures come from the proto in the agy
binary and the shapes Antigravity-Manager and CodexBar record, with and
without the Argon group. Whether runking's summary lacks the group, or
has it inside Gemini Models, is unconfirmed; the new log will show it.
Reported-by: runking (Discord)
|
||
|
|
c57a5f7f58 |
gateway: a vendor's redirect to another origin is sent no provider key
Go's http.Client follows up to 10 redirects to any host, https to http included, and on a hop to another domain drops only Authorization, Cookie and WWW-Authenticate. So a vendor (or anything answering at its URL) that redirected elsewhere got x-api-key, x-goog-api-key, api-key and a provider's own headers sent there; Authorization too when only the port differed, and all of them in the clear on an https to http hop on the same host. The class is fixed where the requests leave: - provider.KeepsCredentials is a CheckRedirect that follows a redirect only to the request's own origin (scheme, host, port; or http to https on the same host and default ports), at most 10, and gives any other 3xx back as the answer (http.ErrUseLastResponse). - provider.Keyed(c) is a copy of c with c's own CheckRedirect, then KeepsCredentials. Provider.do, the choke point of every p.Do, sends through it, and every http.DefaultClient.Do in internal/provider that carries a credential is Keyed(http.DefaultClient).Do. A copy per call, since netproxy.Install sets the default client's transport at run time. Left alone: Grok's public download, Antigravity's version URL and cline.go's unsigned read. - the gateway's client (s.client, every vendor call), the Codex relay's and the Codex websocket's take KeepsCredentials, and so does chatgpt_api's siwcClient. The native route needs nothing more: the vendor's 3xx comes back to the caller as it came, Location included, and the caller decides. Translated routes don't follow either, rather than following with credentials stripped: it is the rule search_api.go had already (#1580), no vendor magpie speaks to was found redirecting its API to another origin, a stripped request elsewhere would only fail with a confusing 401, and the vendor-URL downloads (video, images) are fetched unsigned through vendorClient, so they are not affected. Tests: TestRedirectKeepsTheKeyAtItsOrigin (307 and 302 elsewhere with Authorization, x-api-key, x-goog-api-key, api-key and a custom header; a same-origin redirect followed with every key; three clients), TestRedirectNeverDowngrades (an https vendor's redirect to http on its own host and port), TestSameOrigin, TestKeyedKeepsTheClientsRule, TestNativeRedirectKeepsTheKey (Anthropic and Gemini providers with an own header) and TestChatRedirectKeepsTheKey. Broken by hand: with Provider.do back on client.Do and s.client without CheckRedirect, the thief got every key header, /away answered 200, the https vendor's /plain was followed (400 from the TLS port spoken to in http), the native route's claudeish and gem answered the thief's {"stolen":true} with Authorization, X-Api-Key and X-Relay-Secret sent there, and the chat route sent Api-Key, Authorization and X-Relay-Secret to it. TestSameOrigin and TestKeyedKeepsTheClientsRule don't depend on the wiring and passed. Run on mote at the pushed head 883690a0b (this commit and the next, on origin/main |
||
|
|
8e97e26d67 |
providers: WorkBuddy's sign-in warns that Tencent may ban the account first
NancyTom on X (11-04): WorkBuddy accounts used from DeepSeek Harness through magpie were banned, the international build's (WorkBuddy AI) most; repliers saw the same. Changing DSH's prompt isn't a fix: the plugin already rewords DSH's opener and moves the system prompt into the first user turn (REFUSED.md), and the bans came anyway. So magpie says it before an account is added, as it does for Claude, Zed, Qoder, Factory, MiMo and Command Code. - app.js: WorkBuddy and WorkBuddy AI carry risk with WORKBUDDY_RISK. A moved subscription (every user's now) gets it through subOf, so the plugin's sign-in waits behind "Sign in anyway" too. - i18n.js: zh, zh-TW, ja, de. - CLI: `magpie accounts add workbuddy|workbuddy-ai` asks the same (provider.WorkBuddyRisk, the window's words; a GUI test checks the two are equal). - Core script budget: no raise; the SUBS header comment was cut down. Run (mote, at |
||
|
|
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
|
||
|
|
7c900f468f |
antigravity: a tier Google refuses in fetchAvailableModels is asked once a day and is no "Model list" row (ferock4669)
ferock4669 on Discord: with an Antigravity subscription, the Requests page filled with "Model list" (模型列表) rows for /v1internal:fetchAvailableModels, each answered 400. Cause. For an account loadCodeAssist gives a paid or non-free tier, magpie asks fetchAvailableModels first with entitlement.userTier named ( |
||
|
|
2009d33a65 |
usage: Gemini 4 Argon's own quota group shows beside Gemini's and Claude's, and keeps Claude's in view (01huadalang on Discord)
01huadalang: "反重力有 Gemini 4的条子是7天,有没有5h 的条子,而且有 Gemini 4的条子怎么 claude 的条子没有了". Google now reports a third group in retrieveUserQuotaSummary for paid accounts: "Gemini 4 Argon", "For paid Pro plans, Argon quota is separate", with one bucket, gemini-argon-wtu-weekly, window weekly. That shape is agy 1.4.0's own /usage output, recorded in CodexBar #4585 and its test fixture; agy itself shows Gemini 5-hour, Gemini weekly and Gemini 4 Argon weekly, no Argon 5 hours. So there is no 5-hour bar for Argon to show: Google sends none. Claude's bar went because the GUI showed only some pools: - poolLine (an account row on the Providers page) drew pools.slice(0, 2) and put the rest in the tooltip; - the menu bar panel's card drew fam.slice(0, 4) rings; - poolWindows sorted pools by their first word, so "Gemini 4 Argon" ranked with Gemini, before "Claude & GPT". With three pools, Gemini and Gemini 4 Argon took both places and Claude & GPT dropped out of sight. The panel also labelled Argon's ring "Gemini 7d", the same as Gemini's own. And in Go, pools() matched a model to the first group whose name or description holds its family: gemini-4-argon went into Gemini's pool (and its tooltip), and a versioned group listed first with a 5-hour bucket would have taken every Gemini model. Now: - pools(): a group whose name says a version and that a model's name or id begins with ("Gemini 4 Argon") is that model's, whatever its windows; the family-wide match skips versioned groups and, as before (#745), needs the group's 5 hours. - app.js: every pool shows on an account row (the line already wraps) and every pool window on the panel card (a closer gap past four rings); a pool named for a model sorts after the family pools, as agy lists it; its ring reads "Gemini 4 7d" (poolWord); the #745 fallback, which shows a family's own 5 hours before a week-only pool's week, isn't applied to a model's pool. Tests, each red on the old code: - TestAntigravityQuotaModelGroup: the agy groups in agy's order, Argon listed first, and Argon first with a 5-hour bucket. Old code put gemini-4-argon in Gemini, and in the last case gemini-3-flash in Gemini 4 Argon. - quota-pool-model.test.cjs (Chromium, WebKit; en, zh): the Usage page has every group's windows in order; the panel has five rings, Claude's among them, labelled Gemini 5h/7d, Claude 5h/7d, Gemini 4 7d, all fitting; the account row has Gemini, Claude & GPT, Gemini 4 Argon. Chromium was red on the old app.js (order). Run at the pushed head's tree ( |
||
|
|
106a245502 |
gateway: a request's body goes once it is answered, not when its stream ends (#3383)
The transport holds a request until its reply's body is closed, a
stream's whole length, and with it the bytes.Reader body and the GetBody
NewRequest made over it. So every streaming request kept the body it
sent upstream alive to its end: for a Claude Code request translated to
Chat, the marshalled body (marshalRaw/appendHTMLEscaped in the report's
heap, 503 MB live).
provider.SetBody gives a request a body whose reader drops its bytes
once read and whose GetBody reads them again until provider.LetGo.
forwardOnce lets go once its retries (RetryOneAuth, RetryZhipuCoding)
are done; Codex's zstd turn, Copilot Auto's model swap and Gemini's Code
Assist envelope set their bodies the same way, so LetGo reaches them.
Run (worktree perf-stack, on the four commits before it, over
origin/main
|
||
|
|
7765f27fcc |
gateway: a model an account refuses goes on to the accounts not listing it yet
01huadalang (Discord): Antigravity with several accounts, only some can
use Gemini 4. The model and its bar showed only after the right account
was made preferred and probed, and a request failed with the preferred
account's error instead of going on to the account that serves it.
st3lland (Discord): on ZCode (plugin) accounts serve different models.
Owner: no manual setting, magpie knows per account and routes.
Two causes:
- perKeyBarred puts an account whose own saved list lacks the model in
pl.unlisted / pl.left (Unlisted) and serve never asked it. So when
the listing accounts refused the model (Antigravity's real 404
NOT_FOUND "Requested entity was not found.", codeAssistModelMissing;
plugins through modelRefused's unservedWords), the agent got that
error even though an account whose list was simply stale serves it.
Now, once every listing account of that subscription/model has been
asked and one refused it as unserved (unservedTry), its unlisted
accounts are asked next, right after it and before any other member
or fallback (unlistedNext, askUnlisted for the trace). The refusing
try rests as before (restAfterMarked, for that model). Not for a
pinned account, a sealed conversation or strict affinity; a gateway
key's account list narrows unlisted too (allowedCandidates). Other
refusals (403 PERMISSION_DENIED, 429 RESOURCE_EXHAUSTED) don't open
the unlisted accounts.
- Antigravity's per-account lists were refreshed only on the first
listing, a probe, a sync or a Refetch, so a model granted later and
its bar (chosenWindows filters by exposed models) stayed hidden. Its
quota reading already fetches fetchAvailableModels per account; now
it saves that account's list (noteAntigravityList) and re-merges the
pooled list from every On account's list when it changed. An Off
account's reading changes nothing.
Other vendors: the unlisted route only opens on the existing unserved
classifiers (Antigravity's 404, plugins' unservedWords), unchanged here;
TestUnlistedAccountNotAskedForOtherRefusals holds that the other real
Antigravity bodies don't open it.
Run (at the rebased head on origin/main
|
||
|
|
a7ed2f61d9 |
antigravity: a model Google marks disabled is left out of the list (kwanyu on Discord: gemini-4-argon-disabled answered 404)
kwanyu picked an Antigravity model in DeepSeek Harness and every request
was a 404 "Requested entity was not found" for gemini-4-argon-disabled.
The id is not made by the Harness: its source (HEAD 22ddee379), the
bundled pi-ai 1.3.0 and dsh's patch add no suffix to a model id, and
magpie's gateway has no generic suffix either. It is Antigravity's own:
a real account's fetchAvailableModels lists gemini-4-argon-disabled with
"disabled": true (magpie's log: "disabled [gemini-4-argon-disabled]"),
and modelInfo kept every disabled model in the list ("still listed, as
before", since
|
||
|
|
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". |
||
|
|
b68377dae7 |
provider: Antigravity's retired 2.5 Flash models are named for themselves, not "Gemini 3.5 Flash Lite" (#1918, kchen0x)
What changed: Antigravity's fetchAvailableModels gives gemini-2.5-flash, gemini-2.5-flash-lite and gemini-2.5-flash-thinking the displayName "Gemini 3.5 Flash Lite" and the tagDescription gemini-3.5-flash-lite (checked on the owner's account, 2026-10-13). magpie showed three buttons of that name and the same name in /v1/models and the quota windows. When several models share a name, one whose tagDescription names another family is now named from the catalog, or by its id. A model tagged with its own family (the effort levels of one model) keeps the shared name. Run: go test ./internal/provider/ (ok). TestAntigravityRetiredModelNamedForItself is built from the reporter's JSON plus two effort levels of one model; with the renaming removed it fails (both 2.5 models "Gemini 3.5 Flash Lite", two models read the same). gofmt -l clean; go vet -tags nogui on darwin, linux and windows. |
||
|
|
96d497e687 |
antigravity: a refused or failed model list says what magpie does next, and an account that couldn't refresh says so (#1553, AnxForever)
AnxForever's Google AI Pro account (loadCodeAssist: current tier
free-tier, paid tier g1-pro-tier, project aicode-consumers) gets
"Request contains an invalid argument." for fetchAvailableModels with
entitlement.userTier g1-pro-tier, and ends up with the catalog's
models. magpie already asks once more with {project} alone after that
refusal, but the log didn't say so, and when that second request also
failed nothing was logged at all: antigravityPoolModels kept the
account's last list silently whenever another account (here the
reporter's free one) succeeded.
What changed (logging only; the requests are unchanged):
- a refused tier's line now ends "; asking with <next> next" or
"; asking with none next";
- a failure of the request with no entitlement is logged with the
endpoint and project;
- the pool logs each enabled account whose refresh failed, with the
error and how many models it keeps from before.
Why the request is not changed: no authoritative source for the value
the official client puts in entitlement.user_tier for a paid account
was found. The Antigravity app is not installed on this Mac. The
extracted language-server schema (jkfujinami/antigravity-grpc-schemas,
model_configs.proto / entitlement.proto) confirms the field shape magpie
sends: FetchAvailableModelsRequest{project=1, request_id=2,
entitlement=9 {user_tier string}, location=3}; the LS also has
License{userTier, tierDisplayName, projectId, location} and
SelectLicense, so the tier it names may come with its own project or
location, but nothing public shows the values. Every open-source client
that serves Pro accounts sends {"project": ...} only, on
daily-cloudcode-pa: CLIProxyAPI (sdk/cliproxy/antigravity_models.go),
sub2api (backend/internal/pkg/antigravity/client.go),
Antigravity-Manager (src-tauri/src/modules/quota.rs, which notes the
list is the same for free and Pro accounts), syrtis. magpie's fallback
already sends exactly that, so a guessed tier value is not added.
TestAntigravityProInvalidTierAsksWithoutOne is built from the
reporter's log lines: the first fetch is
{entitlement:{userTier:g1-pro-tier}, project:aicode-consumers} and gets
400 INVALID_ARGUMENT, the second is {project:aicode-consumers} and its
list is used; then, with the second refused too, the account keeps its
3 models and both failures are in the log. Removing the pool's log
line turns it red.
Run: gofmt -l; go vet -tags nogui ./internal/provider (darwin,
GOOS=linux, GOOS=windows); go test -tags nogui -count=1 ./internal/provider;
go test -tags nogui -timeout 40m ./... under a temp HOME: every
package ok but internal/provider, where only
TestAccountDiscoveryOffReadsNoSignIn failed ("the watch didn't answer a
read: {}{}"). It fails the same way at every run from this agent's
checkout under .claude/worktrees, and passes at this same commit and at
origin/main from a checkout under the scratchpad, where the whole
internal/provider package passes too; it touches no Antigravity code.
Not verified: no Google AI Pro account was available. Whether the
reporter's second request ({project} only) succeeds or fails, and why,
is not known; this commit makes the next release's log say which.
|
||
|
|
b45b410b0c | fix: discover Antigravity models across enabled accounts (#706) | ||
|
|
c7f693b506 | quota: an Antigravity pool with only its week keeps its models' 5-hour windows (#745, werldl517-cyber: PooledWindows drops per-model 5h windows tagged with a pool when the pool's summary has only the 7-day aggregate) — pools() took each of retrieveUserQuotaSummary's buckets on its own, a disabled or unreadable one skipped, and then gave every model of a group that had any bucket left its Pool; PooledWindows put a pool's own windows in place of every model window tagged with that pool once the pool had any window of its own. So a summary with a group's weekly bucket and not its 5-hour one (disabled, or not sent) left the group's "7 days" and dropped the models' 5-hour readings from fetchAvailableModels, the only 5 hours to be had, from the CLI's and TUI's quota lists, /v1/magpie/quotas and quota alerts (dueAlerts reads PooledWindows too). pools() now puts a group's models in its pool only when the group has a 5-hour window, the one that stands in for theirs (the GUI's poolWindows, which keys on the models' pool, then shows them as families beside the pool's week); and PooledWindows drops a model's window only for a pool window of its span (modelSpan, 5 hours, for a model window without one, as fetchAvailableModels' are), so a window tagged by other means isn't lost either. A full summary (5 hours and week) reads as before. TestPooledWindowsPartialAggregateKeepsModelFallback is the reporter's repro plus the cases they listed (both windows, week alone, 5 hours alone, none), and TestAntigravityQuotaPools gains a summary with Gemini's week and its 5 hours disabled, read end to end through quota(): the models' four windows and Gemini · 7 days; both fail on the old code. go vet, builds (darwin, GOOS=linux, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass. Not tried with a real Antigravity account answering a partial summary. | ||
|
|
7806395c74 |
antigravity: a Google AI Pro account asks for its models with its plan named, as Antigravity does, and the log says what Google answered (Discord: a Pro account on magpie 0.1.770 had no Claude after Refresh while Antigravity 2.19.1's picker had Claude, 5.5 too) — magpie asked fetchAvailableModels with only {project}. Antigravity's language server (2.19.1, read from its binary) sends FetchAvailableModelsRequest{project, request_id, entitlement{user_tier}, location}, entitlement being the tier it keeps for the account (SetUserTier, with the plan's name) and the only v1internal request that has one. A Pro account's loadCodeAssist (CLIProxyAPI #6186) has currentTier standard-tier (usesGcpTos), paidTier g1-pro-tier "Google AI Pro", project aicode-consumers; asked with no tier, Google most likely serves it as standard-tier, Code Assist Standard, which has no Claude. Google checks the field: on our free account free-tier/bogus ids are INVALID_ARGUMENT, and standard-tier, g1-pro-tier, g1-ultra-tier and the other paid ids are FAILED_PRECONDITION, so paid ids are known and checked against the account. Ruled out on the free account: the project (none, random, aicode-consumers all the same), daily/prod/sandbox (all list Claude), and magpie's filters (only chat_/tab_ and six fixed ids, none Claude). Now fetchAvailableModels sends entitlement.userTier: the paid tier, then the current tier, skipping free-tier and legacy-tier, and on a refusal tries the next and at last none, as before; a free account sends none, so its request is unchanged. The tiers come from loadCodeAssist, which is now asked even when a project was kept with the sign-in (import, magpie accounts project), which used to skip it and so never learned the tier; if that fails the kept project is used as before. Logged: loadCodeAssist's current and paid tiers (with gcp-tos), project and ineligible tiers with reasons; each refresh's endpoint, User-Agent, project, tiers, entitlement sent, models listed and kept, the ids left out and why (not for chat, completion-only), those Google marks disabled (still listed), and the Claude ids; a tier refused, with Google's error. TestAntigravityProAccountNamesItsTier (Pro fixture: Claude only with g1-pro-tier named), TestAntigravityTierRefusedFallsBack and TestAntigravityTierFreeAndKeptProject fail on the old code (Gemini only) and pass. go vet, builds (darwin, GOOS=linux, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass. Not tried with a real Pro account: whether Google serves Claude to a Pro account only with its tier named is inferred from the client and the fixtures, not seen.
|
||
|
|
8b23ed03c6 | antigravity: models as Antigravity lists them — its picker's order, its context, output and images (0000FF on Discord: Antigravity offers Claude Opus 5.5 and Sonnet 5.5, magpie still shows 4.6) — magpie already lists Antigravity's models live from fetchAvailableModels, with no Claude allowlist; the backend doesn't offer 5.5 yet: the signed-in account's list today (prod and daily, hub 2.19.1) has only claude-opus-4-6-thinking and claude-sonnet-4-6, generateContent answers 404 for claude-opus-5-5, claude-sonnet-5-5 and their -thinking ids, CLIProxyAPI's antigravity registry and Antigravity-Manager have no 5.5, and the AI Developers Forum still asks Google to add it (2026-09-30); agy 1.2.16 names claude-opus-5-5@default only for the enterprise Vertex gateway. So no ids are guessed in; what changes is how a model Google adds arrives: the list was sorted by id (Opus 4.6 before any 5.5) and took context from magpie's catalog by id (Anthropic's 1M, where Antigravity gives Claude 250k) and images from "not gpt-oss". Now models() follows agentModelSorts (the picker's order, newest first; models not in it after, by id), and each model keeps the maxTokens, maxOutputTokens and supportsImages Antigravity gives it; quota windows keep their order. TestAntigravityModelsAsItListsThem fails on the old code (id order, no limits, a text-only model said to see). Against the real account in a temp HOME: Gemini 3.8/3.7/3.6 Flash first, Claude at 250000/64000, GPT-OSS 131072 without images. go vet, builds (darwin, GOOS=linux, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass but TestProvidersAnswerWhileListsComeIn and TestUserPath, timing tests that pass alone. | ||
|
|
5df609e525 | usage: an Antigravity account shows each group of models' 5-hour and weekly allowance, one row a group (a user on Discord: 这里显示5h 和一周剩余比较好吧,现在是只显示5h,这3个模型都是一样的,没必要分开…多加个7day 条就好) — fetchAvailableModels gives each model only its 5-hour figure, the same for every model drawing on one quota, so the Usage page, the panel and the account rows showed a figure a family (Gemini, Claude, GPT-OSS) and no week. Antigravity's retrieveUserQuotaSummary reports the quota a group ("Gemini Models"; "Claude and GPT models", Claude and GPT-OSS sharing one), each with a 5h and a weekly bucket; magpie now reads it beside the models' (best-effort: without it the windows are as before) and adds each group's windows, named "5 hours" and "7 days" with their pool (Gemini, Claude & GPT), each model's window naming its pool. The Usage page shows Gemini · 5 hours, Gemini · 7 days, Claude & GPT · 5 hours, Claude & GPT · 7 days, the pool's models in each tooltip; the panel four rings (Gemini 5h/7d, Claude 5h/7d); the account rows each pool with its 5h and 7d meters; the TUI the pools' windows in place of the models'. "Every model" lists the models' own windows. The pools' windows are aside for routing, which reads the models' as before; the tray's text is unchanged. TestAntigravityQuotaPools and quota-pools.test.cjs (Chromium, WebKit; en, zh) fail without the change; quota-families, click-scroll, old-webkit, tray-usages, panel-usage pass. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass. | ||
|
|
b643231fc7 |
edit, provider: stop inline comments leaking into dotenv values (#439)
* edit,provider: stop reading inline comments as part of dotenv values * provider: read Google env values through edit.GetEnvFile |
||
|
|
9bf6d43527 |
claude: magpie no longer asks Anthropic for a Claude account's usage, and adding a Claude account warns of a ban (the user: 不要伪造任何的 Claude 请求,能否通过 claude cli 获取 / 我害怕被封; 添加账号时要像其他的 Subscription Provider 一样显示风险提示) — the usage was read by magpie itself calling Anthropic's /api/oauth/usage with the account's token, on a timer, for every saved account, and Claude's usage-limit resets (cedar_ember) were listed, spent and auto-spent the same way. Now the usage is what Claude Code's own /usage prints (claude -p /usage, a command Claude Code answers itself without asking a model), run only when Usage is opened or Refresh pressed (GUI, magpie quota, accounts, TUI), for the account Claude Code is signed in to, at most once in 30s; a saved account shows only what Claude Code reported while using it, or the last reading kept. The Claude resets, Auto-use and their settings are gone (Codex's stay). Session jsonl files hold no usage figures, so they aren't read. Starting a Claude sign-in or import (GUI and CLI) first says Anthropic may suspend or ban the account and that it is at the user's own risk. TestClaudeWindowsAsked, TestParseClaudeUsage, TestClaudeUsageRunsClaudeCode, claude-usage-asked.test.cjs and claude-risk.test.cjs fail without the change. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass; routing-auto-reset, codex-auto-reset, quota-families, tray-usages, click-scroll, old-webkit, plugin-signin, usage-alert, usage-ledger pass.
|
||
|
|
31b6257c7e | usage: an Antigravity account shows a meter for each model family, not for each model (01huadalang on Discord: 谷歌的反重力如果登录多个账号显示得很丑…low mid 和 high 都要显示,这样好臃肿) — Antigravity gives a quota for each model it lists (13 in its recorded list), and the Usage page drew them all, 9–13 meters an account, while the panel and the account rows showed the first 3 or 2 by id. Each window now carries its family (Gemini, Claude, GPT-OSS…), and the Usage page, the panel and the account rows show one meter a family, the most used of its models (the soonest reset on a tie); its tooltip lists every model, and "Every model" swaps the account's meters in place without moving the page. Windows, routing and the model filter are unchanged; cards without families look as before. TestAntigravityQuotaFamilies and quota-families.test.cjs (Chromium, WebKit, en/zh) fail without the change; click-scroll, old-webkit, tray-usages, claude-resets, codex-auto-reset pass. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass. | ||
|
|
c47b22ee27 | agents: "Hide all" in an agent's model list keeps its line, and an uninstalled Gemini CLI goes from the Agents page (#356, #230) — the line under an agent ("Showing 0 / N models") came only when a picker still listed one of magpie's models, so hiding them all took away the one way back; it now stays while any is hidden. Gemini CLI was taken as present from what it leaves in ~/.gemini (settings.json, .env, installation_id…), which stays after it is uninstalled, so its row stayed, offering to set up a CLI that can't run; it is now its gemini binary. TestAgentModelLineAllHidden and TestGeminiNotAntigravity fail without the change; agent-models-all-hidden.test.cjs (Chromium, WebKit, en/zh) added. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./internal/agent ./internal/gui ./internal/library ./internal/provider pass; agent-models, click-scroll, old-webkit pass. | ||
|
|
e92994b37a | agents, library: Antigravity alone no longer shows Gemini CLI (#330), and turning an agent off on a skill or MCP server says it was removed (#332) — Gemini CLI was found from ~/.gemini existing, where Antigravity keeps its own folders (antigravity, antigravity-cli, config) and reads GEMINI.md; it now takes only what Gemini CLI writes there (settings.json, .env, google_accounts.json, installation_id, trustedFolders.json, mcp-oauth-tokens.json, an oauth_creds.json its own OAuth client minted, as #143) or a gemini on PATH. The Library's agent chips said 「已写入 X」 on the way off too; they now say 「已从 X 中移除」 (or N agents, or N updated for a mix). TestGeminiNotAntigravity and library-toggle-status.test.cjs (Chromium, WebKit, en/zh) fail without the change. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass; library-items, shared-skills, click-scroll, old-webkit pass. | ||
|
|
6546033109 |
kiro: removing kiro-cli's or the Kiro IDE's own sign-in hides it in magpie, and it shows again when Kiro signs in anew (Discord 碳碳双键: 本机没安装 kiro,但旧的 Kiro 数据还在,magpie 列出一个"Kiro account"(登录已失效,请重新添加此账号),添加新账号并设为首位后,旧的数据无法移除) — magpie reads Kiro's own sign-in from kiro-cli's database or ~/.aws/sso/cache and lists it among the accounts it signed in; Remove on it said "that is kiro-cli's or the Kiro IDE's own sign-in; run kiro-cli logout or sign out in the IDE", which with neither installed left a dead account there for good. The same refusal was shared by every agent whose own sign-in magpie only reads (forgetSideLogin: Kiro, Devin, Grok, Copilot, ZCode, WorkBuddy and WorkBuddy AI, Command Code, Gemini CLI, Antigravity). Now Remove on the agent's own sign-in hides it: logins.json's entry for it keeps a Hidden mark, and it is left out of the account list and so of the gateway's tries (the first and the ones behind it both come from that list); the agent's files are never deleted or written. It shows again when that sign-in changes: for Kiro, by a mark that is a digest of where the sign-in is (kiro-cli's row or the IDE's file) and its refresh token (never the token itself), so a new kiro-cli login or IDE sign-in, to any account, brings it back; for the others, which have no such mark, when it is another account. Removing it while it is first is allowed now, the next account being put first (saved, so it stays first when the own one comes back); removed when it was the only one, the agent has no account left. One of magpie's own accounts is removed with its home as before, and still can't be while it is first. The error and its per-agent sign-out hints are gone. Logins carry own, and the accounts list shows Remove on the agent's own sign-in also while it is first, its title "magpie stops showing and using Kiro's own sign-in; its files are left as they are, and it shows again when Kiro signs in anew" (magpie 不再显示和使用 Kiro 自己的登录;它的文件保持原样,Kiro 重新登录后会再次出现). Tested with a new internal/provider/side_logins_hide_test.go in a sandbox HOME: an expired kiro-cli sign-in ("Kiro account") behind a Google one magpie signed in is removed, stays gone across reads, isn't the account used nor among AlsoOn, kiro-cli's database byte-for-byte and mtime as it was, the refresh token nowhere in magpie's files; a new kiro-cli sign-in brings it back behind the one first; put first and removed, the next is first; one of magpie's removed takes its home and leaves the other's; the only account removed leaves Kiro with none; Grok's CLI sign-in hidden with auth.json untouched, back once it is another account. The agents' tests that expected the refusal (Command Code, Copilot, Devin, Grok, WorkBuddy, ZCode) no longer do. A new internal/gui/tests/own-signin-remove.test.cjs in Chromium and WebKit, en and zh: kiro-cli's sign-in behind another and alone first both have Remove with that title and post login/forget, magpie's first account has none. go build -tags nogui (and GOOS=linux, GOOS=windows), go test -tags nogui ./... and the whole GUI suite (138) pass. Not tried with a real Kiro, kiro-cli or the Kiro IDE.
|
||
|
|
6b546aa81d | gemini: 3.8 Flash asked of an account it isn't rolled out to goes as that account's Flash (蒙面人 on Discord: 502 错误 for gemini/gemini-3.8-flash) — the list magpie falls back on has 3.8 Flash and 3.5 Flash Lite, and a model picked from it went to Code Assist under that id whatever the account's experiments said; now, as Gemini CLI would, 3.8 Flash goes as gemini-3-flash and 3.5 Flash Lite as gemini-3.1-flash-lite where they aren't rolled out. Tested against a fake Code Assist | ||
|
|
7047716de6 | gemini: a Gemini CLI account lists the models Gemini CLI 0.61 offers it, Gemini 3.8 Flash among them (蒙面人 on Discord: 请问,这个不显示 Gemini 3.8 吗??) — magpie's list was Gemini CLI's of some versions ago, and the models it fetched were the account's quota buckets, which name models by Code Assist's ids (gemini-3-flash) and never 3.8 Flash. Now, as the CLI does, magpie asks Code Assist which experiments the account is in (listExperiments, at most hourly) and offers what the CLI's /model would: 3.1 Pro Preview or 3 Pro Preview, 3 Flash Preview (previews only with quota for one), 3.8 Flash where Google has rolled it out and 3.5 Flash where not, 3.5 or 3.1 Flash Lite likewise, 2.5 Pro and 2.5 Flash Lite; a request goes out under the id the CLI sends (3.5 Flash as gemini-3-flash, or as gemini-3.8-flash once rolled out), and quota buckets are shown under the models listed. The list magpie falls back on has 3.8 Flash, 3.5 Flash and 3.5 Flash Lite, and no longer the retired 3.1 Flash Lite Preview; magpie says it is Gemini CLI 0.61.0. Tested against a fake Code Assist with the experiments off, rolled out, and without Pro or preview access | ||
|
|
356549710b | subscription: Antigravity accounts can be imported from a JSON file (莫: https://github.com/jlcodes99/vscode-antigravity-cockpit 这个开源的里面有 你可以看看) — beside Add account (and as "Import instead…" on the risk note) the Antigravity card takes files or pasted text exported by Antigravity Cockpit (a JSON array of {email, refresh_token}, or refresh tokens one a line), Antigravity Manager (the same array, {accounts:[…]}, or an account file with token{refresh_token, email, project_id}) and CLIProxyAPI (an antigravity auth file, type/email/refresh_token/project_id; another type's is refused). All three sign in with the Antigravity app's own OAuth client, as magpie does, so their refresh tokens are good here. Each account is checked as signing in does: the token refreshed at Google, the email read from userinfo (the file's if that's refused), the project and plan from loadCodeAssist, then kept in logins.json like a signed-in account. A token magpie already has is not sent again (exists); a known email with a new token replaces the old (updated); duplicates in the file, entries with no token and tokens Google refuses are reported per account, Google's bare "Bad Request" explained. POST /api/signin/import; tokens are never logged, shown or returned, and the paste box is masked. Tested against an httptest token/userinfo/Code Assist server in a sandbox HOME | ||
|
|
bb7ce5ec31 | provider: an account signed in from magpie is listed even when the agent's own sign-in of it can't be read (tinysnake: workbuddy 登录以后,对应的 provider 并未出现) — once WorkBuddy's own account had been seen, logins.json remembered it as WorkBuddy's own (no secrets). With WorkBuddy then signed out, or its tokens kept encrypted ({"$wbEncrypted":…}), that entry is hidden, and signing the same account in from magpie was taken for a duplicate of it and dropped (addSideLogin): the sign-in said done, the toast showed, and no WorkBuddy provider appeared. addSideLogin is now told who the agent is signed in to right now; only when that is the same account is the new sign-in a duplicate, otherwise the remembered entry takes the new sign-in, and sideLogins doesn't add the own account twice once it's back. Copilot, Grok, ZCode and Gemini had the same flaw through the same code and are fixed with it. The window no longer says "added" when a finished sign-in isn't in the Providers list: it says so as an error. Tested with a fake WorkBuddy sign-in server in a sandbox HOME (own account remembered, then signed out or encrypted, then signed in from magpie: listed and signing with the new token; WorkBuddy readable again: still one account); not tested against the real WorkBuddy, and whether the reporter's WorkBuddy was signed out or encrypted isn't known | ||
|
|
10d4e98e19 | provider: ~/.gemini/oauth_creds.json is Gemini CLI's only when Gemini CLI's OAuth client minted it (#143) — a sign-in whose ID token names another client (Antigravity's) can't be refreshed as Gemini CLI's and is no longer listed as its account; agy keeps its sign-in in the system keyring, not there, so a personal account Google turns away from Gemini CLI is now told to add itself under Antigravity in magpie | ||
|
|
aedf23abc5 | provider: a relay given without its /v1 — one that lists its models at base/v1/models but not at the base — has /v1 added to its chat and responses bases when its models are fetched, since the gateway sends chat to the base as written and its requests 404'd while its models showed; and an Antigravity account Google gave no project says so plainly (with Google's reason, when it gives one) instead of "Usage unavailable" alone | ||
|
|
637b2458ee |
provider + gateway: Google sign-ins — Gemini CLI's and Antigravity's — are subscriptions of magpie's, so any agent can use their models (#4); Gemini CLI's own login in ~/.gemini is read as it is, or an account is signed in from magpie with Google's OAuth, its token refreshed in memory, and each request goes to Code Assist wrapped as the app wraps it, with the project Code Assist set the account up with; Google now serves Gemini CLI's sign-in only to Code Assist Standard and Enterprise, which need a Cloud project, named with magpie accounts project or GOOGLE_CLOUD_PROJECT in ~/.gemini/.env and said so where the account is shown; Google may suspend an Antigravity account used outside Antigravity, so magpie says that and asks before adding one
|