@@ -357,6 +357,38 @@ describe('AgentBlockHandler', () => {
357357 } )
358358 } )
359359
360+ it ( 'keeps the Fireworks deployment separate from the catalog billing model' , async ( ) => {
361+ mockContext . userId = 'super-user'
362+ mockExecuteProviderRequest . mockResolvedValue ( {
363+ content : 'On-demand response' ,
364+ model : 'fireworks/qwen3.7-max' ,
365+ tokens : { input : 100 , output : 20 , total : 120 } ,
366+ } )
367+
368+ await handler . execute ( mockContext , mockBlock , {
369+ model : CUSTOM_MODEL_ID ,
370+ customModelConfig : {
371+ provider : 'fireworks' ,
372+ model : 'fireworks/qwen3.7-max' ,
373+ deployment : 'accounts/acme/deployments/qwen-prod' ,
374+ credentials : { mode : 'explicit' , apiKey : 'fw-secret' } ,
375+ } ,
376+ userPrompt : 'Hello' ,
377+ } )
378+
379+ expect ( mockExecuteProviderRequest ) . toHaveBeenCalledWith (
380+ 'fireworks' ,
381+ expect . objectContaining ( {
382+ model : 'fireworks/qwen3.7-max' ,
383+ providerModel : 'accounts/acme/deployments/qwen-prod' ,
384+ apiKey : 'fw-secret' ,
385+ credentialMode : 'explicit' ,
386+ capabilityPolicy : 'passthrough' ,
387+ } ) ,
388+ expect . anything ( )
389+ )
390+ } )
391+
360392 it ( 'rejects custom model execution when Super User mode is off' , async ( ) => {
361393 mockContext . userId = 'admin-with-toggle-off'
362394 mockVerifyEffectiveSuperUser . mockResolvedValue ( {
0 commit comments