Author’s note: breaking down the official rule that makes Antigravity CLI custom Agents burn through Gemini quota at 4x, how to get back to 1x, and the separate bill you get when you call gemini-4-neon on a pay-as-you-go basis through APIYI.
If you’re running custom Agents with the Antigravity CLI, you’ve probably run into the same thing recently: your weekly and 5-hour quotas drain way faster than they do with the default Agent. Most people’s first instinct is that a release introduced a bug, but the official answer is already in.
Start with the closing note an engineer posted in issue 1890 of the google-antigravity/antigravity-cli GitHub repo: this is intentional, not a regression. Custom Agents deduct quota at a higher multiplier. If you want the standard multiplier back, don’t pass --agent when you run, and put your instructions in a rules file — AGENTS.md, GEMINI.md — or in a skill instead.
This isn’t forum speculation, and there’s no hidden switch that “turns off 4x.” This article lays the rule out clearly, then offers two paths: one is getting back to 1x, the other is keeping your custom Agent but moving model invocations to pay-as-you-go billing. The latter is a separate bill — it doesn’t turn the official quota into anything unlimited.
What you’ll get out of this: by the end, you’ll be able to tell whether your quota consumption falls under this rule, know how to get back to 1x, and understand how to compare prices and write code when calling gemini-4-neon on a pay-as-you-go basis.

Antigravity Custom Agents and the 4x Quota: Key Points
| Key point | Details | What it means for you |
|---|---|---|
| It’s a rule, not a bug | The closing note on issue 1890 confirms this is intentional design, not a regression | Don’t wait for a fix patch — change how you use it |
| Which agents are affected | Files under .agents/agents, plugin agents, and their sub-agents | Default agents and built-in agents are unchanged |
| How to get back to 1x | Skip --agent and put the instructions in AGENTS.md, GEMINI.md, or a skill |
No extra cost involved |
| If you keep using custom agents | Switch model invocation to pay-as-you-go | It draws from your account balance and stops when the balance runs out |
| Version clues | Earlier reproduction in the issue: 1.5.17 shows 4.00x versus 1.5.16 | The 1.5.17 release notes don’t mention that multiplier |
Forum comparison data for the Antigravity 4x quota
On 2026-11-27, a post on the Google AI developer forum reproduced the problem on version 1.5.18 using Gemini 4 Neon (High). The poster had a custom agent and the default agent do the same piece of work, then compared quota consumption on both sides. To be clear, the numbers below are one comparison run by the poster on 1.5.18, not an official leaderboard published by Google.
| Metric | Custom agent | Default agent | Ratio (approx.) |
|---|---|---|---|
| Weekly quota consumption | 1.810% | 0.469% | 3.86x |
| 5-hour quota consumption | 7.24% | 1.87% | 3.87x |
| Estimated cost at Neon API pricing | about $0.543 | about $0.562 | close to 1x |
The most important row in this table is the last one. Estimated at the Neon API prices the poster used, the two sides actually cost almost the same — the custom agent side was even slightly lower. In other words, it’s not that token usage went up 4x; it’s that the same usage is billed at 4x the quota. The ratio didn’t land exactly on 4.00 because this was a real task with normal variance; the earlier version comparison in the issue gave exactly 4.00x.

