Fix Antigravity model mapping (fixes #486)#514
Fix Antigravity model mapping (fixes #486)#514johnyoonh wants to merge 2 commits intosteipete:mainfrom
Conversation
There was a problem hiding this comment.
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.
| // 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) |
| 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 | ||
| } |
| // 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) | ||
| } |
There was a problem hiding this comment.
💡 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".
| let descriptionWithModel = [quota.resetDescription, "(\(quota.label))"] | ||
| .compactMap { $0 } | ||
| .joined(separator: " ") |
There was a problem hiding this comment.
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 👍 / 👎.
2883be0 to
faf434e
Compare
There was a problem hiding this comment.
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.
| 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) | ||
| } |
| // 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)" | |||
|
@copilot open a new pull request to apply changes based on the comments in this thread |
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>
faf434e to
7e5f698
Compare
| !ordered.contains(where: { $0.label == pro.label }) | ||
| { | ||
|
|
||
| // Priority 1: Gemini Pro models (High/Low) - this is the primary/shared quota |
There was a problem hiding this comment.
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)" | |||
There was a problem hiding this comment.
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.
Summary
Fixes issue #486 where Claude and Gemini icons/labels were swapped in Antigravity tab.
Changes
Testing