Skip to content

fix: collapse Google reasoning tiers in model discovery - #2035

Merged
lidge-jun merged 1 commit into
lidge-jun:devfrom
iF2007:fix/google-model-discovery-reasoning-level
Aug 19, 2026
Merged

fix: collapse Google reasoning tiers in model discovery#2035
lidge-jun merged 1 commit into
lidge-jun:devfrom
iF2007:fix/google-model-discovery-reasoning-level

Conversation

@iF2007

@iF2007 iF2007 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Before: Gemini discovery exposed one visible model per low/medium/high reasoning tier, such as gemini-3.7-flash-low.
  • After: complete tier sets expose one base model ID, such as gemini-3.7-flash.
  • How: collapse known complete wire-level tier sets before display-name fallback, retain the full effort-to-wire map, and route each requested effort to its discovered wire ID.

Verification

  • npm exec --yes bun -- run typecheck and npm exec --yes bun -- test tests/google-antigravity-wire.test.ts tests/google-models-listing.test.ts tests/gemini-37-flash-migration.test.ts — typecheck passed; 99 tests passed.
  • npm exec --yes bun -- run typecheck — passed.
  • git diff --check — passed.
  • Full npm exec --yes bun -- run test was attempted; unrelated baseline/environment failures remain outside this change (for example Codex shim expectations and missing GUI React dependencies).

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed; no docs change is needed for this internal discovery fix.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults; this change does not touch those areas.

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Summary by CodeRabbit

  • Bug Fixes

    • Improved model selection by consolidating tiered variants into a single base model.
    • Preserved low, medium, and high effort routing for supported models.
    • Added more reliable validation and fallback selection when requested effort levels are unavailable.
    • Improved support for collapsed Gemini Flash and Pro variants while preserving their appropriate configurations.
  • Tests

    • Added regression coverage for Gemini Flash tier sets, Gemini Pro effort mappings, and effort-based model routing.

@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Aug 18, 2026
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c46208e5-c720-4168-9627-26199572417b

📥 Commits

Reviewing files that changed from the base of the PR and between 9be336e and b999f1d.

📒 Files selected for processing (2)
  • src/providers/antigravity-models.ts
  • tests/google-antigravity-wire.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

Antigravity discovery now validates effort tiers, builds complete effort-to-wire mappings, caches them, and attaches them to discovered models. Effort resolution checks discovered mappings before existing fallback rules. Tests cover Gemini Flash and Gemini Pro routing.

Changes

Antigravity effort routing

Layer / File(s) Summary
Normalize effort tiers and picker IDs
src/providers/antigravity-models.ts
Effort values are validated. Complete low, medium, and high wire mappings are constructed and attached to discovered models.
Cache and resolve discovered effort wires
src/providers/antigravity-models.ts
Cached mappings retain effort wire IDs. Resolution selects the requested, default, or first available discovered wire before existing routing rules.
Validate collapsed model behavior
tests/google-antigravity-wire.test.ts
Tests verify Gemini 3.7 Flash and Gemini 3.1 Pro tier collapsing, retained wire IDs, complete effort mappings, and direct effort routing.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to b999f

This change consolidates complete Google reasoning-tier listings into a base model while preserving effort-specific routing; the localized behavior change has passing targeted validation, and no actionable merge-blocking risk remains after normal checks.

Possibly related issues

  • lidge-jun/opencodex#2025 — The changes modify Antigravity tier discovery and route effort requests to discovered suffixed wire IDs.

Possibly related PRs

Suggested labels: provider

Suggested reviewers: wibias, lidge-jun

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: collapsing Google reasoning tiers during model discovery.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

✅ READY

  • all PR quality gates passed; the review readiness checklist is complete.

Review readiness checklist

  • ✅ All CI tests are green on my local testing.
  • ✅ I pushed my PR to the latest dev commit.
  • ✅ I resolved all correct Codex and CodeRabbit findings.
  • ✅ My PR is ready for review.

4/4 boxes ticked.

This pull request is already Ready for Review.
The review-ready label marks this PR as ready; review automation runs independently.
Maintainers: @lidge-jun @Ingwannu @Wibias

@github-actions
github-actions Bot marked this pull request as ready for review August 18, 2026 13:05

@Ingwannu Ingwannu left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The collapsed-picker direction is correct, but the current head does not yet preserve the effort-routing contract required by #2025. I am requesting changes for two concrete blockers.

  1. The new complete-set collapse retains only the first encountered wire ID. With the added fixture, registration stores gemini-3.7-flash -> gemini-3.7-flash-low; resolving the collapsed row with high then returns { wireModelId: "gemini-3.7-flash-low", thinkingLevel: "high" }. That neither selects the discovered high-tier wire nor follows this module's suffix invariant that a suffixed wire already encodes the effort and should not receive a contradictory thinking level. Preserve the complete base-to-effort wire map (or otherwise select the matching discovered suffix at request time), and add a regression that registers the parsed rows and asserts low/medium/high each route to their corresponding discovered wire.

  2. Complete labeled Gemini 3.1 Pro sets still do not collapse. antigravityDisplayModelId() returns gemini-3.1-pro-low / gemini-3.1-pro-high before the existing explicit two-wire mapping runs, so a live payload containing gemini-3.1-pro-low plus gemini-pro-agent remains two picker rows. Apply complete explicit-set collapse before display-name fallback as well, and cover the labeled low/high payload.

