@@ -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 : {
@@ -314,11 +315,12 @@ describe("realtime voice provider resolver", () => {
314315 } ;
315316 attachInternalRealtimeVoiceProviderApi ( provider , {
316317 isBrowserSessionConfigured : ( ) => true ,
317- resolveBrowserSessionCapabilities : ( { providerConfig, model } ) => ( {
318+ resolveBrowserSessionCapabilities : ( { providerConfig, agentId , model } ) => ( {
318319 transports : [ "webrtc" ] ,
319320 inputAudioFormats : [ ] ,
320321 outputAudioFormats : [ ] ,
321322 supportsVideoFrames : providerConfig . authMode !== "native" && model === "gpt-live-1" ,
323+ supportsGatewayControl : agentId === "molty" ,
322324 } ) ,
323325 } ) ;
324326
@@ -330,13 +332,22 @@ describe("realtime voice provider resolver", () => {
330332 surface : "browser-session" ,
331333 } ) ?. supportsVideoFrames ,
332334 ) . toBe ( false ) ;
335+ const scopedCapabilities = resolveRealtimeVoiceProviderCapabilities ( {
336+ provider,
337+ providerConfig : { authMode : "oauth" } ,
338+ agentId : "molty" ,
339+ model : "gpt-live-1" ,
340+ surface : "browser-session" ,
341+ } ) ;
342+ expect ( scopedCapabilities ?. supportsVideoFrames ) . toBe ( true ) ;
343+ expect ( scopedCapabilities ?. supportsGatewayControl ) . toBe ( true ) ;
333344 expect (
334345 resolveRealtimeVoiceProviderCapabilities ( {
335346 provider,
336347 providerConfig : { authMode : "oauth" } ,
337348 model : "gpt-live-1" ,
338349 surface : "browser-session" ,
339- } ) ?. supportsVideoFrames ,
340- ) . toBe ( true ) ;
350+ } ) ?. supportsGatewayControl ,
351+ ) . toBe ( false ) ;
341352 } ) ;
342353} ) ;
0 commit comments