provider: agy's Orchestrator (Neon), gemini-pro-orchestrator-neon, is priced as Gemini 4 Neon (mu33410 on X)
mu33410 on X: Gemini 4 Neon through agy had no price, as Orchestrator (Argon) had beforea75a1fffc. Antigravity's models page (https://antigravity.google/docs/models/, read 2026-11-19) added Gemini 4 Neon and Orchestrator (Neon), which "plans with Gemini 4 Neon" and hands implementation to Gemini 4 Hydrogen. Its id is gemini-pro-orchestrator-neon: the agy 1.5.10 binary's strings hold it beside gemini-pro-orchestrator-argon and -g1-pro (and gemini-4-neon, -low, -medium, -high, -xhigh). No catalog prices the role id, so its calls had tokens and no cost. It is now in antigravityRoles at gemini-4-neon, so MakerPrice, ListPrice, PricedName, the usage ledger and the Sessions list price it, under agy-cli/ and at an effort too. Neon itself (gemini-4-neon, at the efforts agy names it by) was already priced from models.dev, which lists it since 2026-11-18 for google, google-vertex, openrouter (google/gemini-4-neon), github-copilot and opencode at $3 in, $15 out, $0.15 cache read per 1M tokens: the same as Google's own page (https://aistudio.google.com/docs/pricing, Standard; no long-context tier, implicit caching only). The Gemini API key, Vertex, OpenRouter and gcp-ai routes read those catalog rows; the test now holds gemini-4-neon-xhigh, agy-cli/gemini-4-neon-high and antigravity/gemini-4-neon-low to that price too. A magpie whose catalog was synced before 11-18 shows Neon unpriced until its next sync. Tests: TestAntigravityOrchestratorIDsPricedAsTheirModel, TestPriceOfAntigravityOrchestratorRoles and TestAntigravityOrchestratorCallsPriced take the Neon role id (they had it as unpriced). Broken by hand: with origin/main's models.go all three are red on gemini-pro-orchestrator-neon (mica), green with the fix. Run (mote, at this tree, 62c1148ef on origin/mained405d1d7): gofmt -l clean; go vet ./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./... ok; go test -count=1 -timeout 45m ./... (sandbox HOME): 103 packages ok, internal/gateway FAIL on one test only, TestOpenCodeGoOwnFreeModelGetsNothingOfOpenCodes (OpenCode Go free model, not reached by pricing), red alone ated405d1d7without this change too and filed as #7117. No GUI files changed. Not tried: a real agy Neon conversation. This Mac's agy account is on a plan without Neon (`agy models` lists no Gemini 4), so the id is taken from the binary, not seen in a step's gen_metadata. The Vertex preset's model list still names no gemini-4-neon (typed in, it is priced); that is offering, not price, and is filed as #7214.
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/yetone/magpie/internal/catalog"
|
||||
)
|
||||
|
||||
// writeAntigravityRolesCatalog is models.dev's three Gemini 4 models and
|
||||
// writeAntigravityRolesCatalog is models.dev's four Gemini 4 models and
|
||||
// another vendor's, in a sandbox HOME.
|
||||
func writeAntigravityRolesCatalog(t *testing.T) {
|
||||
t.Helper()
|
||||
@@ -18,12 +18,14 @@ func writeAntigravityRolesCatalog(t *testing.T) {
|
||||
t.Setenv("XDG_CONFIG_HOME", filepath.Join(home, ".config"))
|
||||
t.Setenv("XDG_CACHE_HOME", filepath.Join(home, ".cache"))
|
||||
os.MkdirAll(filepath.Dir(catalog.CachePath()), 0o755)
|
||||
// models.dev's prices on 2026-11-15
|
||||
// models.dev's prices on 2026-11-15 (Neon's on 2026-11-19, Google's own:
|
||||
// https://aistudio.google.com/docs/pricing)
|
||||
os.WriteFile(catalog.CachePath(), []byte(`{
|
||||
"google":{"id":"google","models":{
|
||||
"gemini-4-argon":{"id":"gemini-4-argon","cost":{"input":2,"output":10,"cache_read":0.1}},
|
||||
"gemini-4-carbon":{"id":"gemini-4-carbon","cost":{"input":2.5,"output":12,"cache_read":0.25}},
|
||||
"gemini-4-hydrogen":{"id":"gemini-4-hydrogen","cost":{"input":1.5,"output":7.5,"cache_read":0.075}}}},
|
||||
"gemini-4-hydrogen":{"id":"gemini-4-hydrogen","cost":{"input":1.5,"output":7.5,"cache_read":0.075}},
|
||||
"gemini-4-neon":{"id":"gemini-4-neon","cost":{"input":3,"output":15,"cache_read":0.15}}}},
|
||||
"openai":{"id":"openai","models":{
|
||||
"gpt-5.1-codex":{"id":"gpt-5.1-codex","cost":{"input":1.25,"output":10}}}}}`), 0o644)
|
||||
catalog.Reset()
|
||||
@@ -45,6 +47,7 @@ func TestAntigravityOrchestratorIDsPricedAsTheirModel(t *testing.T) {
|
||||
"gemini-4-argon": {Input: 2, Output: 10, CacheRead: 0.1},
|
||||
"gemini-4-carbon": {Input: 2.5, Output: 12, CacheRead: 0.25},
|
||||
"gemini-4-hydrogen": {Input: 1.5, Output: 7.5, CacheRead: 0.075},
|
||||
"gemini-4-neon": {Input: 3, Output: 15, CacheRead: 0.15},
|
||||
}
|
||||
ag := Provider{ID: "antigravity", Name: "Antigravity"}
|
||||
other := Provider{ID: "some-relay", Name: "Relay"}
|
||||
@@ -59,6 +62,12 @@ func TestAntigravityOrchestratorIDsPricedAsTheirModel(t *testing.T) {
|
||||
"gemini-pro-orchestrator-g1-pro": "gemini-4-argon",
|
||||
"agy-cli/gemini-pro-orchestrator-g1-pro": "gemini-4-argon",
|
||||
"gemini-pro-orchestrator-g1-pro-high": "gemini-4-argon",
|
||||
// Orchestrator (Neon), in agy and the app (mu33410 on X)
|
||||
"gemini-pro-orchestrator-neon": "gemini-4-neon",
|
||||
"agy-cli/gemini-pro-orchestrator-neon": "gemini-4-neon",
|
||||
"gemini-pro-orchestrator-neon-high": "gemini-4-neon",
|
||||
// Gemini 4 Neon itself, at the efforts agy names it by
|
||||
"gemini-4-neon-xhigh": "gemini-4-neon",
|
||||
// spelled as a route or an effort names them
|
||||
"Gemini-Pro-Orchestrator-Argon": "gemini-4-argon",
|
||||
"google/gemini-pro-orchestrator-argon": "gemini-4-argon",
|
||||
@@ -76,17 +85,20 @@ func TestAntigravityOrchestratorIDsPricedAsTheirModel(t *testing.T) {
|
||||
t.Errorf("PricedName(%q) = %q, want %q", id, got, model)
|
||||
}
|
||||
}
|
||||
// the models themselves, and another vendor's, keep their own price
|
||||
// the models themselves, under agy's and the app's routes too, and
|
||||
// another vendor's, keep their own price
|
||||
for id, w := range map[string]catalog.Price{
|
||||
"gemini-4-argon": want["gemini-4-argon"], "gemini-4-carbon": want["gemini-4-carbon"],
|
||||
"gpt-5.1-codex": {Input: 1.25, Output: 10},
|
||||
"gemini-4-neon": want["gemini-4-neon"], "agy-cli/gemini-4-neon-high": want["gemini-4-neon"],
|
||||
"antigravity/gemini-4-neon-low": want["gemini-4-neon"],
|
||||
"gpt-5.1-codex": {Input: 1.25, Output: 10},
|
||||
} {
|
||||
if pr, ok := MakerPrice(id); !ok || !samePrice(pr, w) {
|
||||
t.Errorf("MakerPrice(%q) = %+v, %v; want %+v", id, pr, ok, w)
|
||||
}
|
||||
}
|
||||
// a name only like a role is no role
|
||||
for _, id := range []string{"gemini-pro-orchestrator-neon", "gemini-flash-worker", "gemini-pro-orchestrator-argon-fast",
|
||||
for _, id := range []string{"gemini-pro-orchestrator-neon-fast", "my-gemini-pro-orchestrator-neon", "gemini-flash-worker", "gemini-pro-orchestrator-argon-fast",
|
||||
"my-gemini-pro-orchestrator-argon", "gemini-pro-orchestrator-g1", "gemini-pro-orchestrator-g1-ultra", "gemini-flash-worker-agy-ultra", "orchestrator", "gpt-5.1-codex-orchestrator"} {
|
||||
if pr, ok := MakerPrice(id); ok {
|
||||
t.Errorf("MakerPrice(%q) = %+v; want unpriced", id, pr)
|
||||
|
||||
@@ -3348,13 +3348,17 @@ func geminiTrialBase(l string) (string, bool) {
|
||||
// gemini-pro-orchestrator-g1-pro (`agy models` on a Google AI Pro account,
|
||||
// agy 1.5.9, in the agy-cli plugin's test/usage.mjs; mu33410 on X: agy's
|
||||
// Orchestrator had no cost) and Orchestrator (Carbon)
|
||||
// gemini-pro-orchestrator, as the app did before Argon. Only these ids: no
|
||||
// other name is read as one of them.
|
||||
// gemini-pro-orchestrator, as the app did before Argon. Orchestrator
|
||||
// (Neon) plans with Gemini 4 Neon (the same docs page, read 2026-11-19);
|
||||
// its id is gemini-pro-orchestrator-neon, beside -argon and -g1-pro in
|
||||
// the agy 1.5.10 binary's strings (mu33410 on X: Neon had no cost in agy).
|
||||
// Only these ids: no other name is read as one of them.
|
||||
var antigravityRoles = map[string]string{
|
||||
"gemini-pro-orchestrator": "gemini-4-carbon",
|
||||
"gemini-pro-orchestrator-carbon": "gemini-4-carbon",
|
||||
"gemini-pro-orchestrator-argon": "gemini-4-argon",
|
||||
"gemini-pro-orchestrator-g1-pro": "gemini-4-argon",
|
||||
"gemini-pro-orchestrator-neon": "gemini-4-neon",
|
||||
"gemini-flash-worker-agy": "gemini-4-hydrogen",
|
||||
}
|
||||
|
||||
|
||||
@@ -21,18 +21,19 @@ func TestPriceOfAntigravityOrchestratorRoles(t *testing.T) {
|
||||
os.WriteFile(catalog.CachePath(), []byte(`{"google":{"id":"google","models":{
|
||||
"gemini-4-argon":{"id":"gemini-4-argon","cost":{"input":2,"output":10,"cache_read":0.1}},
|
||||
"gemini-4-carbon":{"id":"gemini-4-carbon","cost":{"input":2.5,"output":12,"cache_read":0.25}},
|
||||
"gemini-4-hydrogen":{"id":"gemini-4-hydrogen","cost":{"input":1.5,"output":7.5,"cache_read":0.075}}}}}`), 0o644)
|
||||
"gemini-4-hydrogen":{"id":"gemini-4-hydrogen","cost":{"input":1.5,"output":7.5,"cache_read":0.075}},
|
||||
"gemini-4-neon":{"id":"gemini-4-neon","cost":{"input":3,"output":15,"cache_read":0.15}}}}}`), 0o644)
|
||||
catalog.Reset()
|
||||
t.Cleanup(catalog.Reset)
|
||||
for m, in := range map[string]float64{
|
||||
"gemini-pro-orchestrator-argon": 2, "gemini-pro-orchestrator-carbon": 2.5, "gemini-flash-worker-agy": 1.5,
|
||||
"gemini-pro-orchestrator-g1-pro": 2,
|
||||
"gemini-pro-orchestrator-g1-pro": 2, "gemini-pro-orchestrator-neon": 3,
|
||||
} {
|
||||
if pr, ok := priceOf(settings.Load(), m); !ok || pr.Input != in {
|
||||
t.Errorf("priceOf(%q) = %+v, %v; want input $%v", m, pr, ok, in)
|
||||
}
|
||||
}
|
||||
if pr, ok := priceOf(settings.Load(), "gemini-pro-orchestrator-neon"); ok {
|
||||
t.Errorf("priceOf(gemini-pro-orchestrator-neon) = %+v; want unpriced", pr)
|
||||
if pr, ok := priceOf(settings.Load(), "gemini-pro-orchestrator-krypton"); ok {
|
||||
t.Errorf("priceOf(gemini-pro-orchestrator-krypton) = %+v; want unpriced", pr)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,8 @@ func TestAntigravityOrchestratorCallsPriced(t *testing.T) {
|
||||
os.WriteFile(catalog.CachePath(), []byte(`{"google":{"id":"google","models":{
|
||||
"gemini-4-argon":{"id":"gemini-4-argon","cost":{"input":2,"output":10,"cache_read":0.1}},
|
||||
"gemini-4-carbon":{"id":"gemini-4-carbon","cost":{"input":2.5,"output":12,"cache_read":0.25}},
|
||||
"gemini-4-hydrogen":{"id":"gemini-4-hydrogen","cost":{"input":1.5,"output":7.5,"cache_read":0.075}}}}}`), 0o644)
|
||||
"gemini-4-hydrogen":{"id":"gemini-4-hydrogen","cost":{"input":1.5,"output":7.5,"cache_read":0.075}},
|
||||
"gemini-4-neon":{"id":"gemini-4-neon","cost":{"input":3,"output":15,"cache_read":0.15}}}}}`), 0o644)
|
||||
catalog.Reset()
|
||||
t.Cleanup(catalog.Reset)
|
||||
|
||||
@@ -40,6 +41,8 @@ func TestAntigravityOrchestratorCallsPriced(t *testing.T) {
|
||||
{Time: now.Add(-3 * time.Hour), Agent: "antigravity", Session: "a2", Model: "gemini-flash-worker-agy", Tokens: tok},
|
||||
// agy's Orchestrator (Argon) (mu33410 on X)
|
||||
{Time: now.Add(-4 * time.Hour), Agent: "agy", Session: "g1", Model: "gemini-pro-orchestrator-g1-pro", Tokens: tok},
|
||||
// agy's Orchestrator (Neon) (mu33410 on X)
|
||||
{Time: now.Add(-5 * time.Hour), Agent: "agy", Session: "g2", Model: "gemini-pro-orchestrator-neon", Tokens: tok},
|
||||
}
|
||||
}
|
||||
t.Cleanup(func() { LogCalls = old })
|
||||
@@ -50,10 +53,11 @@ func TestAntigravityOrchestratorCallsPriced(t *testing.T) {
|
||||
"gemini-pro-orchestrator-carbon": cost(2.5, 12, 0.25),
|
||||
"gemini-flash-worker-agy": cost(1.5, 7.5, 0.075),
|
||||
"gemini-pro-orchestrator-g1-pro": cost(2, 10, 0.1),
|
||||
"gemini-pro-orchestrator-neon": cost(3, 15, 0.15),
|
||||
}
|
||||
near := func(a, b float64) bool { return math.Abs(a-b) < 1e-9 }
|
||||
rows, total, _ := Ledger(Month, Filter{})
|
||||
if len(rows) != 4 {
|
||||
if len(rows) != 5 {
|
||||
t.Fatalf("rows %d", len(rows))
|
||||
}
|
||||
var sum float64
|
||||
@@ -68,11 +72,12 @@ func TestAntigravityOrchestratorCallsPriced(t *testing.T) {
|
||||
}
|
||||
// the agent's own view
|
||||
_, agent, _ := Ledger(Month, Filter{Agent: "antigravity"})
|
||||
if app := sum - want["gemini-pro-orchestrator-g1-pro"]; agent.Unpriced != 0 || !near(agent.Cost, app) {
|
||||
agyCost := want["gemini-pro-orchestrator-g1-pro"] + want["gemini-pro-orchestrator-neon"]
|
||||
if app := sum - agyCost; agent.Unpriced != 0 || !near(agent.Cost, app) {
|
||||
t.Errorf("antigravity: cost %v unpriced %d, want %v and 0", agent.Cost, agent.Unpriced, app)
|
||||
}
|
||||
_, agy, _ := Ledger(Month, Filter{Agent: "agy"})
|
||||
if g := want["gemini-pro-orchestrator-g1-pro"]; agy.Unpriced != 0 || !near(agy.Cost, g) {
|
||||
if g := agyCost; agy.Unpriced != 0 || !near(agy.Cost, g) {
|
||||
t.Errorf("agy: cost %v unpriced %d, want %v and 0", agy.Cost, agy.Unpriced, g)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user