The focused tests and typecheck pass, but the first new test only verifies the picker ID and explicitly accepts the low wire; it needs to prove the subsequent request-routing behavior before this is mergeable.

@github-actions
github-actions Bot marked this pull request as draft August 19, 2026 00:37
@iF2007
iF2007 force-pushed the fix/google-model-discovery-reasoning-level branch from 9be336e to b999f1d Compare August 19, 2026 00:52
@iF2007

iF2007 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed review and for catching both blockers.

Addressed in commit b999f1d20:

  1. Complete discovered tier sets now retain the full effortWireModelIds map on the collapsed picker row. Registration stores that map, and request resolution selects the discovered low/medium/high wire for the requested effort. Because the selected suffixed wire already encodes the effort, the resolver returns only { wireModelId } and does not add a contradictory thinkingLevel. The regression test registers the parsed rows and verifies all three routes.

  2. The explicit Gemini 3.1 Pro two-wire collapse runs before display-name fallback. The labeled low/high fixture now produces one gemini-3.1-pro picker row, and the regression verifies low/high route to gemini-3.1-pro-low and gemini-pro-agent.

I also rebased the branch onto the latest dev and resolved the resulting conflict while preserving the upstream Antigravity changes. Focused tests (99) and typecheck pass locally. Thanks again for the careful review.

@iF2007
iF2007 marked this pull request as ready for review August 19, 2026 00:54
@iF2007
iF2007 requested a review from Ingwannu August 19, 2026 03:45
@lidge-jun
lidge-jun merged commit 35664ad into lidge-jun:dev Aug 19, 2026
13 checks passed
@lidge-jun

Copy link
Copy Markdown
Owner

리뷰 · 우선순위 52 / 80

review-ready 이고 draft 가 아니지만 reviewDecision 은 CHANGES_REQUESTED 입니다. Gemini discovery 가 gemini-3.7-flash-low|medium|high 를 각각 보여 주던 것을 완전한 tier set 이면 gemini-3.7-flash 하나로 접고, effort → wire id 맵을 남겨 요청 effort 를 그 맵으로 보냅니다. 테스트 99 와 typecheck 가 본문에 있습니다. 전체 스위트는 환경 실패로 안 닫혔습니다.

completeDiscoveredEffortWireModelIdsANTIGRAVITY_EFFORT_WIRE_MAP[pickerId] 의 모든 wire 가 available 에 있으면 그 맵을 복사합니다. 없으면 known picker 에 대해 ${pickerId}-low|medium|high 세 개가 모두 있을 때만 suffix 맵을 만듭니다. 하나라도 없으면 undefined 라서 그 행에는 effortWireModelIds 가 안 붙습니다. 불완전 세트는 접히지 않습니다. registerAntigravityDiscoveredWireModels 가 그 맵을 baseUrl 키로 보관합니다.

resolveAntigravityEffortWireModel 은 새 discoveredAntigravityEffortWireModelId 를 기존 사다리보다 먼저 봅니다. 히트하면 { wireModelId } 만 돌려 thinkingLevel 이 없습니다. 테스트도 gemini-3.1-pro low 가 예전 { wireModelId, thinkingLevel: "low" } 에서 wire id 만 남게 바뀌었습니다. wire id 가 이미 -low 를 담고 있으면 중복일 수 있지만, envelope 가 thinkingLevel 을 따로 쓰는 경로면 접힌 모델에서 effort 파라미터가 빠집니다. 요청 effort 가 맵에 없고 default 도 없으면 Object.values(effortMap)[0] 입니다. 삽입 순 첫 키라서 의도와 다른 tier 가 나갈 수 있습니다.

future-flash-low|medium|high 는 known picker 가 아니라 suffix 접힘이 실패한다는 기존 케이스가 남아 있습니다. 이 파일만 고쳤고 문서 변경은 없습니다.

해결방안: CHANGES_REQUESTED 를 먼저 닫으십시오. 접힌 경로에서 thinkingLevel 을 빼는 것이 envelope 계약과 맞는지 기존 사다리 테스트와 한 줄로 대조하십시오. 맵 miss 의 fallback 을 첫 값 대신 default effort 또는 대표 wireModelId 로 고정하십시오. 불완전 세트(low+high 만)가 접히지 않는 것을 테스트로 남기십시오.

이 댓글은 grok-bot이 작성했습니다

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

Labels

bug Something isn't working review-ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants