Skip to content

Commit c610a69

Browse files
authored
Add GPT-5.5 long-context pricing (#151)
1 parent f55b9c0 commit c610a69

1 file changed

Lines changed: 44 additions & 11 deletions

File tree

src/models.rs

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -565,22 +565,54 @@ fn populate_defaults(
565565

566566
add_model!(
567567
"gpt-5.5",
568-
PricingStructure::Flat {
569-
input_per_1m: 5.0,
570-
output_per_1m: 30.0
571-
},
572-
CachingSupport::OpenAI {
573-
cached_input_per_1m: 0.50
574-
},
568+
PricingStructure::Tiered(TieredPricing {
569+
tiers: vec![
570+
PricingTier {
571+
max_tokens: Some(272_000),
572+
input_per_1m: 5.0,
573+
output_per_1m: 30.0
574+
},
575+
PricingTier {
576+
max_tokens: None,
577+
input_per_1m: 10.0,
578+
output_per_1m: 45.0
579+
},
580+
],
581+
bracket_pricing: false,
582+
}),
583+
CachingSupport::Google(TieredCaching {
584+
tiers: vec![
585+
CachingTier {
586+
max_tokens: Some(272_000),
587+
cached_input_per_1m: 0.50
588+
},
589+
CachingTier {
590+
max_tokens: None,
591+
cached_input_per_1m: 1.25
592+
},
593+
],
594+
bracket_pricing: false,
595+
}),
575596
false
576597
);
577598

578599
add_model!(
579600
"gpt-5.5-pro",
580-
PricingStructure::Flat {
581-
input_per_1m: 30.0,
582-
output_per_1m: 180.0
583-
},
601+
PricingStructure::Tiered(TieredPricing {
602+
tiers: vec![
603+
PricingTier {
604+
max_tokens: Some(272_000),
605+
input_per_1m: 30.0,
606+
output_per_1m: 180.0
607+
},
608+
PricingTier {
609+
max_tokens: None,
610+
input_per_1m: 60.0,
611+
output_per_1m: 270.0
612+
},
613+
],
614+
bracket_pricing: false,
615+
}),
584616
CachingSupport::None,
585617
false
586618
);
@@ -1289,6 +1321,7 @@ fn populate_defaults(
12891321
add_alias!("gpt-5.4-mini", "gpt-5.4-mini");
12901322
add_alias!("gpt-5.4-nano", "gpt-5.4-nano");
12911323
add_alias!("gpt-5.5", "gpt-5.5");
1324+
add_alias!("gpt-5.5-2026-04-23", "gpt-5.5");
12921325
add_alias!("gpt-5.5-pro", "gpt-5.5-pro");
12931326

12941327
// Anthropic aliases

0 commit comments

Comments
 (0)