@@ -14,7 +14,7 @@ use crate::{
1414 amp, antigravity, claude, codebuff, codex, copilot, droid, gemini, goose, grok, hermes,
1515 kilo, kimi, openclaw, opencode, pi, qwen, zcode,
1616 } ,
17- cli:: { AgentReportKind , CodexSpeed , NamedPiStore , SharedArgs , WeekDay } ,
17+ cli:: { AgentReportKind , CodexSpeed , CostMode , NamedPiStore , SharedArgs , WeekDay } ,
1818 filter_loaded_entries_by_date, json_float,
1919} ;
2020
@@ -674,7 +674,7 @@ fn load_codex_rows(
674674 return Ok ( AgentRows {
675675 rows : groups
676676 . iter ( )
677- . map ( |( period, group) | codex_group_row ( period, group, pricing, speed) )
677+ . map ( |( period, group) | codex_group_row ( period, group, pricing, speed, shared . mode ) )
678678 . collect ( ) ,
679679 detected,
680680 } ) ;
@@ -687,7 +687,7 @@ fn load_codex_rows(
687687 Ok ( AgentRows {
688688 rows : groups
689689 . iter ( )
690- . map ( |( period, group) | codex_group_row ( period, group, pricing, speed) )
690+ . map ( |( period, group) | codex_group_row ( period, group, pricing, speed, shared . mode ) )
691691 . collect ( ) ,
692692 detected,
693693 } )
@@ -829,6 +829,7 @@ pub(super) fn codex_group_row<S>(
829829 group : & CodexGroup ,
830830 pricing : & PricingMap ,
831831 speed : S ,
832+ mode : CostMode ,
832833) -> AllRow
833834where
834835 S : Into < codex:: CodexSpeedPolicy > + Copy ,
@@ -851,7 +852,8 @@ where
851852 cache_read_tokens : usage. cached_input_tokens ,
852853 extra_total_tokens : 0 ,
853854 cost : codex:: calculate_codex_model_cost ( model, usage, pricing, speed) ,
854- missing_pricing : codex:: codex_model_missing_pricing ( model, usage, pricing) ,
855+ missing_pricing : mode != CostMode :: Display
856+ && codex:: codex_model_missing_pricing ( model, usage, pricing) ,
855857 }
856858 } )
857859 . collect ( ) ;
@@ -1097,7 +1099,7 @@ mod tests {
10971099 let speed = codex:: CodexSpeedPolicy :: Auto ( codex:: CodexServiceTier :: Standard ) ;
10981100
10991101 let focused_cost = codex:: calculate_group_cost ( & group, & pricing, speed) ;
1100- let unified = codex_group_row ( "2026-07-22" , & group, & pricing, speed) ;
1102+ let unified = codex_group_row ( "2026-07-22" , & group, & pricing, speed, CostMode :: Calculate ) ;
11011103
11021104 assert ! ( ( focused_cost - 40e-6 ) . abs( ) < f64 :: EPSILON ) ;
11031105 assert ! ( ( unified. total_cost - focused_cost) . abs( ) < f64 :: EPSILON ) ;
@@ -1134,6 +1136,7 @@ mod tests {
11341136 & group,
11351137 & pricing,
11361138 codex:: CodexSpeedPolicy :: Forced ( codex:: CodexServiceTier :: Standard ) ,
1139+ CostMode :: Calculate ,
11371140 ) ;
11381141 let expected_cost =
11391142 2_124.0 * 4e-6 + 875_306.0 * 0.4e-6 + 57_610.0 * 5e-6 + 11_150.0 * 18e-6 ;
0 commit comments