feat: route Antigravity provider models - #1
Closed
nuchareviews-beep wants to merge 2 commits into
Closed
Conversation
router.ts's isRoutableProvider() and benchmarks.ts's rankAutoModelOptions() each hardcoded their own separate provider allowlist. Adding "antigravity" to router.ts's copy made it eligible for thread creation, but rankAutoModelOptions kept using its own stale copy internally, so Antigravity candidates were silently excluded from every ranked (benchmarked) selection and could only ever be chosen via fallbackSelection -- which only runs when Codex, Claude Code, and Cursor are ALL simultaneously unavailable or quota-exhausted. Verified live against a running bb instance before this fix: two `bb autorouter route` calls (difficulty 2 and 92), plus one with an explicit "route this to agy" instruction and one naming a real agy model id directly, all still picked Codex every time. That's the gap this fix closes. Both files now read one shared ROUTABLE_PROVIDER_IDS from benchmarks.ts, so this class of two-lists-drift-apart bug can't recur. No fabricated benchmark score is introduced for Antigravity/ Gemini models -- rankAutoModelOptions correctly still returns no ranked option for them (no CursorBench entry exists), matching this repo's existing "does not invent scores for unmeasured models" policy. Added two tests: one confirming that policy still holds for Antigravity specifically, one confirming fallbackSelection actually returns a route on Antigravity when it's the only eligible candidate -- the real, narrow condition under which it gets picked in practice. All 30 tests pass, typecheck and build are clean.
nuchareviews-beep
marked this pull request as ready for review
August 23, 2026 13:57
nuchareviews-beep
force-pushed
the
feat/antigravity-provider
branch
from
August 23, 2026 14:05
759f2ad to
7d6ab24
Compare
Author
|
Superseded by #2, which includes everything from this PR plus a full configurable routing-policy system (per-difficulty model selection with a configurable comparator, and a merged decision-agent/fallback-order picker) built on top of it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the locally registered
antigravityprovider — a bridge to the localagyCLI viabb-plugin-antigravity-acp— to Autorouter's routable-provider set. OmniRoute is deliberately excluded: this installation reserves it for delegated subagent work rather than interactive Autorouter threads.What actually happens in practice — read this before merging
Antigravity/Gemini models have no entry in the compiled CursorBench table (
benchmarks.ts), and this PR does not add one — there's no public benchmark data for them to draw from, and fabricating a score would be worse than not scoring them at all. That means:fallbackSelection, which runs when Codex, Claude Code, and Cursor are all simultaneously unavailable or quota-exhausted. That's a narrow, mostly-last-resort condition, not "Antigravity is now a normal routing option."A real bug this PR originally had, found and fixed before merge
The first version of this PR added
antigravitytorouter.ts'sisRoutableProvider()set but missed thatbenchmarks.ts'srankAutoModelOptions()hardcoded its own separate copy of the same provider allowlist. That meant Antigravity was eligible for candidate discovery but silently excluded from ranking regardless — i.e., the PR as originally written would never actually route to Antigravity under any circumstance, not even the fallback case described above.I caught this by actually running
bb autorouter routelive against a real bb instance instead of trusting the unit test suite alone — four real calls (low difficulty, high difficulty, an explicit "route this to agy" instruction, and a prompt naming a real agy model id directly) all still picked Codex every time. Fixed by unifying both files onto one sharedROUTABLE_PROVIDER_IDS(now living inbenchmarks.ts), so this class of two-lists-silently-drift-apart bug can't recur.Verification
npm run test— 30 passing (28 existing + 2 new: one confirming Antigravity still correctly gets no fabricated benchmark score, one confirmingfallbackSelectionactually returns a route on it when it's the only eligible candidate)npm run typecheck,npm run build— cleanScope
README.md— documents the provider boundary (and, honestly, its real limitation)router.test.ts,benchmarks.ts— the actual fix plus two regression testsThis is deliberately just the plain "make Antigravity a real, working eligible provider" change — no opinionated routing-priority policy included, to keep this focused and easy to review on its own.