Which Antigravity agents are billed at 4x quota
According to the closing note on issue 1890, the multiplier is determined by where the agent comes from, not by task complexity. You just need to figure out which category the currently running agent belongs to, and you can predict how quota will be deducted.
| Agent type | Source | Quota multiplier |
|---|---|---|
| Default agent | Run directly without --agent |
Standard (1x) |
| Built-in agent | Bundled with the CLI | Standard (1x) |
| Custom agent | Files in the .agents/agents directory | Higher multiplier |
| Plugin agent | Provided by a plugin | Higher multiplier |
| Sub-agents of the two types above | Spawned by a custom or plugin agent | Higher multiplier |
The sub-agent line is easy to overlook. If your custom agent spins up several sub-agents to work in parallel, they’re billed at the high multiplier too, so your quota will drain faster than you’d intuitively expect.
How to Get Antigravity Back to 1x Quota
If you mainly use custom Agents to make the model follow project conventions, code style, or a fixed workflow, most of those needs can actually be handled with rules files instead. The official path is clear enough—just migrate in the following order:
- Identify the core instructions in your custom Agent: pull together the system prompts, constraints, and workflow steps from the files under
.agents/agents. - Write them into rules files: project-wide conventions go in
AGENTS.md, and Gemini-specific instructions go inGEMINI.md. - Turn reusable workflows into skills: repeated operational steps are better placed in skills than in a standalone Agent.
- Drop
--agentat runtime: launch with the default Agent, and it’ll read the rules and skills above. - Compare quota consumption: run the same work for a while and see whether the weekly quota and 5-hour quota return to their previous pace.
After migrating, the main capability difference comes down to the “standalone Agent identity” layer. If you rely on a custom Agent’s independent tool configuration or sub-Agent orchestration, a rules file may not fully replace it—in that case, consider the pay-as-you-go option in the next section.
Switching Antigravity Custom Agents to Gemini Pay-As-You-Go Billing
Let’s be clear about the boundaries first: pay-as-you-go billing is based on your account balance, not the official weekly quota. It won’t increase Antigravity’s official quota, and it isn’t “no quota” either—once the balance runs out, it stops. The platform also has its own usage rules. What it solves is this: you still want to run custom Agent logic without having it eat into the official quota, so you route model invocations to a separate token-based billing account.
Check the gemini-4-neon Model and Pricing
The forum post uses Gemini 4 Neon. In APIYI’s (apiyi.com) model catalog, the corresponding model ID is gemini-4-neon. The endpoint supports both chat and gemini, and it’s grouped under Gemini_Reverse, Default, and SVIP. Note that it doesn’t have a separate details page—visiting the details URL returns a 404, so pricing is based on the catalog (data timestamp: 2026-12-01 00:51, UTC+8).
| Model ID | Input (USD/million tokens) | Output (USD/million tokens) | Cache read (USD/million tokens) | Available platform |
|---|---|---|---|---|
| gemini-4-neon | 3 | 15 | 0.15 | APIYI apiyi.com |
| gemini-4-argon | 4 | 20 | 0.2 | APIYI |
| gemini-4-carbon | 4 | 20 | 0.2 | APIYI |
| gemini-4-hydrogen | 1.5 | 7.5 | 0.075 | APIYI |
A few key points from the table:
- Output is 5x more expensive than input: gemini-4-neon costs 15 for output versus 3 for input. For agent-style tasks, if you have the model generate large chunks of code, output costs will be the main expense.
- Cache reads are only 5% of the input price: 0.15 versus 3. For long-context agent workflows that repeatedly reference the same codebase, costs drop significantly once cache hits occur.
- Adjacent models can be used for routing: Lightweight subtasks can use gemini-4-hydrogen, at half neon’s unit price. For steps with higher quality requirements, evaluate argon or carbon instead.
Here’s a simple arithmetic example: a workload consumes 1 million input tokens and 200,000 output tokens, with no cache. Priced at gemini-4-neon, that’s 3 + 0.2 × 15 = $6. Actual amounts depend on your token usage and billing.
gemini-4-neon: Minimal Invocation Example
APIYI provides an OpenAI-compatible interface. The base URL is https://api.apiyi.com/v1 — just set the model ID to gemini-4-neon and you’re good. Here’s the shortest runnable snippet:
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.apiyi.com/v1", # APIYI OpenAI-compatible endpoint
)
resp = client.chat.completions.create(
model="gemini-4-neon",
messages=[{"role": "user", "content": "检查这段函数的边界条件"}],
)
print(resp.choices[0].message.content)
print(resp.usage) # Reconcile against usage instead of the official quota percentage
View the full code with cost estimation
The wrapper below estimates the cost of each call using the unit prices from the master price sheet. Prices live in constants, so when they change you only edit one place.
from openai import OpenAI
# Unit price: USD per million tokens, per the APIYI model price sheet (data as of 2026-12-01)
PRICES = {
“gemini-4-neon”: {“input”: 3.0, “output”: 15.0, “cache_read”: 0.15},
“gemini-4-hydrogen”: {“input”: 1.5, “output”: 7.5, “cache_read”: 0.075},
}
client = OpenAI(
api_key=”YOUR_API_KEY”,
base_url=”https://api.apiyi.com/v1″,
)
def estimate_cost(model, usage):
p = PRICES[model]
details = getattr(usage, “prompt_tokens_details”, None)
cached = getattr(details, “cached_tokens”, 0) or 0
fresh_input = usage.prompt_tokens – cached
cost = (
fresh_input * p[“input”]
+ cached * p[“cache_read”]
+ usage.completion_tokens * p[“output”]
) / 1_000_000
return round(cost, 6)
def run_agent_step(prompt, system=None, model=”gemini-4-neon”):
messages = []
if system:
messages.append({“role”: “system”, “content”: system})
messages.append({“role”: “user”, “content”: prompt})
resp = client.chat.completions.create(model=model, messages=messages)
cost = estimate_cost(model, resp.usage)
return resp.choices[0].message.content, cost
if __name__ == “__main__”:
text, cost = run_agent_step(
“根据项目约定重构 utils 模块”,
system=”你是代码审查 Agent,遵守 AGENTS.md 中的约定”,
)
print(text)
print(f”本步估算花费:{cost} 美元”)
🚀 Quick start: We suggest signing up at APIYI apiyi.com first and running the minimal example above with a new-user trial quota — confirm that
gemini-4-neonreturns normally and theusagefield matches the pricing. Once that checks out, migrate your whole custom Agent logic over.
Plug APIYI into Your Agent Workflow
The key question is whether your client can specify a custom Base URL. If the Antigravity version you’re using doesn’t have a field for a custom Base URL in its interface, don’t go hunting for a setting that doesn’t exist. You can take one of these two paths:
- Switch to a client that supports custom URLs: migrate your custom Agent’s system prompt and tool logic to a client like this, set the Base URL to APIYI’s endpoint, and set the model to
gemini-4-neon. - Connect APIYI through Magpie: use Magpie as an integration layer so model requests go through your usage-based account.
Either approach means this portion of calls no longer counts against Antigravity’s official quota; instead, they’re deducted from your APIYI balance. The official quota still works under the original rules, and the default Agent remains at 1× as usual.

