@@ -95,25 +95,46 @@ describe("FireworksHandler", () => {
9595 } )
9696
9797 it . each ( [
98- { modelId : "accounts/fireworks/models/glm-5p1" as const , contextWindow : 202752 , inputPrice : 1.4 , outputPrice : 4.4 , cacheReadsPrice : 0.26 } ,
99- { modelId : "accounts/fireworks/models/kimi-k2p6" as const , contextWindow : 262144 , inputPrice : 0.95 , outputPrice : 4.0 , cacheReadsPrice : 0.16 } ,
100- { modelId : "accounts/fireworks/models/deepseek-v4-pro" as const , contextWindow : 1048576 , inputPrice : 1.74 , outputPrice : 3.48 , cacheReadsPrice : 0.14 } ,
101- ] ) ( "should expose newly added model $modelId" , ( { modelId, contextWindow, inputPrice, outputPrice, cacheReadsPrice } ) => {
102- expect ( fireworksModels [ modelId ] ) . toBeDefined ( )
103- const info = fireworksModels [ modelId ]
104- expect ( info . maxTokens ) . toBeGreaterThan ( 0 )
105- expect ( info . contextWindow ) . toBe ( contextWindow )
106- expect ( info . inputPrice ) . toBe ( inputPrice )
107- expect ( info . outputPrice ) . toBe ( outputPrice )
108- expect ( info . cacheReadsPrice ) . toBe ( cacheReadsPrice )
109- expect ( info . description ) . toBeTruthy ( )
110-
111- const handlerWithModel = new FireworksHandler ( {
112- apiModelId : modelId ,
113- fireworksApiKey : "test-fireworks-api-key" ,
114- } )
115- expect ( handlerWithModel . getModel ( ) . id ) . toBe ( modelId )
116- } )
98+ {
99+ modelId : "accounts/fireworks/models/glm-5p1" as const ,
100+ contextWindow : 202752 ,
101+ inputPrice : 1.4 ,
102+ outputPrice : 4.4 ,
103+ cacheReadsPrice : 0.26 ,
104+ } ,
105+ {
106+ modelId : "accounts/fireworks/models/kimi-k2p6" as const ,
107+ contextWindow : 262144 ,
108+ inputPrice : 0.95 ,
109+ outputPrice : 4.0 ,
110+ cacheReadsPrice : 0.16 ,
111+ } ,
112+ {
113+ modelId : "accounts/fireworks/models/deepseek-v4-pro" as const ,
114+ contextWindow : 1048576 ,
115+ inputPrice : 1.74 ,
116+ outputPrice : 3.48 ,
117+ cacheReadsPrice : 0.14 ,
118+ } ,
119+ ] ) (
120+ "should expose newly added model $modelId" ,
121+ ( { modelId, contextWindow, inputPrice, outputPrice, cacheReadsPrice } ) => {
122+ expect ( fireworksModels [ modelId ] ) . toBeDefined ( )
123+ const info = fireworksModels [ modelId ]
124+ expect ( info . maxTokens ) . toBeGreaterThan ( 0 )
125+ expect ( info . contextWindow ) . toBe ( contextWindow )
126+ expect ( info . inputPrice ) . toBe ( inputPrice )
127+ expect ( info . outputPrice ) . toBe ( outputPrice )
128+ expect ( info . cacheReadsPrice ) . toBe ( cacheReadsPrice )
129+ expect ( info . description ) . toBeTruthy ( )
130+
131+ const handlerWithModel = new FireworksHandler ( {
132+ apiModelId : modelId ,
133+ fireworksApiKey : "test-fireworks-api-key" ,
134+ } )
135+ expect ( handlerWithModel . getModel ( ) . id ) . toBe ( modelId )
136+ } ,
137+ )
117138
118139 it ( "should return Kimi K2 Instruct model with correct configuration" , ( ) => {
119140 const testModelId : FireworksModelId = "accounts/fireworks/models/kimi-k2-instruct"
@@ -465,7 +486,7 @@ describe("FireworksHandler", () => {
465486 stream : true ,
466487 stream_options : { include_usage : true } ,
467488 } ) ,
468- undefined ,
489+ expect . any ( Object ) ,
469490 )
470491 } )
471492
@@ -491,7 +512,7 @@ describe("FireworksHandler", () => {
491512 expect . objectContaining ( {
492513 temperature : 0.5 ,
493514 } ) ,
494- undefined ,
515+ expect . any ( Object ) ,
495516 )
496517 } )
497518
@@ -518,7 +539,7 @@ describe("FireworksHandler", () => {
518539 expect . objectContaining ( {
519540 temperature : 1.0 ,
520541 } ) ,
521- undefined ,
542+ expect . any ( Object ) ,
522543 )
523544 } )
524545
@@ -546,7 +567,7 @@ describe("FireworksHandler", () => {
546567 expect . objectContaining ( {
547568 temperature : 0.7 ,
548569 } ) ,
549- undefined ,
570+ expect . any ( Object ) ,
550571 )
551572 } )
552573
0 commit comments