Skip to content

2.9.0: learn tiered families from the catalog instead of a name list - #95

Merged
JoshRob297 merged 2 commits into
mainfrom
feat/generic-tier-discovery
Nov 9, 2026
Merged

JoshRob297 merged 2 commits into
mainfrom
feat/generic-tier-discovery

Conversation

@JoshRob297

Copy link
Copy Markdown
Owner

New families are announced faster than this plugin ships. Gemini 4 Hyperion advertises hyperion-minimal|low|medium|high — a suffix (minimal) and a name that exist nowhere in the code — and Carbon is next. Until now that needed a release plus a regex.

What changed

  • src/plugin/config/tiered-families.ts (new): learns families from the catalog. Ids that share a base and differ by a thinking suffix group into one family; the vocabulary comes from what the backend advertises, ordered minimal < low < medium < high < max with unknown suffixes after known ones.
  • model-discovery.ts: groups with the learned families instead of a fixed low|medium|high|max regex, and records how each family encodes its tiers.
  • model-resolver.ts: builds family-<tier> from that record. The old family regex stays as the fallback for when discovery has not run.
  • Two guards keep it forward-only: a versioned line still has to beat the curated floor, and an unknown suffix only counts when the catalog also lists the plain base.

Why the guards

The first version of the grouping was too loose and collapsed gemini-2.5-flash with gemini-2.5-pro into one model with flash and pro variants — the existing forward-only tests caught it. A suffix now counts only when it is a known tier, or when the catalog names the base on its own (hyperion next to hyperion-ultra).

Verification

  • npm test: 1,180 passed, 25 todo.
  • New cases: a Hyperion-shaped catalog produces one entry with minimal|low|medium|high; the resolver turns #minimal into hyperion-minimal; two model lines with unknown suffixes do not group; the measured catalog still surfaces nothing.
  • Not verified against the live backend: Hyperion is not on this account yet. The behaviour is tested against the shape the catalog will have.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

Automated verification

Check Result
typecheck success
tests success
build success
branch clean
typecheck

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

tests

> opencode-antigravity-auth@2.9.0 test
> vitest run


�[1m�[30m�[46m RUN �[49m�[39m�[22m �[36mv5.1.0 �[39m�[90m/home/runner/work/opencode-antigravity-auth/opencode-antigravity-auth�[39m

 �[32m✓�[39m src/plugin/transform/gemini.test.ts �[2m(�[22m�[2m130 tests�[22m�[2m)�[22m�[32m 60�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/request-helpers.test.ts �[2m(�[22m�[2m152 tests�[22m�[2m)�[22m�[32m 91�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/accounts.test.ts �[2m(�[22m�[2m110 tests�[22m�[2m)�[22m�[32m 110�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/transform/claude.test.ts �[2m(�[22m�[2m67 tests�[22m�[2m)�[22m�[32m 40�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/quota.test.ts �[2m(�[22m�[2m24 tests�[22m�[2m)�[22m�[32m 80�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/request.test.ts �[2m(�[22m�[2m110 tests�[22m�[2m)�[22m�[32m 122�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/transform/model-resolver.test.ts �[2m(�[22m�[2m56 tests�[22m�[2m)�[22m�[32m 20�[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 20�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/storage.test.ts �[2m(�[22m�[2m22 tests�[22m�[2m)�[22m�[32m 22�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/config/updater.test.ts �[2m(�[22m�[2m18 tests�[22m�[2m)�[22m�[32m 34�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/cross-model-integration.test.ts �[2m(�[22m�[2m14 tests�[22m�[2m)�[22m�[32m 13�[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 17�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/stores/signature-store.test.ts �[2m(�[22m�[2m30 tests�[22m�[2m)�[22m�[32m 25�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/config/model-discovery.test.ts �[2m(�[22m�[2m46 tests�[22m�[2m)�[22m�[32m 46�[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 27�[2mms�[22m�[39m
 �[32m✓�[39m src/hooks/auto-update-checker/index.test.ts �[2m(�[22m�[2m11 tests�[22m�[2m)�[22m�[32m 32�[2mms�[22m�[39m
 �[32m✓�[39m src/v2/adapter.test.ts �[2m(�[22m�[2m7 tests�[22m�[2m)�[22m�[32m 46�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/antigravity-first-fallback.test.ts �[2m(�[22m�[2m8 tests�[22m�[2m)�[22m�[32m 16�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/version.test.ts �[2m(�[22m�[2m15 tests�[22m�[2m)�[22m�[32m 59�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/usage-ledger.test.ts �[2m(�[22m�[2m7 tests�[22m�[2m)�[22m�[32m 22�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/recovery.test.ts �[2m(�[22m�[2m30 tests�[22m�[2m)�[22m�[32m 11�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/model-entitlements.test.ts �[2m(�[22m�[2m9 tests�[22m�[2m)�[22m�[32m 12�[2mms�[22m�[39m
 �[32m✓�[39m src/hooks/auto-update-checker/checker.test.ts �[2m(�[22m�[2m12 tests�[22m�[2m)�[22m�[32m 54�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/auth.test.ts �[2m(�[22m�[2m19 tests�[22m�[2m)�[22m�[32m 14�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/refresh-queue.test.ts �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 8�[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/quota-fallback.test.ts �[2m(�[22m�[2m10 tests�[22m�[2m)�[22m�[32m 255�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/search.test.ts �[2m(�[22m�[2m8 tests�[22m�[2m)�[22m�[32m 17�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/header-timeout-retry.test.ts �[2m(�[22m�[2m10 tests�[22m�[2m)�[22m�[32m 43�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/errors.test.ts �[2m(�[22m�[2m16 tests�[22m�[2m)�[22m�[32m 15�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/safety.test.ts �[2m(�[22m�[2m5 tests�[22m�[2m)�[22m�[32m 55�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/stats.test.ts �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 85�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/ui/auth-menu.test.ts �[2m(�[22m�[2m12 tests�[22m�[2m)�[22m�[32m 29�[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 34�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/core/streaming/safety-shield.test.ts �[2m(�[22m�[2m3 tests�[22m�[2m)�[22m�[32m 11�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/ui/ansi.test.ts �[2m(�[22m�[2m13 tests�[22m�[2m)�[22m�[32m 8�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/historical-pruning.test.ts �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 7�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/token.test.ts �[2m(�[22m�[2m3 tests�[22m�[2m)�[22m�[32m 37�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/config/models.test.ts �[2m(�[22m�[2m5 tests�[22m�[2m)�[22m�[32m 8�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/logger.test.ts �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 16�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/config/schema.test.ts �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 14�[2mms�[22m�[39m
 �[32m✓�[39m src/plugin/config/tiered-families.test.ts �[2m(�[22m�[2m5 tests�[22m�[2m)�[22m�[32m 8�[2mms�[22m�[39m
 �[32m✓�[39m src/constants.test.ts �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 6�[2mms�[22m�[39m

�[2m Test Files �[22m �[1m�[32m46 passed�[39m�[22m�[90m (46)�[39m
�[2m      Tests �[22m �[1m�[32m1180 passed�[39m�[22m�[2m | �[22m�[90m25 todo�[39m�[90m (1205)�[39m
�[2m   Start at �[22m 16:13:05
�[2m   Duration �[22m 4.93s�[2m (import 38%, transform 30%, tests 25%, worker 7%)�[22m

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

build

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

@JoshRob297
JoshRob297 merged commit 6dd7e1f into main Nov 9, 2026
1 check passed
@JoshRob297
JoshRob297 deleted the feat/generic-tier-discovery branch November 9, 2026 16:15
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.

2 participants