Skip to content

Commit 7c4cd74

Browse files
committed
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.
1 parent 2b9435b commit 7c4cd74

1 file changed

Lines changed: 1 addition & 31 deletions

File tree

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

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ 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(),
870870
1050 => "gemini-3.1-flash-lite".to_string(),
871871
1_000.. => format!("model_placeholder_m{}", model_id - 1_000),
872872
_ => format!("antigravity-model-{model_id}"),
@@ -1593,36 +1593,6 @@ mod tests {
15931593
);
15941594
}
15951595

1596-
#[test]
1597-
fn flash_lite_subagent_model_is_priced_and_unknown_ids_stay_traceable() {
1598-
let pricing = PricingMap::load_embedded();
1599-
let usage = TokenUsageRaw {
1600-
input_tokens: 1_000_000,
1601-
..TokenUsageRaw::default()
1602-
};
1603-
let flash_lite = model_name_from_id(1050);
1604-
assert!(
1605-
missing_antigravity_pricing(&flash_lite, None, usage, CostMode::Calculate, &pricing)
1606-
.is_none()
1607-
);
1608-
assert!(
1609-
calculate_antigravity_cost(
1610-
&flash_lite,
1611-
None,
1612-
usage,
1613-
TimestampMs::UNIX_EPOCH,
1614-
CostMode::Calculate,
1615-
&pricing,
1616-
) > 0.0
1617-
);
1618-
1619-
assert_eq!(model_name_from_id(1277), "model_placeholder_m277");
1620-
assert_eq!(
1621-
normalize_antigravity_model("model_placeholder_m277").as_deref(),
1622-
Some("model_placeholder_m277")
1623-
);
1624-
}
1625-
16261596
#[test]
16271597
fn newer_gemini_effort_variants_fall_back_to_base_pricing() {
16281598
assert_eq!(

0 commit comments

Comments
 (0)