Skip to content

[WRONG BRANCH] fix(antigravity): preserve migrated default reasoning tier - #283

Draft
luvs01 wants to merge 1 commit into
mainfrom
codex/fix-antigravity-tier-id-migration-issue
Draft

[WRONG BRANCH] fix(antigravity): preserve migrated default reasoning tier#283
luvs01 wants to merge 1 commit into
mainfrom
codex/fix-antigravity-tier-id-migration-issue

Conversation

@luvs01

@luvs01 luvs01 commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Motivation

  • The model rename migration rewrote tier-specific retired Antigravity IDs (e.g. gemini-3.6-flash-high) to the bare gemini-3.7-flash, which dropped the tier encoded by the saved defaultModel and caused routed calls to fall back to the 3.7 default thinkingLevel.

Description

  • Add an optional preserveDefaultModel flag to ModelRename to allow leaving a saved defaultModel untouched when the legacy id encodes request semantics the replacement cannot represent.
  • Set preserveDefaultModel for tier-specific retired Antigravity Flash ids (but not the bare gemini-3.6-flash) so list/catalog fields are renamed while a tier-bearing saved default is retained.
  • Change projectModelRenames to skip rewriting prov.defaultModel when rename.preserveDefaultModel is true.
  • Update tests/gemini-37-flash-migration.test.ts to assert that a migrated gemini-3.6-flash-high remains the saved default and still resolves to gemini-3.7-flash with `thinkingLevel:

Codex Task

Summary by CodeRabbit

  • Bug Fixes
    • Improved retired-model migration for tiered Flash models.
    • Preserved saved tier-specific defaults where applicable, while still updating model selections and metadata.
    • Removed duplicate entries from migrated model lists.
    • Legacy tiered defaults now resolve to the current Flash model with the appropriate historical thinking level.

@github-actions

Copy link
Copy Markdown

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Aug 14, 2026
@github-actions github-actions Bot changed the title fix(antigravity): preserve migrated default reasoning tier [WRONG BRANCH] fix(antigravity): preserve migrated default reasoning tier Aug 14, 2026
@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown

⏳ DRAFT

  • wrong target branch (main); retarget to dev.

What to do

  • Retarget this PR to dev — all contributions go to dev.

Its title has been prefixed with [WRONG BRANCH].
This pull request was already a draft. Its draft status will be preserved after every issue above is resolved.

@github-actions
github-actions Bot marked this pull request as draft August 14, 2026 09:53
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

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: 49dec833-30d6-47ed-8c79-9ff79cf5717b

📥 Commits

Reviewing files that changed from the base of the PR and between f05ba75 and 8a4d261.

📒 Files selected for processing (2)
  • src/providers/model-rename-migration.ts
  • tests/gemini-37-flash-migration.test.ts

📝 Walkthrough

Walkthrough

The migration adds conditional preservation for tier-specific legacy defaults. Antigravity Flash tier mappings retain their saved defaults while updating model lists and metadata. Tests verify deduplication and resolution to the new wire model with the historical thinking level.

Changes

Model default preservation

Layer / File(s) Summary
Conditional default migration
src/providers/model-rename-migration.ts, tests/gemini-37-flash-migration.test.ts
ModelRename supports preserveDefaultModel. Tiered Antigravity Flash mappings retain legacy defaults, while the base model default is still renamed. The migration test verifies the retained gemini-3.6-flash-high default and its resolution to gemini-3.7-flash with high thinking.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 8a4d2

This localized migration fix preserves tier-specific saved defaults while continuing to rename the underlying model, and no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: lidge-jun, ingwannu

🚥 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 identifies the Antigravity change to preserve the migrated default reasoning tier.
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 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-antigravity-tier-id-migration-issue

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8a4d2612e7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

dropReasoningEffortMap: true,
// Tier-specific retired ids remain valid routing aliases. Replacing one when it is
// the saved default would discard its encoded tier and make 3.7 default to medium.
preserveDefaultModel: from !== "gemini-3.6-flash",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve the tier through OAuth reconciliation

For the normal google-antigravity configuration with authMode: "oauth", this flag is undone during the same startup: startServer runs the rename migration and then reconcileOAuthProviders (src/server/index.ts:494-505), whose stale-default check replaces any default absent from the refreshed preset model list with gemini-3.7-flash (src/oauth/index.ts:935-942). Since the tier-bearing alias is deliberately removed from models, a saved gemini-3.6-flash-high therefore still becomes the medium default before requests are served. Preserve recognized compatibility aliases during OAuth reconciliation (or persist the tier separately), and cover the actual migration-plus-reconciliation sequence rather than testing the projection alone.

AGENTS.md reference: src/AGENTS.md:L24-L26

Useful? React with 👍 / 👎.

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

Labels

aardvark bug Something isn't working codex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant