Skip to content

refactor(providers): consolidate agy into a CLI-only antigravity provider - #13177

Closed
backryun wants to merge 12 commits into
cheaper-inference:release/v3.8.53from
backryun:codex/antigravity-cli-consolidation
Closed

backryun wants to merge 12 commits into
cheaper-inference:release/v3.8.53from
backryun:codex/antigravity-cli-consolidation

Conversation

@backryun

@backryun backryun commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Consolidate standalone agy into antigravity with the official CLI client identity. Existing agy/ model IDs, credential imports, and /api/oauth/agy/{action} URLs remain compatible; new OAuth exchanges save canonical Antigravity connections.

  • Keep authenticated live discovery from fix(providers): de-duplicate agy and antigravity model catalogs #13410 and the catalog refresh in fix(providers): refresh Antigravity and AGY models #12608 while removing the separate IDE version/header path.
  • Migration 197_merge_agy_into_antigravity.sql keeps canonical unique-key winners and unmatched legacy rows, credentials, defaults, combos, aliases, limits, and discovery settings. Legacy ACL spellings remain and canonical equivalents are appended so both grants and restrictions continue to work.
  • Heal the existing blocked_models fallback before migrations run so fresh DB initialization succeeds, reusing API_KEY_COLUMN_FALLBACKS and preserving persistent/in-memory schema-healing order.
  • Retain family-scoped quota evaluation for legacy AGY requests: exhausted Claude quota does not disable available Gemini quota, and unreported zero remains unknown.
  • Update CLI error-log/image regressions, use an explicit non-catalog model for the candidate-inspector test, and retain translation-key parity after removing the profile selector.
  • Regenerate the measured 357-provider reference and 194-migration counts; preserve the current 137 DB-module count and localized document headers. Refresh corresponding localized documentation.

Base and review direction

Based on release/v3.8.52 at 23a11484862b3bb589a55e85b00e4ac53ffeb234 (2026-10-03), stacked on #12608 head b852852d339da12f871d76f445a8e82ab2496e8f. Review that catalog change first. The maintainer still needs to choose between separate shared-catalog providers and full consolidation. AGENTS.md changes are limited to measured provider/migration counts.

Validation

  • Official per-worker-isolated Node batch: 729/729 across 69 affected files.

  • Prior CI regressions reproduced before the fix; all 76 focused regression tests now pass. Migration collision/ACL/idempotence/fresh-core tests: 4/4; existing core-init tests: 14/14; legacy OAuth route regressions: 3/3.

  • Affected quota-family Vitest suite: 7/7.

  • Core typecheck, full lint, active commit hooks, provider consistency/assets, model lifecycle, file-size limits, cycle ratchet, migration numbering, strict mutation test-list coverage, and check:docs-all: passed.

  • Reconciled all 66 README and 66 provider-reference translations with the measured source facts and recorded their hashes using the scoped translation-adopt workflow. Updated technical notes use a limited canonical-English fallback where a translated clause could not be safely retained. Strict translation validation reports only the independently reproduced base drift in QUALITY_GATES.md.

  • Exact-base check:test-masking passes. Nine reviewed net-count exceptions document removed IDE/profile or duplicate AGY contracts; the deleted standalone AGY provider suite has canonical-provider, migration, legacy OAuth and prefix-lookup replacement coverage. Skip/tautology/deletion checks remain enforced. Final affected follow-up suites: 69/69; legacy quota assertions explicitly cover both exhausted Claude and available Gemini.

Exact-base validation limits

The unmodified base independently reproduces strict-core TS7006 at autoStrategy.ts:519, the AgentRouter/Claude cli/sdk-cli golden snapshot drift, the dependency audit failure that stops the CI Lint job, stale generated skills/omni-providers/SKILL.md, and strict documentation-translation drift for docs/architecture/QUALITY_GATES.md. The generated-skill failure was reproduced from a pure archive of the base. The old unused-suppression and missing-Stryker-test-list failures are resolved in this base. Wider release CI failures are tracked in #15306; current-head CI results remain authoritative.

@backryun
backryun marked this pull request as ready for review September 10, 2026 06:27
@backryun
backryun force-pushed the codex/antigravity-cli-consolidation branch 4 times, most recently from e142b0d to 22d3460 Compare September 10, 2026 12:37
@backryun
backryun force-pushed the codex/antigravity-cli-consolidation branch 7 times, most recently from 38137c4 to efcc5ca Compare September 10, 2026 22:17
@HouMinXi

