File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,15 @@ func TestCalculator_Calculate(t *testing.T) {
115115 },
116116 wantZero : false ,
117117 },
118+ {
119+ name : "gpt-5.4 basic" ,
120+ model : "gpt-5.4" ,
121+ metrics : & usage.Metrics {
122+ InputTokens : 50_000 ,
123+ OutputTokens : 5_000 ,
124+ },
125+ wantZero : false ,
126+ },
118127 {
119128 name : "gemini-2.5-pro basic" ,
120129 model : "gemini-2.5-pro" ,
@@ -216,6 +225,7 @@ func TestPriceTable_Get_PrefixMatch(t *testing.T) {
216225 {"gpt-5.1-codex" , true },
217226 {"gpt-5.2" , true },
218227 {"gpt-5.3" , true },
228+ {"gpt-5.4" , true },
219229 {"gemini-2.5-pro" , true },
220230 {"gemini-2.5-flash" , true },
221231 {"gemini-3-pro-preview" , true },
Original file line number Diff line number Diff line change @@ -276,6 +276,14 @@ func initDefaultPrices() *PriceTable {
276276 CacheReadPriceMicro : 175_000 , // $0.175/M
277277 })
278278
279+ // gpt-5.4: input=$2.50, cache_read=$0.25, output=$15
280+ pt .Set (& ModelPricing {
281+ ModelID : "gpt-5.4" ,
282+ InputPriceMicro : 2_500_000 , // $2.50/M
283+ OutputPriceMicro : 15_000_000 , // $15.00/M
284+ CacheReadPriceMicro : 250_000 , // $0.25/M
285+ })
286+
279287 // ========== GPT-4o 系列 ==========
280288 // gpt-4o: input=$2.50, output=$10, cache_read=$1.25
281289 pt .Set (& ModelPricing {
You can’t perform that action at this time.
0 commit comments