How to Choose Between the Two Approaches
| Your Situation | Recommended Approach | Which Ledger It Draws From |
|---|---|---|
| Your custom agent is just a pile of prompts and conventions | Migrate to AGENTS.md / GEMINI.md / skills, drop --agent |
Official quota, 1x |
| You depend on standalone tool configurations or sub-agent orchestration | Move the logic to a client that supports custom endpoints, use pay-as-you-go | APIYI account balance |
| Official quota is sufficient; you only run a custom agent occasionally | Accept the 4x, plan your quota pacing | Official quota, higher multiplier |
| Large-batch, long-context agent tasks | Pay-as-you-go, use cache-read pricing to cut costs | APIYI account balance |
💡 Recommendation: The two ledgers can coexist. Use the default agent for everyday interactions and take advantage of the official 1x quota, and route heavy custom workflows through pay-as-you-go, tracking them separately in your APIYI apiyi.com billing so you can see exactly how much each part costs.
FAQ
Q1: Is the 4x quota consumption for Antigravity custom agents a bug?
No. The closing note on GitHub issue 1890 states this is intentional, not a regression. Custom agents, plugin agents, and their sub-agents are charged quota at a higher multiplier, while the default agent and built-in agents are unchanged.
Q2: Is there a switch to turn off the 4x?
There is no such switch in any of the reference materials. The only official method is to omit `–agent` at runtime and put the instructions in AGENTS.md, GEMINI.md, or skills.
Q3: Which version introduced the 4x?
Earlier reproductions in the issue show that in 1.5.17 compared with 1.5.16, custom agent consumption becomes exactly 4.00x, while the default agent is identical across both versions. The 1.5.17 release notes don’t mention this multiplier. A forum post dated 2026-11-27 reproduced the same behavior on 1.5.18.
Q4: Can the forum’s 1.810% and 0.469% be treated as official data?
No. That’s a one-off comparison the poster ran on 1.5.18 with Gemini 4 Neon (High) to illustrate the quota deduction ratio. Your own task consumption will vary with the work involved, but the ratio can serve as a reference.
Q5: How do I call gemini-4-neon via pay-as-you-go API?
Three steps:
1. Register at APIYI apiyi.com and get an API key
2. Set the Base URL to `https://api.apiyi.com/v1` and the model ID to `gemini-4-neon`
3. Validate with the minimal example in this article, then check your spending using the `usage` field
Q6: Does switching to pay-as-you-go mean there are no limits?
No. Pay-as-you-go deducts from your account balance, and calls stop once the balance runs out. It’s a separate ledger from official quota. We recommend monitoring your balance in the APIYI dashboard and using the cost estimation function in the full code to account for each agent step.
Q7: Is pay-as-you-go always cheaper than using official quota?
You can’t compare them that way. Official quota and pay-as-you-go billing use different metering, so whether it’s worthwhile depends on whether your quota is sufficient, the token scale of your tasks, and your cache hit rate. The value of pay-as-you-go is that costs are predictable and it doesn’t eat into your official quota — not a guarantee that it’s cheaper.
—
## Antigravity Custom Agent Quotas: Key Takeaways
– **4x is the official rule**: Issue 1890 explicitly states this is intentional design, not a version rollback.
– **The impact scope is clear**: Custom agents, plugin agents, and their subagents are affected.
– **Going back to 1x is simple**: Remove `–agent` and put the instructions in AGENTS.md, GEMINI.md, or a skill.
– **Costs haven’t gone up**: Forum comparisons show token spend is similar; only more quota is deducted.
– **Pay-as-you-go is a separate ledger**: It deducts from your account balance and stops when the balance runs out—it’s not unlimited.
– **Match the model and pricing**: gemini-4-neon is $3 for input, $15 for output, and $0.15 for cached reads per million tokens.
– **Access depends on the client**: Use a client that supports a custom Base URL, or connect to APIYI through Magpie.
—
## Summary
There are three key points to Antigravity custom agents consuming 4x quota:
1. **Understand the rule first**: This is an intentionally set multiplier by the official team. Waiting for a patch is pointless, and there’s no switch to turn it off.
2. **Migrate when you can**: If your custom agent is just prompts and conventions, move them into rule files and skills and remove `–agent` to get back to 1x.
3. **If you must keep a custom agent, switch to pay-as-you-go**: Model invocation then uses your account balance billed by token, accounted separately from official quota.
If you decide to go the pay-as-you-go route, it’s best to run a few small tasks with gemini-4-neon first, check `usage` against the rate card, and then decide which steps to migrate. You can quickly verify through APIYI’s unified interface at apiyi.com, and the same Key also makes it easy to run split tests between adjacent models such as neon and hydrogen.
## 📚 References
1. **Google AI Developer Forum post**: Antigravity CLI custom agents use 4x the Gemini quota of the default agent (reproduced on 1.5.18)
– Link: `discuss.ai.google.dev/t/antigravity-cli-custom-agents-agent-use-4x-the-gemini-quota-of-the-default-agent-reproduced-on-1-5-18/206231`
– Notes: Source for one of the poster’s comparison data points on 1.5.18
2. **GitHub – antigravity-cli issue 1890**: Official explanation for closing the issue
– Link: `github.com/google-antigravity/antigravity-cli`
– Notes: Confirms the multiplier is intentional by design, and describes how to get back to the standard multiplier
3. **APIYI model summary table**: gemini-4 series pricing and endpoints
– Link: `docs.apiyi.com/models.md`
– Notes: gemini-4-neon has no standalone detail page, so the summary table is the authoritative source for pricing
—
> **Author**: APIYI Technical Team
> **Technical discussion**: Feel free to contact us via the APIYI official website homepage. For more models and integration guidance, check out the documentation center.