Copy link
Copy Markdown
Contributor

Thanks for consolidating agy into the Antigravity CLI-only provider. I did not fold this into the local recut of release/v3.8.51.

Reason: live combos on this host still pin agy/ model ids (onmi-gemini3.6 and siblings). The merge hit modelSpecs.ts, PROVIDER_REFERENCE.md, and quota-weighted tests; taking the rename would take the serving provider out from under those pins.

Purpose of the recut: ship current release/v3.8.51 plus open product PRs to a private production host without breaking existing combo pins. Happy to pick this up on a later recut once combos are remapped. No objection to the refactor itself.

@backryun
backryun force-pushed the codex/antigravity-cli-consolidation branch 6 times, most recently from 3399c9c to 30b33ab Compare September 12, 2026 03:59
diegosouzapw added a commit that referenced this pull request Sep 14, 2026
#13248)

Merged after renumbering. `176_provider_connection_synced_models_at.sql` collided with `176_xp_action_counts.sql` (#12651), which made the migration runner abort on every DB open. Renamed to **177**; the doc count moves 173 → 174 across README.md, AGENTS.md, llm.txt and the i18n mirrors (operator-approved, 206 numeric substitutions and nothing else).

- `check:migration-numbering`: OK, 174 migrations, no duplicates
- `check:docs-counts` migrations: ✓
- 84/84 across the NVIDIA suite plus the seven DB-touching suites the collision had taken down
- ESLint and `typecheck:core`: exit 0

Heads-up for whoever lands next: **177 is claimed by eight other open PRs** (#13610, #13602, #13580, #13554, #13405, #13331, #13177, #13116) and 176 by #13373 and #13102. With this merged, all of them need to renumber at merge time — `check:migration-numbering` forbids new gaps, so the next free number is always the only valid one.

⚠️ base-red inherited: #12732
@diegosouzapw

Copy link
Copy Markdown
Collaborator

This is a genuinely large architectural proposal — folding the agy CLI provider into
antigravity and deleting the standalone agy registry entry entirely. It's worth
noting this goes in the opposite direction from #13410, which just merged today and
deliberately kept agy and antigravity as separate providers (just de-duplicating
their catalogs via a shared base file, per #12724). Given the size (142 files) and that
it touches AGENTS.md/llm.txt (doc-count bumps only, but still a protected surface
needing explicit sign-off) and would remove a provider users may already have configured,
I'd like @diegosouzapw to weigh in on the direction before this goes further — do we want
full consolidation, or keep the current shared-catalog approach? Once that's settled this
will also need a full rebase onto today's catalog refactor.

@diegosouzapw diegosouzapw added the protected-surface Touches an agent-instruction surface (AGENTS/CLAUDE/llm.txt/SKILL.md) — per-PR operator OK to merge label Sep 15, 2026
@diegosouzapw diegosouzapw changed the title refactor(providers): consolidate agy into a CLI-only antigravity provider [defer] refactor(providers): consolidate agy into a CLI-only antigravity provider Sep 15, 2026
@backryun

backryun commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor Author

Direction check — full consolidation vs shared catalog

@diegosouzapw — capturing the trade-off so we can close this one way or the other:

This PR (full consolidation) — one antigravity provider serves both surfaces; the agy id is removed and mapped through DEPRECATED_PROVIDERS (model prefixes such as agy/… keep resolving as aliases), and the IDE client identity is dropped in favor of the CLI fingerprint. Cost: it removes a provider id that users and live combos may pin (for example the onmi-gemini3.6 combos @HouMinXi flagged), so alias continuity and a DB migration path are hard requirements; 142 files.

Merged #13410 (shared catalog) — keeps both provider ids and shares one model list (antigravitySharedModels.ts). Zero breakage and a much smaller surface; provider-level metadata (quota/pricing/aliases/version) stays per-provider.

My position — why I want the two merged: I've been watching these two surfaces for a long time, and I've concluded there is no benefit at all in keeping them coexisting. The desktop and CLI versions use exactly the same models, tools and call logic — even the login flow is identical: if login fails on the CLI it fails on the desktop version too, and vice versa. There is no reason to keep unnecessary duplication and raise the code's complexity. I fully understand that people who have been using them may feel inconvenienced, but I believe a decisive move now — cut the complexity and keep only the essential surface — is the better trade, and it is what ultimately reduces user confusion rather than adding to it.

The mechanics back this up: agy and antigravity are the same Google consumer-OAuth client against the same Cloud Code backend, with one model catalog and one quota pool; the official Antigravity SDK is API-key only, so the emulated OAuth surface is the only subscription path either way. Keeping two provider ids preserves a client-identity split the upstream does not have. Alias continuity is a hard requirement, not a nice-to-have: agy/… model ids will keep resolving (DEPRECATED_PROVIDERS mapping plus model-prefix aliases), with a DB migration for existing connections. If we agree on the direction, I'll do the full rebase onto today's catalog refactor.

Either way I will do the work:

  • If the shared-catalog approach stays: I will rescope this PR to drop the provider removal and keep only the non-breaking parts (client-identity normalization, catalog/version alignment) — or close it if fix(providers): de-duplicate agy and antigravity model catalogs #13410 makes those redundant.
  • If consolidation is wanted: I will rebase the full proposal onto today's catalog refactor, keeping agy/… model aliases resolving and adding a migration path for existing connections.

#12608 has now been rewritten on top of antigravitySharedModels.ts (head 844aba8e6) and is gated on this same direction decision.

Production constraint worth recording: @HouMinXi kept agy in the recut precisely because live combos pin agy/ model ids; any consolidation plan should treat alias continuity as a hard requirement rather than a nice-to-have.

@backryun
backryun force-pushed the codex/antigravity-cli-consolidation branch from 30b33ab to b63509f Compare September 15, 2026 18:01
@backryun

backryun commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor Author

Restacked and rebased onto today's tree — release/v3.8.51 @ c8b24ffc3 plus the rewritten #12608 head (844aba8e6):

  • Migration renumbered to 179_merge_agy_into_antigravity.sql (178 is the current max); doc/SVG/llm-mirror counts re-synced (357 providers, 21 OAuth providers, 176 migrations, PROVIDER_REFERENCE regenerated).
  • Kept the merged live-catalog discovery policy from fix(providers): de-duplicate agy and antigravity model catalogs #13410 instead of flipping the surfaces to a static allowlist; retired 3.7-era ids stay hidden and callable alias ids stay callable. The consolidated suites were aligned accordingly.
  • Usage-service tests now expect the CLI-only fingerprint (antigravity/cli/1.2.3) this branch introduces.
  • Focused run over the 62 test files touched by the stack: 650/651 pass. The single red — tests/unit/models-catalog-route.test.ts » "v1 models catalog does not duplicate custom Jina specialty models" — reproduces identically on a clean checkout of the tip (base-red inherited).

The direction question from my previous comment still stands (@diegosouzapw) — the branch is now clean and ready for review either way.

@backryun
backryun force-pushed the codex/antigravity-cli-consolidation branch from b63509f to 6d72002 Compare September 15, 2026 18:13
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Re-homed to release/v3.8.52: v3.8.51 entered its release freeze, so the branch now belongs to the release captain and development continues on the next cycle. Nothing is wrong with this PR — it just needed a live base. No action needed from you; CI will re-run against the new base.

backryun and others added 12 commits October 3, 2026 09:08
…avity and AGY catalogs

Rewritten on top of the now-current shared antigravitySharedModels.ts catalog (cheaper-inference#13410) and the merged 3.8 Flash direct-tier work (cheaper-inference#13318) instead of the stale duplicate googleCloudCodeModelCatalog.ts from the previous round.

- Drop the retired 3.7 blocks from the shared catalog; keep the 3.6/3.7 ids in the retired sets so stale upstream discovery entries stay hidden.
- Keep the live-verified 3.8 direct-tier mapping: -high/-medium/-low pass through verbatim and the bare display id aliases to -high.
- Antigravity CLI fallback signature bumps to 1.2.3 and CLI_TOOLS/free-model metadata follow the 3.8 tiers.
- AGY gains the same non-chat pattern filter as Antigravity.
- Keeps the merged live-catalog-authoritative discovery policy.
…ider

Merge the standalone agy provider into antigravity and delete the IDE client identity. Both clients authenticate against the same Google consumer-OAuth client and share the Cloud Code backend, model catalog, and quota, so the provider now presents only the official CLI fingerprint.

- delete the agy registry entry, agyModels.ts, AGY_CONFIG and the agy OAuth provider; agy stays a runtime alias for old URLs and agy/<model> ids
- remove the IDE User-Agent/release-feed paths and the per-connection client-profile selector; AntigravityClientProfile is now cli only
- migrate stored agy rows to antigravity and normalize the legacy IDE profile (migration 176)
- sync the provider count to 355 (README/AGENTS/llm.txt/package.json) and regenerate PROVIDER_REFERENCE plus the SVG canonical numbers
- dashboard: a single Antigravity card carrying the CLI import hint
…dated provider

The agy provider id no longer receives family-scoped lock keys after the CLI consolidation; assert the exact-model scope instead.
The stack carried A's 1.2.0 assertions next to C's earlier 1.1.5 seeds; unify on 1.2.0 so the seeded cache matches the pinned regex.
…c the branch counts

The consolidation migration lands as 179 on the current release tree (178 is the current max); refresh PROVIDER_REFERENCE, the doc/SVG canonical counts (357 providers, 21 OAuth providers) and the llm.txt mirrors for the merged catalog.
…policy and CLI identity

- Antigravity discovery stays live-authoritative (cheaper-inference#13410): unknown chat tiers remain discoverable, retired 3.7-era ids stay hidden, and callable compatibility aliases keep their upstream echoes.
- Antigravity quota keys keep the existing callable-model policy (the strict path that predates the merge).
- Usage-service, bootstrap and weekly-quota tests now expect the CLI-only fingerprint (antigravity/cli/1.2.3); shared-catalog tests no longer import the deleted agyModels module.
…c the refreshed counts

Upstream migrations now run through 189 (quota schedules), so the consolidation
migration moves to 190; the merged state is 357 providers / 187 migrations.
PROVIDER_REFERENCE regenerated, the README/AGENTS/llm.txt/package.json counts and
the diagram SVGs re-synced, and the 66 llm.txt locale mirrors rebuilt from the
root file.

No functional change.
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Hi @backryun — closing this pull request to clear the open queue. The branch codex/antigravity-cli-consolidation is kept, so the commits stay. Comment here if it should be reopened.

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Hi @backryun — reopening this pull request. The close was a mistake, and it is back in the merge queue. The branch codex/antigravity-cli-consolidation was kept.

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Re-homed to release/v3.8.53: v3.8.52 entered its release freeze, so the branch now belongs to the release captain and development continues on the next cycle. Nothing is wrong with this PR — it just needed a live base. No action needed from you; CI will re-run against the new base.

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Thanks @backryun, this is thorough work and the migration/ACL/alias handling is clearly thought through. It is being held for one reason: the direction decision (full agy->antigravity consolidation vs the shared-catalog approach that landed in #13410) is a maintainer call that has not been made yet, and it removes a provider id users and combos may pin. Separately, whichever way it goes, the branch will need a fresh rebase: #12608 is already merged (so those commits conflict), the tip's antigravity executor/verification code moved, ~37 non-docs files conflict, and migration number 197 is taken (the tip is at 212 now). Also please keep AGENTS.md/llm.txt out of the PR (or leave them to the maintainers, they are protected files) and leave the 12608 changelog fragment untouched. If the call is 'keep shared catalogs', the non-breaking parts (client identity/version alignment) as a smaller PR would be very welcome. We will keep you credited on anything we use.

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Thank you for the work on this, @backryun — consolidating agy into a CLI-only Antigravity provider was a careful refactor, and it pushed us to settle the question.

We have decided to keep agy and antigravity as separate providers. Since this PR was opened, #13410 moved both onto a single shared model source (antigravitySharedModels.ts) while keeping the two connection types distinct, and existing installs rely on agy OAuth connections staying where they are. Merging the consolidation now would mean a full rebase over that architecture plus a migration path for every configured agy connection, and the shared-model work already removed most of the duplication this PR was targeting.

So I'm closing this one. If you see duplication that is still left between the two providers, a smaller PR focused on that would be very welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

protected-surface Touches an agent-instruction surface (AGENTS/CLAUDE/llm.txt/SKILL.md) — per-PR operator OK to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants