Antigravity answers a system prompt that reads as Claude Code's or the
Claude Agent SDK's with a 429 "Resource has been exhausted", whatever
quota is left (xzplzpl on X). Tried with a real account, it matches
"x-anthropic-billing-header:" and "You are a Claude agent, built on
Anthropic's Claude Agent SDK", and lets the same prompt through with a
U+200B inside each. This middleware puts one after the first letter of
both words, in system text only (Anthropic system, Chat/Responses system
and developer messages, Responses instructions, Gemini
systemInstruction), and only in what an Antigravity account is sent: it
uses magpie's new onProvider hook (v0.1.1283), so a Claude subscription
or any other provider in the same routing group gets the prompt as the
agent wrote it. Options: extraWords, accounts, off. The README says the
ban risk and what happens if Google changes its match. After hexiaolv's
magpie-antigravity-cloak (MIT), which changes every request.
scripts/middleware.mjs: a case's "provider" runs the request on through
onProvider with ctx.provider, and expect_request is that try's body.
Run:
- HOME=$(mktemp -d) bun test: 1783 pass, 0 fail (the package's 12 cases
among them). bun scripts/check.mjs: every package ok.
- Real use: magpie built from e44b9aef3 in a sandbox HOME, a real
Antigravity account, this package added from its folder. Claude Code
2.1.302 `claude -p` on antigravity/gemini-3-flash answered; with
{"off": true} the same run got the 400. /v1/messages with the billing
line, the SDK line and Claude Code's three system blocks: 200 each on,
400 each off.
15 lines
706 B
JSON
15 lines
706 B
JSON
{
|
|
"name": "@magpie-community/middleware-antigravity-cloak",
|
|
"version": "0.1.0",
|
|
"description": "magpie gateway middleware: Antigravity stops turning Claude Code's and the Claude Agent SDK's system prompts away, and no other provider's request is changed",
|
|
"type": "module",
|
|
"files": ["antigravity-cloak.middleware.js", "README.md"],
|
|
"keywords": ["magpie", "magpie-middleware", "antigravity", "claude-code", "llm-gateway"],
|
|
"license": "MIT",
|
|
"repository": { "type": "git", "url": "git+https://github.com/magpie-community/plugins.git", "directory": "packages/antigravity-cloak" },
|
|
"magpie": {
|
|
"middleware": "./antigravity-cloak.middleware.js",
|
|
"options": { "extraWords": [] }
|
|
}
|
|
}
|