Repository navigation
fix(antigravity): restore concrete models with ACP 1.4 #20979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
pauljones0
wants to merge
9
commits into
pingdotgg:main
from
pauljones0:fix/antigravity-acp-14-model-selection
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ea8e441
fix(antigravity): restore concrete models with ACP 1.4
d1bfd46
Merge remote-tracking branch 'origin/main' into fix/antigravity-acp-1…
juliusmarminge 86d7df9
fix(antigravity): restore concrete ACP model selection
juliusmarminge 49eaa79
Merge upstream/main into fix/antigravity-acp-14-model-selection
425a6e6
fix(antigravity): cover catalog refresh and Windows framing
780b10b
fix(antigravity): bound usage aliases to known model families
f0aef0a
test(antigravity): capture native ACP 1.4.1 setup
99da6e0
fix(antigravity): handle partial catalogs and expired saved models
29ed6ad
test(antigravity): cover mixed catalogs without thinking options
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
449 changes: 449 additions & 0 deletions
449
apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
68 changes: 68 additions & 0 deletions
68
apps/server/src/provider/Drivers/antigravityUsageModels.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| interface AntigravityUsageModelDescriptor { | ||
| readonly family: "gemini" | "claude" | "gpt-oss"; | ||
| readonly rateModel: string; | ||
| readonly thinkingLevels: readonly string[]; | ||
| // Logical groups, not wire bucket IDs or a reset-cadence policy. | ||
| readonly usageBucket: "gemini" | "claude-gpt" | "argon"; | ||
| readonly idAliases: readonly number[]; | ||
| } | ||
|
|
||
| const LEGACY_THINKING_LEVELS = ["low", "medium", "high"] as const; | ||
|
|
||
| function model( | ||
| family: AntigravityUsageModelDescriptor["family"], | ||
| rateModel: string, | ||
| idAliases: readonly number[], | ||
| thinkingLevels: readonly string[] = LEGACY_THINKING_LEVELS, | ||
| usageBucket: AntigravityUsageModelDescriptor["usageBucket"] = family === "gemini" | ||
| ? "gemini" | ||
| : "claude-gpt", | ||
| ): AntigravityUsageModelDescriptor { | ||
| return { family, rateModel, idAliases, thinkingLevels, usageBucket }; | ||
| } | ||
|
|
||
| // Historical numeric aliases and effort normalization are retained from the reader. | ||
| // This is usage identity, never a selectable-model catalog or account advertisement. | ||
| const MODELS = [ | ||
| model("gemini", "gemini-2.5-pro", [246]), | ||
| model("gemini", "gemini-2.5-flash", [312]), | ||
| model("gemini", "gemini-2.5-flash-thinking", [313, 329]), | ||
| model("gemini", "gemini-2.5-flash-lite", [330]), | ||
| model("claude", "claude-sonnet-4", [281, 282]), | ||
| model("claude", "claude-opus-4", [290, 291]), | ||
| model("claude", "claude-sonnet-4-5", [333, 334]), | ||
| model("claude", "claude-haiku-4-5", [340, 341]), | ||
| model("claude", "claude-opus-4-6", [1026]), | ||
| model("claude", "claude-sonnet-4-6", [1035]), | ||
| model("gemini", "gemini-3-pro", []), | ||
| model("gemini", "gemini-3.1-pro", [1016, 1036, 1037]), | ||
| model("gemini", "gemini-3-flash-preview", [1018, 1084, 1047]), | ||
| // ACP 1.4 capture: antigravity140.fixture.ts. No captured numeric IDs for new models. | ||
| model("gemini", "gemini-3.8-flash", [], ["low", "medium", "high"]), | ||
| // https://discuss.ai.google.dev/t/argon-on-antigravity/189395/2 (separate Pro quota) | ||
| // https://discuss.ai.google.dev/t/google-loads-of-people-need-answers-for-the-new-completely-destroyed-antigravity/189699/4 (Argon Medium/High) | ||
| // https://antigravity.google/docs/models (Claude 5.5, GPT-OSS) | ||
| model("gemini", "gemini-4-argon", [], ["medium", "high"], "argon"), | ||
| model("gpt-oss", "gpt-oss-120b", [], ["medium"]), | ||
| model("claude", "claude-sonnet-5-5", [], []), | ||
| model("claude", "claude-opus-5-5", [], []), | ||
| ]; | ||
|
|
||
| const MODELS_BY_ID = new Map( | ||
| MODELS.flatMap((descriptor) => descriptor.idAliases.map((id) => [id, descriptor] as const)), | ||
| ); | ||
| const MODELS_BY_NAME = new Map( | ||
| MODELS.flatMap((descriptor) => | ||
| [ | ||
| descriptor.rateModel, | ||
| ...descriptor.thinkingLevels.map((level) => `${descriptor.rateModel}-${level}`), | ||
| ].map((name) => [name, descriptor] as const), | ||
| ), | ||
| ); | ||
|
|
||
| export const antigravityUsageModelFromId = (id: number): string | undefined => | ||
| MODELS_BY_ID.get(id)?.rateModel; | ||
|
|
||
| export const findAntigravityUsageModel = ( | ||
| name: string, | ||
| ): AntigravityUsageModelDescriptor | undefined => MODELS_BY_NAME.get(name); | ||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Register the other advertised Flash model families.
The ACP 1.4.1 fixture advertises
gemini-3.7-flash,gemini-3.6-flash, andgemini-3.5-flashwith concrete thinking-level IDs. This registry includes onlygemini-3.8-flash. If a usage record containsgemini-3.7-flash-highand the rate table contains its base-model rate,withRateModelleaves the concrete ID unchanged andpriceUsagereturnsunpriced. Register the three captured families and cover their concrete IDs in the pricing test. (raw.githubusercontent.com)