Skip to content

Commit c773e31

Browse files
committed
test(codex): cover Astra long-context fast pricing
1 parent 385dd89 commit c773e31

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎rust/adapters/codex/src/lib.rs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,15 +516,17 @@ mod tests {
516516
input_tokens: 1_000_000,
517517
cached_input_tokens: 1_000_000,
518518
total_tokens: 1_000_000,
519+
long_context_input_tokens: 1_000_000,
520+
long_context_cached_input_tokens: 1_000_000,
519521
..CodexModelUsage::default()
520522
};
521523

522524
let standard =
523525
calculate_codex_model_cost("gpt-6-astra", &usage, &pricing, CodexSpeed::Standard);
524526
let fast = calculate_codex_model_cost("gpt-6-astra", &usage, &pricing, CodexSpeed::Fast);
525527

526-
assert!((standard - 1.0).abs() < f64::EPSILON);
527-
assert!((fast - 2.0).abs() < f64::EPSILON);
528+
assert!((standard - 2.0).abs() < f64::EPSILON);
529+
assert!((fast - 4.0).abs() < f64::EPSILON);
528530
}
529531

530532
#[test]

0 commit comments

Comments
 (0)