Skip to content

Fix Antigravity model mapping (fixes #486)#514

Open
johnyoonh wants to merge 2 commits intosteipete:mainfrom
johnyoonh:fix/antigravity-model-mapping
Open

Fix Antigravity model mapping (fixes #486)#514
johnyoonh wants to merge 2 commits intosteipete:mainfrom
johnyoonh:fix/antigravity-model-mapping

Conversation

@johnyoonh
Copy link

Summary

Fixes issue #486 where Claude and Gemini icons/labels were swapped in Antigravity tab.

Changes

  • Primary: Gemini Pro models (High/Low) - shared quota with Claude
  • Secondary: Gemini Flash models
  • Removed Claude from separate display (shares Pro quota, not separate)
  • Fixed model selection logic to match current Antigravity naming
  • Updated labels to reflect actual model names

Testing

  • Verified correct model names appear in menu
  • Reset times match expected values for each model tier

Copilot AI review requested due to automatic review settings March 13, 2026 03:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes Antigravity’s displayed model mapping so the Antigravity tab/menu reflects Gemini Pro (primary/shared) and Gemini Flash (secondary), addressing issue #486 where Claude/Gemini labeling appeared swapped.

Changes:

  • Updates Antigravity model selection to prioritize Gemini Pro first, then Gemini Flash, and stops displaying Claude as a separate quota.
  • Updates Antigravity provider metadata labels (session/weekly) and disables opus/tertiary display.
  • Attempts to include the selected model label in the reset description text.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
Sources/CodexBarCore/Providers/Antigravity/AntigravityStatusProbe.swift Changes quota ordering logic (Gemini Pro/Flash) and adjusts how RateWindow.resetDescription is constructed.
Sources/CodexBarCore/Providers/Antigravity/AntigravityProviderDescriptor.swift Updates UI labels for primary/secondary tiers and disables opus/tertiary support for Antigravity.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +48 to +57
// Include the model name in the reset description for display in the UI
let descriptionWithModel = [quota.resetDescription, "(\(quota.label))"]
.compactMap { $0 }
.joined(separator: " ")

return RateWindow(
usedPercent: 100 - quota.remainingPercent,
windowMinutes: nil,
resetsAt: quota.resetTime,
resetDescription: quota.resetDescription)
resetDescription: descriptionWithModel)
Comment on lines 60 to 79
private static func selectModels(_ models: [AntigravityModelQuota]) -> [AntigravityModelQuota] {
var ordered: [AntigravityModelQuota] = []
if let claude = models.first(where: { Self.isClaudeWithoutThinking($0.label) }) {
ordered.append(claude)
}
if let pro = models.first(where: { Self.isGeminiProLow($0.label) }),
!ordered.contains(where: { $0.label == pro.label })
{

// Priority 1: Gemini Pro models (High/Low) - this is the primary/shared quota
// Claude models share this same quota, so we don't display them separately
if let pro = models.first(where: { Self.isGeminiPro($0.label) }) {
ordered.append(pro)
}
if let flash = models.first(where: { Self.isGeminiFlash($0.label) }),
!ordered.contains(where: { $0.label == flash.label })
{

// Priority 2: Gemini Flash models - secondary quota
if let flash = models.first(where: { Self.isGeminiFlash($0.label) }) {
ordered.append(flash)
}

// Fallback: sort by remaining percent (most constrained first)
if ordered.isEmpty {
ordered.append(contentsOf: models.sorted(by: { $0.remainingPercent < $1.remainingPercent }))
}
return ordered
}
Comment on lines +63 to 67
// Priority 1: Gemini Pro models (High/Low) - this is the primary/shared quota
// Claude models share this same quota, so we don't display them separately
if let pro = models.first(where: { Self.isGeminiPro($0.label) }) {
ordered.append(pro)
}
Copy link

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

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: 2883be03bd

ℹ️ 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".

Comment on lines +49 to +51
let descriptionWithModel = [quota.resetDescription, "(\(quota.label))"]
.compactMap { $0 }
.joined(separator: " ")

Choose a reason for hiding this comment

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

P2 Badge Keep reset description empty when reset time is absent

rateWindow(for:) now always builds a non-empty resetDescription by appending ("\(quota.label)"), even when the API provides no usable reset timestamp. Because QuotaInfo.resetTime is optional and parse failures leave resetsAt nil, this causes UsageFormatter.resetLine to render misleading text like Resets (Gemini Pro) for quotas with unknown reset times. This is a user-visible accuracy regression; resetDescription should stay nil unless there is an actual reset description.

Useful? React with 👍 / 👎.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes Antigravity quota/model display mapping so the UI labels correspond to the intended Gemini tiers (addressing the swapped Claude/Gemini presentation from #486).

Changes:

  • Updates Antigravity model prioritization to surface Gemini Pro first and Gemini Flash second (removing separate Claude display).
  • Updates Antigravity provider UI labels and disables the third/“Opus” tier for this provider.
  • Adds two repo-root files (output.log, .envrc) that appear unrelated to the feature change.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
Sources/CodexBarCore/Providers/Antigravity/AntigravityStatusProbe.swift Changes quota/model selection ordering and modifies how reset descriptions are constructed.
Sources/CodexBarCore/Providers/Antigravity/AntigravityProviderDescriptor.swift Updates menu labels (Gemini Pro/Flash) and disables the tertiary tier for Antigravity.
output.log Adds a captured interactive terminal log to the repo.
.envrc Adds a local environment variable with a hard-coded Apple Development signing identity.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 64 to 76
private static func selectModels(_ models: [AntigravityModelQuota]) -> [AntigravityModelQuota] {
var ordered: [AntigravityModelQuota] = []
if let claude = models.first(where: { Self.isClaudeWithoutThinking($0.label) }) {
ordered.append(claude)
}
if let pro = models.first(where: { Self.isGeminiProLow($0.label) }),
!ordered.contains(where: { $0.label == pro.label })
{

// Priority 1: Gemini Pro models (High/Low) - this is the primary/shared quota
// Claude models share this same quota, so we don't display them separately
if let pro = models.first(where: { Self.isGeminiPro($0.label) }) {
ordered.append(pro)
}
if let flash = models.first(where: { Self.isGeminiFlash($0.label) }),
!ordered.contains(where: { $0.label == flash.label })
{

// Priority 2: Gemini Flash models - secondary quota
if let flash = models.first(where: { Self.isGeminiFlash($0.label) }) {
ordered.append(flash)
}
Comment on lines +48 to +61
// Include the model name in the reset description for display in the UI
// Only append model label if there's an actual reset description to avoid misleading text
let descriptionWithModel: String?
if let resetDesc = quota.resetDescription {
descriptionWithModel = "\(resetDesc) (\(quota.label))"
} else {
descriptionWithModel = nil
}

return RateWindow(
usedPercent: 100 - quota.remainingPercent,
windowMinutes: nil,
resetsAt: quota.resetTime,
resetDescription: quota.resetDescription)
resetDescription: descriptionWithModel)
@@ -0,0 +1 @@
export APP_IDENTITY="Apple Development: admin@tildawatch.com (L5JKSML5PC)"
@johnyoonh
Copy link
Author

@copilot open a new pull request to apply changes based on the comments in this thread

johnyoonh and others added 2 commits March 13, 2026 02:44
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Primary: Gemini Pro models (High/Low) - shared quota with Claude
- Secondary: Gemini Flash models
- Removed Claude from display (shares Pro quota, not separate)
- Fixed model selection logic to match current Antigravity naming
- Updated labels to reflect actual model names
- Only show model label in reset description when reset time exists (avoids misleading 'Resets (Gemini Pro)' text)

Fixes issue where Claude and Gemini labels were swapped in Antigravity tab.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
@johnyoonh johnyoonh force-pushed the fix/antigravity-model-mapping branch from faf434e to 7e5f698 Compare March 13, 2026 07:46
!ordered.contains(where: { $0.label == pro.label })
{

// Priority 1: Gemini Pro models (High/Low) - this is the primary/shared quota
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we double-check whether Claude still has its own quota window in current Antigravity responses? This change stops surfacing Claude separately, but the existing Antigravity docs and test fixture still model three windows (Claude, Gemini Pro, Gemini Flash), so I’m wondering if we’re collapsing a distinct limit here.

@@ -0,0 +1 @@
export APP_IDENTITY="Apple Development: admin@tildawatch.com (L5JKSML5PC)"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could this affect other contributors who use direnv in this repo? Since the build scripts honor APP_IDENTITY when it is set, I’m wondering whether checking in a machine-specific value here would bypass each developer’s normal signing auto-detection and change their local build behavior.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants