Skip to content

fix(accounts): take ToS-suspended accounts out of rotation and surface the suspension - #117

Merged
JoshRob297 merged 2 commits into
mainfrom
fix/tos-suspension
Nov 25, 2026
Merged

JoshRob297 merged 2 commits into
mainfrom
fix/tos-suspension

Conversation

@JoshRob297

Copy link
Copy Markdown
Owner

Google answers 403 "This service has been disabled in this account for violation of Terms of Service" for every model on the account. The plugin treated it as retryable, kept the account in rotation, and reported it as 100% healthy with USABLE yes.

Changes:

  • detect the ToS 403 (distinct from validation_required and 429) and mark the account suspended: disabled, persisted suspended/suspendedAt/suspendedReason, no retry
  • a suspended record stays ineligible even if the stored enabled flag is true; re-enabling it explicitly clears the mark
  • report it: SUSPENDED in antigravity_stats, (suspended) / USABLE no in antigravity_quota, [suspended: ToS] in the menu
  • skip suspended accounts in the search rotation and quota check
  • bump the CLI client signature to agy 1.5.17 (build 4823843970351104, from the artifact the CLI itself downloads)

Verification: live requests with the new signature returned HTTP 200 for gemini-3.8-flash-low, gemini-3.8-flash-high and claude-sonnet-4-6 on two accounts; 1253 tests pass.

… them

A 403 "violation of Terms of Service" is account-level and permanent for the
process: retrying burned one attempt per request and kept the account in the
rotation, while stats and the quota report still showed it 100% healthy and
USABLE yes.

- detect the ToS 403 body and mark the account suspended (disable + persist)
- skip suspended accounts instead of retrying them
- show SUSPENDED in antigravity_stats and (suspended) / usable no in
  antigravity_quota
- clear the mark when the user explicitly re-enables the account
- bump the CLI client signature to agy 1.5.17 (build 4823843970351104)
…tion

- menu marks the account [suspended: ToS] instead of [disabled]
- a suspended record stays ineligible even if the stored enabled flag is true
- quota check and search rotation carry the suspension flag
@github-actions

Copy link
Copy Markdown

Automated verification

Check Result
typecheck success
tests success
build success
branch clean
typecheck

> opencode-antigravity-auth@2.9.12 typecheck
> tsc --noEmit

tests
m src/plugin/transform/claude.test.ts �[2m(�[22m�[2m67 tests�[22m�[2m)�[22m�[32m 32�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/transform/model-resolver.test.ts �[2m(�[22m�[2m57 tests�[22m�[2m)�[22m�[32m 25�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/rotation.test.ts �[2m(�[22m�[2m59 tests�[22m�[2m)�[22m�[32m 63�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/transform/cross-model-sanitizer.test.ts �[2m(�[22m�[2m28 tests�[22m�[2m)�[22m�[32m 19�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/storage.test.ts �[2m(�[22m�[2m22 tests�[22m�[2m)�[22m�[32m 29�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/config/model-discovery.test.ts �[2m(�[22m�[2m49 tests�[22m�[2m)�[22m�[32m 46�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/config/updater.test.ts �[2m(�[22m�[2m18 tests�[22m�[2m)�[22m�[32m 41�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/cross-model-integration.test.ts �[2m(�[22m�[2m14 tests�[22m�[2m)�[22m�[32m 15�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/persist-account-pool.test.ts �[2m(�[22m�[2m38 tests�[22m�[2m | �[22m�[90m25 todo�[39m�[2m)�[22m�[32m 28�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/stores/signature-store.test.ts �[2m(�[22m�[2m30 tests�[22m�[2m)�[22m�[32m 22�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/thinking-recovery.test.ts �[2m(�[22m�[2m29 tests�[22m�[2m)�[22m�[32m 18�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/cache.test.ts �[2m(�[22m�[2m25 tests�[22m�[2m)�[22m�[32m 29�[2mms�[22m�[39m
 �[32m✓�[39m src/v2/adapter.test.ts �[2m(�[22m�[2m7 tests�[22m�[2m)�[22m�[32m 35�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/search.test.ts �[2m(�[22m�[2m12 tests�[22m�[2m)�[22m�[32m 20�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin.test.ts �[2m(�[22m�[2m6 tests�[22m�[2m)�[22m�[32m 102�[2mms�[22m�[39m
 �[32m✓�[39m src/hooks/auto-update-checker/index.test.ts �[2m(�[22m�[2m11 tests�[22m�[2m)�[22m�[32m 27�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/recovery.test.ts �[2m(�[22m�[2m32 tests�[22m�[2m)�[22m�[32m 12�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/antigravity-first-fallback.test.ts �[2m(�[22m�[2m8 tests�[22m�[2m)�[22m�[32m 13�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/usage-ledger.test.ts �[2m(�[22m�[2m7 tests�[22m�[2m)�[22m�[32m 19�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/version.test.ts �[2m(�[22m�[2m15 tests�[22m�[2m)�[22m�[32m 77�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/model-entitlements.test.ts �[2m(�[22m�[2m9 tests�[22m�[2m)�[22m�[32m 13�[2mms�[22m�[39m
 �[32m✓�[39m src/hooks/auto-update-checker/checker.test.ts �[2m(�[22m�[2m12 tests�[22m�[2m)�[22m�[32m 55�[2mms�[22m�[39m
 �[32m✓�[39m src/v2/adapter-usage-attribution.test.ts �[2m(�[22m�[2m1 test�[22m�[2m)�[22m�[32m 115�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/auth.test.ts �[2m(�[22m�[2m19 tests�[22m�[2m)�[22m�[32m 17�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/refresh-queue.test.ts �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 10�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/quota-fallback.test.ts �[2m(�[22m�[2m10 tests�[22m�[2m)�[22m�[32m 288�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/debug.test.ts �[2m(�[22m�[2m6 tests�[22m�[2m)�[22m�[32m 28�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/header-timeout-retry.test.ts �[2m(�[22m�[2m10 tests�[22m�[2m)�[22m�[32m 45�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/safety.test.ts �[2m(�[22m�[2m5 tests�[22m�[2m)�[22m�[32m 49�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/errors.test.ts �[2m(�[22m�[2m16 tests�[22m�[2m)�[22m�[32m 13�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/storage-persistence-integrity.test.ts �[2m(�[22m�[2m5 tests�[22m�[2m)�[22m�[32m 32�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/stats.test.ts �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 56�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/ui/auth-menu.test.ts �[2m(�[22m�[2m12 tests�[22m�[2m)�[22m�[32m 23�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/model-specific-quota.test.ts �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 10�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/logging-utils.test.ts �[2m(�[22m�[2m7 tests�[22m�[2m)�[22m�[32m 29�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/core/streaming/safety-shield.test.ts �[2m(�[22m�[2m3 tests�[22m�[2m)�[22m�[32m 9�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/warmup-retry-limit.test.ts �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 207�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/token.test.ts �[2m(�[22m�[2m3 tests�[22m�[2m)�[22m�[32m 27�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/historical-pruning.test.ts �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 8�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/ui/ansi.test.ts �[2m(�[22m�[2m13 tests�[22m�[2m)�[22m�[32m 11�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/config/models.test.ts �[2m(�[22m�[2m6 tests�[22m�[2m)�[22m�[32m 8�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/empty-response-retry.test.ts �[2m(�[22m�[2m1 test�[22m�[2m)�[22m�[33m 1576�[2mms�[22m�[39m
   �[32m✓�[39m empty-response retry across endpoint fallbacks �[2m(1)�[22m
     �[33m�[2m✓�[22m�[39m keeps retrying the same endpoint until the fourth attempt instead of failing�[33m 1574�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/config/tiered-families.test.ts �[2m(�[22m�[2m6 tests�[22m�[2m)�[22m�[32m 10�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/cache/signature-cache-persistence.test.ts �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 18�[2mms�[22m�[39m
 �[32m✓�[39m src/constants.test.ts �[2m(�[22m�[2m5 tests�[22m�[2m)�[22m�[32m 10�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/logger.test.ts �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 12�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/config/schema.test.ts �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 9�[2mms�[22m�[39m

�[2m Test Files �[22m �[1m�[32m52 passed�[39m�[22m�[90m (52)�[39m
�[2m      Tests �[22m �[1m�[32m1253 passed�[39m�[22m�[2m | �[22m�[90m25 todo�[39m�[90m (1278)�[39m
�[2m   Start at �[22m 17:12:16
�[2m   Duration �[22m 6.60s�[2m (import 38%, tests 34%, transform 23%, worker 5%)�[22m

�[2m    Isolate �[22m �[33m52 workers spawned�[39m�[2m · ~146ms startup each (spawn + environment, per file)�[22m
�[2m            �[22m �[2mat least ~2.39s faster with �[22m�[33misolate: false�[39m�[2m — reuses workers across files instead of one per file�[22m

build

> opencode-antigravity-auth@2.9.12 build
> tsc -p tsconfig.build.json

@JoshRob297
JoshRob297 merged commit 90eaa74 into main Nov 25, 2026
1 check passed
@JoshRob297
JoshRob297 deleted the fix/tos-suspension branch November 25, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant