@@ -17,6 +17,7 @@ function attachInternalRealtimeVoiceProviderApi(
1717 } ) => boolean ;
1818 resolveBrowserSessionCapabilities ?: ( ctx : {
1919 providerConfig : Record < string , unknown > ;
20+ agentId ?: string ;
2021 model ?: string ;
2122 } ) => object ;
2223 isGatewayRelayConfigured ?: ( ctx : {
@@ -339,11 +340,12 @@ describe("realtime voice provider resolver", () => {
339340 } ;
340341 attachInternalRealtimeVoiceProviderApi ( provider , {
341342 isBrowserSessionConfigured : ( ) => true ,
342- resolveBrowserSessionCapabilities : ( { providerConfig, model } ) => ( {
343+ resolveBrowserSessionCapabilities : ( { providerConfig, agentId , model } ) => ( {
343344 transports : [ "webrtc" ] ,
344345 inputAudioFormats : [ ] ,
345346 outputAudioFormats : [ ] ,
346347 supportsVideoFrames : providerConfig . authMode !== "native" && model === "gpt-live-1" ,
348+ supportsGatewayControl : agentId === "molty" ,
347349 } ) ,
348350 } ) ;
349351
@@ -355,13 +357,22 @@ describe("realtime voice provider resolver", () => {
355357 surface : "browser-session" ,
356358 } ) ?. supportsVideoFrames ,
357359 ) . toBe ( false ) ;
360+ const scopedCapabilities = resolveRealtimeVoiceProviderCapabilities ( {
361+ provider,
362+ providerConfig : { authMode : "oauth" } ,
363+ agentId : "molty" ,
364+ model : "gpt-live-1" ,
365+ surface : "browser-session" ,
366+ } ) ;
367+ expect ( scopedCapabilities ?. supportsVideoFrames ) . toBe ( true ) ;
368+ expect ( scopedCapabilities ?. supportsGatewayControl ) . toBe ( true ) ;
358369 expect (
359370 resolveRealtimeVoiceProviderCapabilities ( {
360371 provider,
361372 providerConfig : { authMode : "oauth" } ,
362373 model : "gpt-live-1" ,
363374 surface : "browser-session" ,
364- } ) ?. supportsVideoFrames ,
365- ) . toBe ( true ) ;
375+ } ) ?. supportsGatewayControl ,
376+ ) . toBe ( false ) ;
366377 } ) ;
367378} ) ;
0 commit comments