From 0b64846bf73f4d1be2affd53c4cc398196c0db8a Mon Sep 17 00:00:00 2001 From: yetone Date: Sat, 14 Nov 2026 09:05:18 +0800 Subject: [PATCH] gateway: Antigravity's cloak says omp's RFC 2119 line as "key words", and finds every turned-away line in any white space MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit eric_li8983 (X, 11-14): oh-my-pi (omp) on Windows with an Antigravity account got "Antigravity answered 429 to this system prompt" for omp's first line, "RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL." (omp 18.20.0's system-prompt.md, advisor/system.md and live-instructions.md all start with it, byte for byte). The built-in Antigravity path didn't know the line at all, and matched the other turned-away lines only with single spaces. On a real account on 11-14, Google's check turned omp's line away wrapped with LF or CRLF, indented, with a tab, two spaces or a no-break space, so a literal match misses copies that are refused. Now: - agTurnedAway has omp's line, and each line is matched in any case with any run of white space between its words (agLineRe, agSpace: JavaScript's \s, as the plugin matches), Codex's and Hermes' lines too. - omp's line goes as "RFC 2119 key words: …" (RFC 2119's own term), its white space as it was, rather than broken up by zero-width spaces: a broken-up copy was still refused 1 to 3 times in 10 (U+200B, U+2060 or a soft hyphen alike), "key words" 0 in 30 (plugin numbers below). - A refusal of it gets its own hint (antigravityRFCHint, word for word the plugin's RFC_HINT), shown on the Routing page (AG_RFC) in en, zh, zh-TW, ja and de. The plugin half is magpie-community/plugins 4170d0e8 (antigravity 0.1.11, agy-cli 0.1.40, antigravity-cloak 0.1.6); the next commit raises the mover min to it. Real account (sandbox HOME, copy of the live Antigravity account, gemini-3.8-flash, sequential, through the plugin's same rewrite): omp's literal prompt 10/10, the full template 10/10, the line wrapped after "REQUIRED," 10/10. Zero-width before it: 3, 1 and 5 bare 429s in 12 each. Run at this tree (rebased on eb1b83000), on WSL magpie-desktop (mote's suite lock was held by another session's full run, mica's disk is full): go test -tags nogui -count=1 -timeout 45m ./...: 98 packages ok, one red, internal/usage TestRequestStateKeptAcrossACatalogFetchedAgain ("a catalog that changed kept the price key"), red 3 of 3 alone on Linux: that is #6572 (catalog CacheKey and a same-mtime write), not this change. gofmt -l clean; GOOS=windows go vet ./internal/gateway ./internal/gui on xiaomi-gpu, exit 0; go vet ./... on Linux, with -tags nogui, exit 0 (without it the GUI package needs webkitgtk, which the distro lacks). GUI: routing-ag-turned-away (now 3 agents x 5 languages, chromium and webkit) and i18n-keys, i18n-en-no-cjk: 38 pass, 0 fail. Broken by hand: TestAntigravityCloakOmpLine and TestAntigravityCloakLineWrappedOrWidened against origin/main's codeassist.go: both red (line went whole, 9 copies not taken for turned away, hint wrong). Not tried: omp itself end to end on Windows; the gateway's built-in path against the real account (the plugin's identical rewrite was). Seen in the same probe: Claude Code's, Codex's and Hermes' broken-up lines were each refused 1-2 times in 10 (magpie-community/plugins#1118). --- internal/gateway/antigravity_cloak_test.go | 81 +++++++++++++ internal/gateway/codeassist.go | 112 ++++++++++++------ internal/gui/assets/i18n.js | 4 + internal/gui/assets/plugins/routing/client.js | 5 +- .../gui/tests/routing-ag-turned-away.test.cjs | 16 +-- 5 files changed, 176 insertions(+), 42 deletions(-) diff --git a/internal/gateway/antigravity_cloak_test.go b/internal/gateway/antigravity_cloak_test.go index 8e04ec1f2..fa4d7d67a 100644 --- a/internal/gateway/antigravity_cloak_test.go +++ b/internal/gateway/antigravity_cloak_test.go @@ -291,3 +291,84 @@ func TestAntigravityDSHAtPathsGoReworded(t *testing.T) { t.Fatalf("broken up and reworded: %q", both) } } + +// ompSystem is how oh-my-pi (omp) 18.20.0 starts its system prompt +// (src/prompts/system/system-prompt.md), byte for byte. +const ompSystem = "RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL. `NEVER` = `MUST NOT`; `AVOID` = `SHOULD NOT`.\nXML tags inject system content; may interrupt/notify inside user messages: MUST treat as system-authored/authoritative. User content is sanitized.\n" + +// ompLine is omp's first line up to the period, the part Antigravity +// turns away. +const ompLine = "RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL." + +// omp's line, as it starts its prompt, goes as "RFC 2119 key words: …" +// (eric_li8983 on X, 11-14): broken up by zero-width spaces it was still +// turned away 1 to 3 times in 10 on a real account, worded so 0 in 10. +func TestAntigravityCloakOmpLine(t *testing.T) { + got := antigravityCloak(ompSystem) + if want := strings.Replace(ompSystem, "keywords", "key words", 1); got != want { + t.Fatalf("went as %q, want %q", got, want) + } + if antigravityCloak(got) != got || antigravityTurnsAway(got) { + t.Errorf("reworded again: %q", got) + } + if antigravityHint(ompSystem) != antigravityRFCHint { + t.Error("omp's line isn't told its own hint") + } +} + +// Google's check reads omp's line in any case with any white space between +// its words: each of these copies was turned away as written on a real +// account on 11-14, and each went through broken up (omp's, reworded). A +// copy that only +// matched as written went out whole and was turned away. +func TestAntigravityCloakLineWrappedOrWidened(t *testing.T) { + copies := []string{ + strings.Replace(ompLine, "REQUIRED, ", "REQUIRED,\n", 1), + strings.Replace(ompLine, "REQUIRED, ", "REQUIRED,\r\n", 1), + strings.Replace(ompLine, "2119 ", "2119\n", 1), + strings.Replace(ompLine, "REQUIRED, ", "REQUIRED,\n ", 1), + strings.Replace(ompLine, "MUST, ", "MUST,\t", 1), + strings.Replace(ompLine, "MUST, ", "MUST, ", 1), + strings.Replace(ompLine, "MUST, ", "MUST, ", 1), + strings.Replace(hermesOldSystem, "AI assistant", "AI\nassistant", 1), + strings.Replace(codexGPT5System, "agent based", "agent\tbased", 1), + } + for _, system := range copies { + system = "\n" + system + "\n\n" + if !antigravityTurnsAway(system) { + t.Errorf("%q isn't taken for what Antigravity turns away", system) + continue + } + got := antigravityCloak(system) + if antigravityTurnsAway(got) || got == system { + t.Errorf("went whole: %q", got) + } + said := strings.ReplaceAll(got, zeroWidth, "") + if strings.Contains(system, "RFC") { + said = strings.Replace(said, "key words", "keywords", 1) + if strings.Contains(got, zeroWidth) { + t.Errorf("omp's line broken up, not reworded: %q", got) + } + } + if said != system { + t.Errorf("more than its words changed: %q", got) + } + if antigravityCloak(got) != got { + t.Errorf("broken again: %q", got) + } + } + if antigravityHint(copies[1]) != antigravityRFCHint || antigravityHint(copies[7]) != antigravityHermesHint || antigravityHint(copies[8]) != antigravityCodexHint { + t.Error("a wrapped copy isn't told its own hint") + } + // what went through as written on the same account goes as written + for _, system := range []string{ + strings.TrimSuffix(ompLine, "."), + strings.Replace(ompLine, "RFC 2119", "RFC2119", 1), + strings.ReplaceAll(ompLine, ", ", ","), + "RFC 2119 applies to MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL.", + } { + if got := antigravityCloak(system); got != system { + t.Errorf("%q went as %q", system, got) + } + } +} diff --git a/internal/gateway/codeassist.go b/internal/gateway/codeassist.go index a4b20c01f..841952cfc 100644 --- a/internal/gateway/codeassist.go +++ b/internal/gateway/codeassist.go @@ -8,6 +8,7 @@ import ( "maps" "net/http" "reflect" + "regexp" "slices" "strconv" "strings" @@ -57,9 +58,8 @@ func accountAgent(p provider.Provider) string { // when the user has the prompt sent as written, or Google turns away one // that was broken up, so no one chases a quota that isn't spent. func antigravityTurnsAway(system string) bool { - low := strings.ToLower(system) - for _, line := range agTurnedAway { - if strings.Contains(low, line) { + for _, re := range agTurnedAwayRes { + if re.MatchString(system) { return true } } @@ -103,20 +103,76 @@ var agTurnedAway = []string{ "you are codex, an agent based on gpt-5", "you are codex, a coding agent based on gpt-5", "hermes agent, an intelligent ai assistant created by nous research", + agRFCLine, +} + +// agRFCLine is the line oh-my-pi (omp) starts its system prompt with, and +// its advisor's and live mode's (omp 18.20.0), which Antigravity turns away +// as it does the others (eric_li8983 on X, 11-14). +const agRFCLine = "rfc 2119 keywords: must, required, should, recommended, may, optional." + +// agRFCSaidAs is how omp's line goes: "key words", RFC 2119's own term, +// for its "keywords". A copy broken up by zero-width spaces, like the other +// lines, was turned away 1 to 3 times in 10 on a real account on 11-14, +// with U+200B, U+2060 or a soft hyphen alike, while "key words" went +// through 10 of 10, and the model reads the same rule in it. +var agRFCSaidAs = lazyre.New(`(?i)(key)(words)`) + +// agSpace is a run of white space as Google's check reads it: on a real +// account on 11-14 omp's line was turned away just as well wrapped after +// any comma, with CRLF, a tab, two spaces or a no-break space between two +// of its words, so only a match that allows these finds every copy. Go's +// \s is ASCII only; this is JavaScript's \s, which the antigravity plugin +// matches with. U+200B is not in it, so a line already broken up isn't +// one any more. +const agSpace = `[\s\v\p{Zs}\x{2028}\x{2029}\x{feff}]+` + +// agLineRe matches line in any case with any run of white space between +// its words. +func agLineRe(line string) *lazyre.RE { + words := strings.Split(line, " ") + for i, w := range words { + words[i] = regexp.QuoteMeta(w) + } + return lazyre.New("(?i)" + strings.Join(words, agSpace)) +} + +// agTurnedAwayRes are agTurnedAway's lines as agLineRe matches them, in +// the same order. +var agTurnedAwayRes = func() []*lazyre.RE { + res := make([]*lazyre.RE, len(agTurnedAway)) + for i, line := range agTurnedAway { + res[i] = agLineRe(line) + } + return res +}() + +// agSays says whether system carries line, one of agTurnedAway's. +func agSays(system, line string) bool { + return agSaysRe(line).MatchString(system) +} + +// agSaysRe is line's agTurnedAwayRes; line is one of agTurnedAway's. +func agSaysRe(line string) *lazyre.RE { + return agTurnedAwayRes[slices.Index(agTurnedAway, line)] } // antigravityTurnsCodexAway says whether system carries Codex's GPT-5 // identity line that Antigravity turns away. func antigravityTurnsCodexAway(system string) bool { - low := strings.ToLower(system) - return strings.Contains(low, "you are codex, an agent based on gpt-5") || - strings.Contains(low, "you are codex, a coding agent based on gpt-5") + return agSays(system, "you are codex, an agent based on gpt-5") || + agSays(system, "you are codex, a coding agent based on gpt-5") } // antigravityTurnsHermesAway says whether system carries Hermes Agent's // earlier default persona that Antigravity turns away. func antigravityTurnsHermesAway(system string) bool { - return strings.Contains(strings.ToLower(system), "hermes agent, an intelligent ai assistant created by nous research") + return agSays(system, "hermes agent, an intelligent ai assistant created by nous research") +} + +// antigravityTurnsRFCAway says whether system carries omp's RFC 2119 line. +func antigravityTurnsRFCAway(system string) bool { + return agSays(system, agRFCLine) } // agReworded are paragraphs Antigravity takes but answers badly, each with @@ -156,27 +212,19 @@ const zeroWidth = "\u200b" // (a real account, Claude Code 2.1.316's prompt, @shzutbi1 on X), while the // same lines with two breaks in every word were answered. // A line already broken up (the antigravity-cloak plugin's) isn't one any -// more and is left alone. +// more and is left alone. omp's RFC 2119 line is said as agRFCSaidAs says +// instead, with every white space in it as it was. func antigravityCloak(system string) string { if !antigravityTurnsAway(system) { return system } - // lower-casing keeps every byte offset here: each line is ASCII, and - // a match is found in low at the offset it has in system only while - // the two are the same length, which ToLower can change outside ASCII - low := strings.ToLower(system) - if len(low) != len(system) { - low = asciiLower(system) - } + system = agSaysRe(agRFCLine).ReplaceAllStringFunc(system, func(m string) string { + return agRFCSaidAs.ReplaceAllString(m, "$1 $2") + }) var at []int - for _, line := range agTurnedAway { - for i := 0; ; { - j := strings.Index(low[i:], line) - if j < 0 { - break - } - at = append(at, agBreaks(low, i+j, i+j+len(line))...) - i += j + len(line) + for _, re := range agTurnedAwayRes { + for _, m := range re.FindAllStringIndex(system, -1) { + at = append(at, agBreaks(system, m[0], m[1])...) } } slices.Sort(at) @@ -218,17 +266,6 @@ func agAlnum(c byte) bool { return 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z' || '0' <= c && c <= '9' } -// asciiLower lower-cases only ASCII letters, keeping every byte where it is. -func asciiLower(s string) string { - b := []byte(s) - for i, c := range b { - if 'A' <= c && c <= 'Z' { - b[i] = c + 'a' - 'A' - } - } - return string(b) -} - // antigravityRefuses is what Antigravity says when it turns such a request // away, on either shape the refusal arrives in: a 429's body, or the reply's // own error event, where the Code Assist decoder keeps the message and leaves @@ -289,6 +326,10 @@ const antigravityCodexHint = "Antigravity answers this 429 to Codex's own system // persona (routing/client.js AG_HERMES). const antigravityHermesHint = "Antigravity answers this 429 to Hermes Agent's earlier default persona (its SOUL.md) whatever quota is left, so it is not a quota and waiting won't help; Hermes' current default persona goes through, so put it in SOUL.md, or use another provider for these chats" +// antigravityRFCHint is the hint for omp's RFC 2119 line, word for word +// what the antigravity plugin says (RFC_HINT; routing/client.js AG_RFC). +const antigravityRFCHint = "Antigravity answers this 429 to the line \"RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL.\" that starts oh-my-pi (omp)'s system prompt, and to any prompt that has it, whatever quota is left, so it is not a quota and waiting won't help; magpie sends that line as \"RFC 2119 key words: …\", which goes through, so this one came from a copy of it that was worded another way" + // antigravityHint is the hint for what Antigravity turned away with system // as its system instruction. func antigravityHint(system string) string { @@ -298,6 +339,9 @@ func antigravityHint(system string) string { if antigravityTurnsHermesAway(system) { return antigravityHermesHint } + if antigravityTurnsRFCAway(system) { + return antigravityRFCHint + } return antigravityTurnedAwayHint } diff --git a/internal/gui/assets/i18n.js b/internal/gui/assets/i18n.js index f06348fa4..774874109 100644 --- a/internal/gui/assets/i18n.js +++ b/internal/gui/assets/i18n.js @@ -4338,6 +4338,7 @@ const I18N = { "Antigravity answers this 429 to the system prompt of Claude Code and the Claude Agent SDK (Claude Desktop's chats) whatever quota is left, so it is not a quota and waiting won't help; use another provider for these chats, or put one after Antigravity in a routing group": "Antigravity 对 Claude Code 和 Claude Agent SDK(Claude Desktop 的对话)的系统提示词都会回这个 429,与剩余额度无关,所以这不是额度用尽,等待也不会好;请用其他供应商处理这些对话,或在路由分组中把另一个供应商排在 Antigravity 之后", "Antigravity answers this 429 to Codex's own system prompt for GPT-5 models whatever quota is left, so it is not a quota and waiting won't help; a Codex chat begun on a GPT model keeps that prompt after a model switch or a fork, so start a new chat on this model": "Antigravity 对 Codex 给 GPT-5 模型的系统提示词都会回这个 429,与剩余额度无关,所以这不是额度用尽,等待也不会好;在 GPT 模型上开始的 Codex 对话切换模型或分叉后仍带着这段提示词,请在这个模型上新开一个对话", "Antigravity answers this 429 to Hermes Agent's earlier default persona (its SOUL.md) whatever quota is left, so it is not a quota and waiting won't help; Hermes' current default persona goes through, so put it in SOUL.md, or use another provider for these chats": "Antigravity 对 Hermes Agent 旧版默认人设(SOUL.md)都会回这个 429,与剩余额度无关,所以这不是额度用尽,等待也不会好;Hermes 当前的默认人设可以通过,请把它写进 SOUL.md,或为这些对话换用其他提供商", + "Antigravity answers this 429 to the line \"RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL.\" that starts oh-my-pi (omp)'s system prompt, and to any prompt that has it, whatever quota is left, so it is not a quota and waiting won't help; magpie sends that line as \"RFC 2119 key words: …\", which goes through, so this one came from a copy of it that was worded another way": "Antigravity 对 oh-my-pi(omp)系统提示词开头的 \"RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL.\" 这一行,以及带有这一行的任何提示词,都会回这个 429,与剩余额度无关,所以这不是额度用尽,等待也不会好;magpie 会把这一行改成 \"RFC 2119 key words: …\" 发出,这样可以通过,所以这次来自这一行换了写法的副本", "the provider's network firewall blocked requests from this IP; wait a while, or switch to another network or proxy": "供应商的网络防火墙拦截了此 IP 的请求;请稍后再试,或更换网络或代理", "ZCode's risk control blocked this account for unusual activity (code 3012); it rests, and the group's other providers are used. If the ZCode app fails on this account too, only ZCode support can lift the block": "ZCode 风控因异常行为封禁了这个账号(代码 3012);它会暂停使用,改用此分组中的其他供应商。如果用这个账号在 ZCode 官方 App 里也失败,只有 ZCode 客服能解除", "rate limited": "限流", @@ -9566,6 +9567,7 @@ const I18N = { "Antigravity answers this 429 to the system prompt of Claude Code and the Claude Agent SDK (Claude Desktop's chats) whatever quota is left, so it is not a quota and waiting won't help; use another provider for these chats, or put one after Antigravity in a routing group": "Antigravity 對 Claude Code 和 Claude Agent SDK(Claude Desktop 的對話)的系統提示詞都會回這個 429,與剩餘額度無關,所以這不是額度用盡,等待也不會好;請用其他供應商處理這些對話,或在路由分組中把另一個供應商排在 Antigravity 之後", "Antigravity answers this 429 to Codex's own system prompt for GPT-5 models whatever quota is left, so it is not a quota and waiting won't help; a Codex chat begun on a GPT model keeps that prompt after a model switch or a fork, so start a new chat on this model": "Antigravity 對 Codex 給 GPT-5 模型的系統提示詞都會回這個 429,與剩餘額度無關,所以這不是額度用盡,等待也不會好;在 GPT 模型上開始的 Codex 對話切換模型或分叉後仍帶著這段提示詞,請在這個模型上新開一個對話", "Antigravity answers this 429 to Hermes Agent's earlier default persona (its SOUL.md) whatever quota is left, so it is not a quota and waiting won't help; Hermes' current default persona goes through, so put it in SOUL.md, or use another provider for these chats": "Antigravity 對 Hermes Agent 舊版預設人設(SOUL.md)都會回這個 429,與剩餘額度無關,所以這不是額度用盡,等待也不會好;Hermes 目前的預設人設可以通過,請把它寫進 SOUL.md,或為這些對話改用其他供應商", + "Antigravity answers this 429 to the line \"RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL.\" that starts oh-my-pi (omp)'s system prompt, and to any prompt that has it, whatever quota is left, so it is not a quota and waiting won't help; magpie sends that line as \"RFC 2119 key words: …\", which goes through, so this one came from a copy of it that was worded another way": "Antigravity 對 oh-my-pi(omp)系統提示詞開頭的 \"RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL.\" 這一行,以及帶有這一行的任何提示詞,都會回這個 429,與剩餘額度無關,所以這不是額度用盡,等待也不會好;magpie 會把這一行改成 \"RFC 2119 key words: …\" 送出,這樣可以通過,所以這次來自這一行換了寫法的副本", "the provider's network firewall blocked requests from this IP; wait a while, or switch to another network or proxy": "供應商的網路防火牆攔截了此 IP 的請求;請稍後再試,或更換網路或代理", "ZCode's risk control blocked this account for unusual activity (code 3012); it rests, and the group's other providers are used. If the ZCode app fails on this account too, only ZCode support can lift the block": "ZCode 風控因異常行為封鎖了這個帳號(代碼 3012);它會暫停使用,改用此分組中的其他供應商。如果用這個帳號在 ZCode 官方 App 裡也失敗,只有 ZCode 客服能解除", "rate limited": "限流", @@ -14813,6 +14815,7 @@ const I18N = { "Antigravity answers this 429 to the system prompt of Claude Code and the Claude Agent SDK (Claude Desktop's chats) whatever quota is left, so it is not a quota and waiting won't help; use another provider for these chats, or put one after Antigravity in a routing group": "Antigravity は Claude Code と Claude Agent SDK(Claude Desktop のチャット)のシステムプロンプトに対し、残りクォータに関係なくこの 429 を返します。クォータ切れではなく、待っても解決しません。これらのチャットには別のプロバイダを使うか、ルーティンググループで Antigravity の後に別のプロバイダを置いてください", "Antigravity answers this 429 to Codex's own system prompt for GPT-5 models whatever quota is left, so it is not a quota and waiting won't help; a Codex chat begun on a GPT model keeps that prompt after a model switch or a fork, so start a new chat on this model": "Antigravity は Codex の GPT-5 モデル向けシステムプロンプトに対し、残りクォータに関係なくこの 429 を返します。クォータ切れではなく、待っても解決しません。GPT モデルで始めた Codex のチャットは、モデルを切り替えたりフォークしたりしてもそのプロンプトを持ち続けるので、このモデルで新しいチャットを始めてください", "Antigravity answers this 429 to Hermes Agent's earlier default persona (its SOUL.md) whatever quota is left, so it is not a quota and waiting won't help; Hermes' current default persona goes through, so put it in SOUL.md, or use another provider for these chats": "Antigravity は Hermes Agent の以前のデフォルトのペルソナ(SOUL.md)に対し、残りクォータに関係なくこの 429 を返します。クォータ切れではなく、待っても解決しません。Hermes の現在のデフォルトのペルソナは通るので、それを SOUL.md に書くか、これらのチャットには別のプロバイダーを使ってください", + "Antigravity answers this 429 to the line \"RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL.\" that starts oh-my-pi (omp)'s system prompt, and to any prompt that has it, whatever quota is left, so it is not a quota and waiting won't help; magpie sends that line as \"RFC 2119 key words: …\", which goes through, so this one came from a copy of it that was worded another way": "Antigravity は oh-my-pi(omp)のシステムプロンプト冒頭の行 \"RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL.\" と、この行を含むあらゆるプロンプトに対し、残りクォータに関係なくこの 429 を返します。クォータ切れではなく、待っても解決しません。magpie はこの行を \"RFC 2119 key words: …\" として送り、それは通るので、今回は表現の異なるこの行のコピーが原因です", "the provider's network firewall blocked requests from this IP; wait a while, or switch to another network or proxy": "プロバイダのネットワークファイアウォールがこの IP からのリクエストをブロックしました。しばらく待つか、別のネットワークやプロキシに切り替えてください", "ZCode's risk control blocked this account for unusual activity (code 3012); it rests, and the group's other providers are used. If the ZCode app fails on this account too, only ZCode support can lift the block": "ZCode のリスク管理が不審なアクティビティを理由にこのアカウントをブロックしました(コード 3012)。このアカウントは休止し、グループの他のプロバイダが使われます。ZCode アプリでもこのアカウントが失敗する場合、解除できるのは ZCode サポートだけです", "rate limited": "レート制限", @@ -20068,6 +20071,7 @@ const I18N = { "Antigravity answers this 429 to the system prompt of Claude Code and the Claude Agent SDK (Claude Desktop's chats) whatever quota is left, so it is not a quota and waiting won't help; use another provider for these chats, or put one after Antigravity in a routing group": "Antigravity beantwortet den System-Prompt von Claude Code und dem Claude Agent SDK (Chats in Claude Desktop) mit diesem 429, egal wie viel Kontingent übrig ist – das Kontingent ist also nicht aufgebraucht, und Warten hilft nicht; nutzen Sie für diese Chats einen anderen Anbieter oder setzen Sie in einer Routing-Gruppe einen hinter Antigravity", "Antigravity answers this 429 to Codex's own system prompt for GPT-5 models whatever quota is left, so it is not a quota and waiting won't help; a Codex chat begun on a GPT model keeps that prompt after a model switch or a fork, so start a new chat on this model": "Antigravity beantwortet den eigenen System-Prompt von Codex für GPT-5-Modelle mit diesem 429, egal wie viel Kontingent übrig ist – das Kontingent ist also nicht aufgebraucht, und Warten hilft nicht; ein Codex-Chat, der auf einem GPT-Modell begonnen wurde, behält diesen Prompt nach einem Modellwechsel oder Fork, also beginnen Sie einen neuen Chat mit diesem Modell", "Antigravity answers this 429 to Hermes Agent's earlier default persona (its SOUL.md) whatever quota is left, so it is not a quota and waiting won't help; Hermes' current default persona goes through, so put it in SOUL.md, or use another provider for these chats": "Antigravity beantwortet die frühere Standard-Persona von Hermes Agent (seine SOUL.md) mit diesem 429, egal wie viel Kontingent übrig ist – das Kontingent ist also nicht aufgebraucht, und Warten hilft nicht; die aktuelle Standard-Persona von Hermes geht durch, also tragen Sie diese in SOUL.md ein, oder nutzen Sie für diese Chats einen anderen Anbieter", + "Antigravity answers this 429 to the line \"RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL.\" that starts oh-my-pi (omp)'s system prompt, and to any prompt that has it, whatever quota is left, so it is not a quota and waiting won't help; magpie sends that line as \"RFC 2119 key words: …\", which goes through, so this one came from a copy of it that was worded another way": "Antigravity beantwortet die Zeile \"RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL.\", mit der der System-Prompt von oh-my-pi (omp) beginnt, und jeden Prompt, der sie enthält, mit diesem 429, egal wie viel Kontingent übrig ist – das Kontingent ist also nicht aufgebraucht, und Warten hilft nicht; magpie sendet diese Zeile als \"RFC 2119 key words: …\", was durchgeht, dieser Fehler kam also von einer anders formulierten Kopie davon", "the provider's network firewall blocked requests from this IP; wait a while, or switch to another network or proxy": "die Netzwerk-Firewall des Anbieters hat Anfragen von dieser IP blockiert; warten Sie eine Weile oder wechseln Sie Netzwerk oder Proxy", "ZCode's risk control blocked this account for unusual activity (code 3012); it rests, and the group's other providers are used. If the ZCode app fails on this account too, only ZCode support can lift the block": "Die Risikokontrolle von ZCode hat dieses Konto wegen ungewöhnlicher Aktivität gesperrt (Code 3012); es pausiert, und die anderen Anbieter der Gruppe werden genutzt. Scheitert das Konto auch in der ZCode-App, kann nur der ZCode-Support die Sperre aufheben", "rate limited": "Rate-Limit", diff --git a/internal/gui/assets/plugins/routing/client.js b/internal/gui/assets/plugins/routing/client.js index ba9130964..5f8eef260 100644 --- a/internal/gui/assets/plugins/routing/client.js +++ b/internal/gui/assets/plugins/routing/client.js @@ -1567,10 +1567,13 @@ function routingPage(part) { // what it adds to the same 429 for Hermes Agent's earlier default persona // (antigravityHermesHint) const AG_HERMES = "Antigravity answers this 429 to Hermes Agent's earlier default persona (its SOUL.md) whatever quota is left, so it is not a quota and waiting won't help; Hermes' current default persona goes through, so put it in SOUL.md, or use another provider for these chats"; + // what it adds to the same 429 for oh-my-pi's RFC 2119 line + // (antigravityRFCHint) + const AG_RFC = "Antigravity answers this 429 to the line \"RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL.\" that starts oh-my-pi (omp)'s system prompt, and to any prompt that has it, whatever quota is left, so it is not a quota and waiting won't help; magpie sends that line as \"RFC 2119 key words: …\", which goes through, so this one came from a copy of it that was worded another way"; // what it adds to WorkBuddy's 403 11140 for an account it restricted // (provider.WBRestrictedHint, #1849) const WB_RESTRICTED = "WorkBuddy restricted this account for unusual activity; it stays out until WorkBuddy lifts that, which an appeal (Submit feedback in WorkBuddy) asks for"; - const HINTS = [WB_REFUSED, BLOCKED, ZCODE_BLOCKED, AG_TURNED_AWAY, AG_CODEX, AG_HERMES, WB_RESTRICTED]; + const HINTS = [WB_REFUSED, BLOCKED, ZCODE_BLOCKED, AG_TURNED_AWAY, AG_CODEX, AG_HERMES, AG_RFC, WB_RESTRICTED]; function trySaid(r, i) { const tr = r.tries[i], w = tried(r, tr), agent = agentName(r.agent); diff --git a/internal/gui/tests/routing-ag-turned-away.test.cjs b/internal/gui/tests/routing-ag-turned-away.test.cjs index 2fffc7f1b..5aa736fe4 100644 --- a/internal/gui/tests/routing-ag-turned-away.test.cjs +++ b/internal/gui/tests/routing-ag-turned-away.test.cjs @@ -21,6 +21,8 @@ const day = [now.getFullYear(), now.getMonth() + 1, now.getDate()].map((n) => St const at = (i) => new Date(now.getTime() - (i + 1) * 60e3).toISOString(); const hint = "Antigravity answers this 429 to the system prompt of Claude Code and the Claude Agent SDK (Claude Desktop's chats) whatever quota is left, so it is not a quota and waiting won't help; use another provider for these chats, or put one after Antigravity in a routing group"; const codexHint = "Antigravity answers this 429 to Codex's own system prompt for GPT-5 models whatever quota is left, so it is not a quota and waiting won't help; a Codex chat begun on a GPT model keeps that prompt after a model switch or a fork, so start a new chat on this model"; +// oh-my-pi's RFC 2119 line (antigravityRFCHint) +const ompHint = "Antigravity answers this 429 to the line \"RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL.\" that starts oh-my-pi (omp)'s system prompt, and to any prompt that has it, whatever quota is left, so it is not a quota and waiting won't help; magpie sends that line as \"RFC 2119 key words: …\", which goes through, so this one came from a copy of it that was worded another way"; const vendor = "Antigravity: Resource has been exhausted (e.g. check quota)."; const key = { id: "antigravity@u@example.com", provider: "antigravity", name: "Antigravity", kind: "account", who: "u@example.com", model: "gemini-3.8-flash" }; // as the gateway now traces it: the try Antigravity's 429, told as the @@ -61,17 +63,17 @@ function serve(lang, routes) { } const want = { - en: { said: "It said: " + vendor, hint, codex: codexHint, fail: "agent's prompt turned away", quota: "quota used up" }, - zh: { said: "原话:" + vendor, hint: "Antigravity 对 Claude Code 和 Claude Agent SDK(Claude Desktop 的对话)的系统提示词都会回这个 429,与剩余额度无关,所以这不是额度用尽,等待也不会好;请用其他供应商处理这些对话,或在路由分组中把另一个供应商排在 Antigravity 之后", codex: "Antigravity 对 Codex 给 GPT-5 模型的系统提示词都会回这个 429,与剩余额度无关,所以这不是额度用尽,等待也不会好;在 GPT 模型上开始的 Codex 对话切换模型或分叉后仍带着这段提示词,请在这个模型上新开一个对话", fail: "Agent 的提示词被拒", quota: "额度用尽" }, - "zh-TW": { said: "原話:" + vendor, hint: "Antigravity 對 Claude Code 和 Claude Agent SDK(Claude Desktop 的對話)的系統提示詞都會回這個 429,與剩餘額度無關,所以這不是額度用盡,等待也不會好;請用其他供應商處理這些對話,或在路由分組中把另一個供應商排在 Antigravity 之後", codex: "Antigravity 對 Codex 給 GPT-5 模型的系統提示詞都會回這個 429,與剩餘額度無關,所以這不是額度用盡,等待也不會好;在 GPT 模型上開始的 Codex 對話切換模型或分叉後仍帶著這段提示詞,請在這個模型上新開一個對話", fail: "Agent 的提示詞被拒", quota: "額度用盡" }, - ja: { said: "メッセージ:" + vendor, hint: "Antigravity は Claude Code と Claude Agent SDK(Claude Desktop のチャット)のシステムプロンプトに対し、残りクォータに関係なくこの 429 を返します。クォータ切れではなく、待っても解決しません。これらのチャットには別のプロバイダを使うか、ルーティンググループで Antigravity の後に別のプロバイダを置いてください", codex: "Antigravity は Codex の GPT-5 モデル向けシステムプロンプトに対し、残りクォータに関係なくこの 429 を返します。クォータ切れではなく、待っても解決しません。GPT モデルで始めた Codex のチャットは、モデルを切り替えたりフォークしたりしてもそのプロンプトを持ち続けるので、このモデルで新しいチャットを始めてください", fail: "エージェントのプロンプトを拒否", quota: "クォータ切れ" }, - de: { said: "Meldung: " + vendor, hint: "Antigravity beantwortet den System-Prompt von Claude Code und dem Claude Agent SDK (Chats in Claude Desktop) mit diesem 429, egal wie viel Kontingent übrig ist – das Kontingent ist also nicht aufgebraucht, und Warten hilft nicht; nutzen Sie für diese Chats einen anderen Anbieter oder setzen Sie in einer Routing-Gruppe einen hinter Antigravity", codex: "Antigravity beantwortet den eigenen System-Prompt von Codex für GPT-5-Modelle mit diesem 429, egal wie viel Kontingent übrig ist – das Kontingent ist also nicht aufgebraucht, und Warten hilft nicht; ein Codex-Chat, der auf einem GPT-Modell begonnen wurde, behält diesen Prompt nach einem Modellwechsel oder Fork, also beginnen Sie einen neuen Chat mit diesem Modell", fail: "Prompt des Agenten abgelehnt", quota: "Kontingent aufgebraucht" }, + en: { said: "It said: " + vendor, hint, codex: codexHint, omp: ompHint, fail: "agent's prompt turned away", quota: "quota used up" }, + zh: { said: "原话:" + vendor, hint: "Antigravity 对 Claude Code 和 Claude Agent SDK(Claude Desktop 的对话)的系统提示词都会回这个 429,与剩余额度无关,所以这不是额度用尽,等待也不会好;请用其他供应商处理这些对话,或在路由分组中把另一个供应商排在 Antigravity 之后", codex: "Antigravity 对 Codex 给 GPT-5 模型的系统提示词都会回这个 429,与剩余额度无关,所以这不是额度用尽,等待也不会好;在 GPT 模型上开始的 Codex 对话切换模型或分叉后仍带着这段提示词,请在这个模型上新开一个对话", omp: "Antigravity 对 oh-my-pi(omp)系统提示词开头的 \"RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL.\" 这一行,以及带有这一行的任何提示词,都会回这个 429,与剩余额度无关,所以这不是额度用尽,等待也不会好;magpie 会把这一行改成 \"RFC 2119 key words: …\" 发出,这样可以通过,所以这次来自这一行换了写法的副本", fail: "Agent 的提示词被拒", quota: "额度用尽" }, + "zh-TW": { said: "原話:" + vendor, hint: "Antigravity 對 Claude Code 和 Claude Agent SDK(Claude Desktop 的對話)的系統提示詞都會回這個 429,與剩餘額度無關,所以這不是額度用盡,等待也不會好;請用其他供應商處理這些對話,或在路由分組中把另一個供應商排在 Antigravity 之後", codex: "Antigravity 對 Codex 給 GPT-5 模型的系統提示詞都會回這個 429,與剩餘額度無關,所以這不是額度用盡,等待也不會好;在 GPT 模型上開始的 Codex 對話切換模型或分叉後仍帶著這段提示詞,請在這個模型上新開一個對話", omp: "Antigravity 對 oh-my-pi(omp)系統提示詞開頭的 \"RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL.\" 這一行,以及帶有這一行的任何提示詞,都會回這個 429,與剩餘額度無關,所以這不是額度用盡,等待也不會好;magpie 會把這一行改成 \"RFC 2119 key words: …\" 送出,這樣可以通過,所以這次來自這一行換了寫法的副本", fail: "Agent 的提示詞被拒", quota: "額度用盡" }, + ja: { said: "メッセージ:" + vendor, hint: "Antigravity は Claude Code と Claude Agent SDK(Claude Desktop のチャット)のシステムプロンプトに対し、残りクォータに関係なくこの 429 を返します。クォータ切れではなく、待っても解決しません。これらのチャットには別のプロバイダを使うか、ルーティンググループで Antigravity の後に別のプロバイダを置いてください", codex: "Antigravity は Codex の GPT-5 モデル向けシステムプロンプトに対し、残りクォータに関係なくこの 429 を返します。クォータ切れではなく、待っても解決しません。GPT モデルで始めた Codex のチャットは、モデルを切り替えたりフォークしたりしてもそのプロンプトを持ち続けるので、このモデルで新しいチャットを始めてください", omp: "Antigravity は oh-my-pi(omp)のシステムプロンプト冒頭の行 \"RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL.\" と、この行を含むあらゆるプロンプトに対し、残りクォータに関係なくこの 429 を返します。クォータ切れではなく、待っても解決しません。magpie はこの行を \"RFC 2119 key words: …\" として送り、それは通るので、今回は表現の異なるこの行のコピーが原因です", fail: "エージェントのプロンプトを拒否", quota: "クォータ切れ" }, + de: { said: "Meldung: " + vendor, hint: "Antigravity beantwortet den System-Prompt von Claude Code und dem Claude Agent SDK (Chats in Claude Desktop) mit diesem 429, egal wie viel Kontingent übrig ist – das Kontingent ist also nicht aufgebraucht, und Warten hilft nicht; nutzen Sie für diese Chats einen anderen Anbieter oder setzen Sie in einer Routing-Gruppe einen hinter Antigravity", codex: "Antigravity beantwortet den eigenen System-Prompt von Codex für GPT-5-Modelle mit diesem 429, egal wie viel Kontingent übrig ist – das Kontingent ist also nicht aufgebraucht, und Warten hilft nicht; ein Codex-Chat, der auf einem GPT-Modell begonnen wurde, behält diesen Prompt nach einem Modellwechsel oder Fork, also beginnen Sie einen neuen Chat mit diesem Modell", omp: "Antigravity beantwortet die Zeile \"RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL.\", mit der der System-Prompt von oh-my-pi (omp) beginnt, und jeden Prompt, der sie enthält, mit diesem 429, egal wie viel Kontingent übrig ist – das Kontingent ist also nicht aufgebraucht, und Warten hilft nicht; magpie sendet diese Zeile als \"RFC 2119 key words: …\", was durchgeht, dieser Fehler kam also von einer anders formulierten Kopie davon", fail: "Prompt des Agenten abgelehnt", quota: "Kontingent aufgebraucht" }, }; for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", "webkit"])) { - for (const lang of Object.keys(want)) for (const [agent, note] of [["claude-desktop", "hint"], ["codex", "codex"]]) { + for (const lang of Object.keys(want)) for (const [agent, note] of [["claude-desktop", "hint"], ["codex", "codex"], ["omp", "omp"]]) { test(`${engine} ${lang}: Antigravity turning ${agent}'s prompt away isn't a quota`, async (t) => { - const routes = routesOf(agent, note === "codex" ? codexHint : hint); + const routes = routesOf(agent, { codex: codexHint, omp: ompHint }[note] ?? hint); const browser = await (engine === "webkit" ? webkit.launch() : chromium.launch({ channel: "chromium" })); const context = await browser.newContext({ viewport: { width: 1100, height: 760 }, reducedMotion: "reduce" }); const page = await context.newPage();