@@ -24,6 +24,7 @@ const GOOGLE_LIVE_WS_URL =
2424
2525type RealtimeSmokeCliOptions = {
2626 help : boolean ;
27+ openAIOnly : boolean ;
2728} ;
2829
2930// Keep live stacks behind their owning smoke paths so help and safety helpers stay lightweight.
@@ -66,7 +67,8 @@ function usage(): string {
6667 "Usage: node --import tsx scripts/dev/realtime-talk-live-smoke.ts [options]" ,
6768 "" ,
6869 "Options:" ,
69- " -h, --help Show this help" ,
70+ " --openai-only Run only the OpenAI backend and browser legs" ,
71+ " -h, --help Show this help" ,
7072 "" ,
7173 "Environment:" ,
7274 " OPENAI_API_KEY" ,
@@ -76,12 +78,15 @@ function usage(): string {
7678
7779function parseRealtimeSmokeArgs ( argv = process . argv . slice ( 2 ) ) : RealtimeSmokeCliOptions {
7880 for ( const arg of argv ) {
79- if ( arg === "--help" || arg === "-h" ) {
81+ if ( arg === "--help" || arg === "-h" || arg === "--openai-only" ) {
8082 continue ;
8183 }
8284 throw new CliArgumentError ( `Unknown argument: ${ arg } ` ) ;
8385 }
84- return { help : argv . includes ( "--help" ) || argv . includes ( "-h" ) } ;
86+ return {
87+ help : argv . includes ( "--help" ) || argv . includes ( "-h" ) ,
88+ openAIOnly : argv . includes ( "--openai-only" ) ,
89+ } ;
8590}
8691
8792function getEnv ( name : string ) : string | undefined {
@@ -799,16 +804,18 @@ async function main(argv = process.argv.slice(2)): Promise<void> {
799804 results . push ( await smokeOpenAIBackendBridge ( openAIKey ) ) ;
800805 results . push ( await smokeOpenAIWebRtc ( browser , openAIKey ) ) ;
801806 }
802- if ( ! googleKey ) {
803- results . push ( {
804- name : "google-live-browser-ws" ,
805- ok : false ,
806- details : { error : "GEMINI_API_KEY or GOOGLE_API_KEY missing" } ,
807- } ) ;
808- } else {
809- results . push ( await smokeGoogleLiveBrowserWs ( browser , googleKey ) ) ;
807+ if ( ! cli . openAIOnly ) {
808+ if ( ! googleKey ) {
809+ results . push ( {
810+ name : "google-live-browser-ws" ,
811+ ok : false ,
812+ details : { error : "GEMINI_API_KEY or GOOGLE_API_KEY missing" } ,
813+ } ) ;
814+ } else {
815+ results . push ( await smokeGoogleLiveBrowserWs ( browser , googleKey ) ) ;
816+ }
817+ results . push ( await smokeGatewayRelayBrowser ( browser ) ) ;
810818 }
811- results . push ( await smokeGatewayRelayBrowser ( browser ) ) ;
812819 } finally {
813820 await browser . close ( ) ;
814821 }
0 commit comments