Skip to content

Commit ce439e5

Browse files
ryoppippicursoragentShobitm
authored
fix(antigravity): map model ID 1050 to gemini-3.1-flash-lite (ccusage#1902)
* fix(antigravity): map model ID 1050 to gemini-3.1-flash-lite Antigravity's internal sub-agent model MODEL_PLACEHOLDER_M50 (enum 1050) is labeled Gemini 3.1 Flash Lite by the platform. Map the numeric ID and the placeholder name so those steps are priced instead of reported as model_placeholder_m50. ID 1277 stays unmapped because its model is not publicly identifiable. Co-authored-by: Shobitm <[email protected]> * test(antigravity): cover sub-agent step model IDs through the loader Co-authored-by: Shobitm <[email protected]> * test(antigravity): drop redundant sub-agent model ID tests The table-driven placeholder test already covers ID 1050, and ID 1277 falls through the generic placeholder arm that existing tests cover. * fix(antigravity): drop redundant parser test and satisfy clippy range lint Use 1417..=1419 for the Gemini 4 Argon IDs to satisfy clippy::manual_range_patterns, and remove the 1050/1277 parser test that duplicates the table-driven placeholder coverage. --------- Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: Shobitm <[email protected]>
1 parent f6d28c5 commit ce439e5

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎rust/adapters/antigravity/src/parser.rs‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,8 @@ fn model_name_from_id(model_id: u64) -> String {
866866
1071 => "gemini-3.6-flash-high".to_string(),
867867
1072 => "gemini-3.6-flash-medium".to_string(),
868868
1073 => "gemini-3.6-flash-low".to_string(),
869-
1417 | 1418 | 1419 => "gemini-4-argon".to_string(),
869+
1417..=1419 => "gemini-4-argon".to_string(),
870+
1050 => "gemini-3.1-flash-lite".to_string(),
870871
1_000.. => format!("model_placeholder_m{}", model_id - 1_000),
871872
_ => format!("antigravity-model-{model_id}"),
872873
}
@@ -921,6 +922,7 @@ fn normalize_antigravity_model(raw: &str) -> Option<String> {
921922
"model_placeholder_m417" | "model_placeholder_m418" | "model_placeholder_m419" => {
922923
"gemini-4-argon"
923924
}
925+
"model_placeholder_m50" => "gemini-3.1-flash-lite",
924926
"model_placeholder_m26" => "claude-opus-4-6",
925927
"model_placeholder_m35" => "claude-sonnet-4-6",
926928
"model_placeholder_m36" | "model_placeholder_m37" | "model_placeholder_m16" => {
@@ -1566,6 +1568,12 @@ mod tests {
15661568
"Gemini 4 Argon",
15671569
"gemini-4-argon",
15681570
),
1571+
(
1572+
1050,
1573+
"model_placeholder_m50",
1574+
"Gemini 3.1 Flash Lite",
1575+
"gemini-3.1-flash-lite",
1576+
),
15691577
];
15701578

15711579
for (model_id, placeholder, display_name, expected) in cases {

0 commit comments

Comments
 (0)