@@ -187,6 +187,7 @@ async function createOpenAIRealtimeBrowserSession(
187187 const auth = await requireOpenAIRealtimePlatformAuth ( {
188188 configuredApiKey : config . apiKey ,
189189 cfg : req . cfg ,
190+ agentId : req . agentId ,
190191 } ) ;
191192 const voice = normalizeOpenAIRealtimeVoice ( req . voice ) ?? config . voice ?? "alloy" ;
192193 const sessionConfig = buildOpenAIRealtimeGaSessionPolicy ( {
@@ -268,12 +269,14 @@ async function createOpenAIRealtimeBrowserSession(
268269 const auth = await resolveOpenAIRealtimePlatformAuth ( {
269270 configuredApiKey : config . apiKey ,
270271 cfg : req . cfg ,
272+ agentId : req . agentId ,
271273 } ) ;
272274 if ( auth . status === "missing" ) {
273275 if (
274276 hasOpenAIRealtimePlatformAuthInput ( {
275277 configuredApiKey : config . apiKey ,
276278 cfg : req . cfg ,
279+ agentId : req . agentId ,
277280 } )
278281 ) {
279282 throw new Error ( OPENAI_REALTIME_PLATFORM_AUTH_REQUIRED ) ;
@@ -334,7 +337,7 @@ export function buildOpenAIRealtimeVoiceProvider(options?: {
334337 autoSelectOrder : 10 ,
335338 capabilities : OPENAI_REALTIME_CAPABILITIES ,
336339 resolveConfig : ( { rawConfig } ) => normalizeProviderConfig ( rawConfig ) ,
337- isConfigured : ( { cfg, providerConfig } ) => {
340+ isConfigured : ( { cfg, providerConfig, agentId } ) => {
338341 const config = normalizeProviderConfig ( providerConfig ) ;
339342 if ( config . azureEndpoint || config . azureDeployment ) {
340343 return hasOpenAIRealtimeApiKeyInput ( config . apiKey ) ;
@@ -343,6 +346,7 @@ export function buildOpenAIRealtimeVoiceProvider(options?: {
343346 hasOpenAIRealtimePlatformAuthInput ( {
344347 configuredApiKey : config . apiKey ,
345348 cfg,
349+ agentId,
346350 } )
347351 ) {
348352 return true ;
@@ -384,6 +388,7 @@ export function buildOpenAIRealtimeVoiceProvider(options?: {
384388 await requireOpenAIRealtimePlatformAuth ( {
385389 configuredApiKey : config . apiKey ,
386390 cfg : req . cfg ,
391+ agentId : req . agentId ,
387392 } )
388393 ) . value ,
389394 } ) ,
@@ -429,6 +434,7 @@ export function buildOpenAIRealtimeVoiceProvider(options?: {
429434 ( hasOpenAIRealtimePlatformAuthInput ( {
430435 configuredApiKey : config . apiKey ,
431436 cfg,
437+ agentId,
432438 } ) ||
433439 hasOpenAIChatGptSubscriptionAuthInput ( { cfg, agentId } ) )
434440 ) ;
@@ -437,6 +443,7 @@ export function buildOpenAIRealtimeVoiceProvider(options?: {
437443 hasOpenAIRealtimePlatformAuthInput ( {
438444 configuredApiKey : config . apiKey ,
439445 cfg,
446+ agentId,
440447 } ) ||
441448 ( options ?. quicksilverBrowserSessionBroker !== undefined &&
442449 hasOpenAIChatGptSubscriptionAuthInput ( { cfg, agentId } ) )
@@ -471,6 +478,7 @@ export function buildOpenAIRealtimeVoiceProvider(options?: {
471478 ( hasOpenAIRealtimePlatformAuthInput ( {
472479 configuredApiKey : config . apiKey ,
473480 cfg,
481+ agentId,
474482 } ) ||
475483 hasOpenAIChatGptSubscriptionAuthInput ( { cfg, agentId } ) )
476484 ) ;
0 commit comments