From 936ea1d4dafa81630455125b5817fd45e3993889 Mon Sep 17 00:00:00 2001 From: xquanluu Date: Tue, 20 Jan 2026 16:23:47 +0700 Subject: [PATCH] support google s2s host, version, sessionResumption --- lib/tasks/llm/llms/google_s2s.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/tasks/llm/llms/google_s2s.js b/lib/tasks/llm/llms/google_s2s.js index 415ad26f..87fe5b44 100644 --- a/lib/tasks/llm/llms/google_s2s.js +++ b/lib/tasks/llm/llms/google_s2s.js @@ -36,6 +36,9 @@ class TaskLlmGoogle_S2S extends Task { this.model = this.parent.model || 'models/gemini-2.0-flash-live-001'; this.auth = this.parent.auth; this.connectionOptions = this.parent.connectOptions; + const {host, version} = this.connectionOptions || {}; + this.host = host; + this.version = version; const {apiKey} = this.auth || {}; if (!apiKey) throw new Error('auth.apiKey is required for Google S2S'); @@ -46,7 +49,7 @@ class TaskLlmGoogle_S2S extends Task { this.eventHook = this.data.eventHook; this.toolHook = this.data.toolHook; - const {setup} = this.data.llmOptions; + const {setup, sessionResumption} = this.data.llmOptions; if (typeof setup !== 'object') { throw new Error('llmOptions with an initial setup is required for Google S2S'); @@ -54,6 +57,7 @@ class TaskLlmGoogle_S2S extends Task { this.setup = { ...setup, model: this.model, + ...(sessionResumption && {sessionResumption}), // make sure output is always audio generationConfig: { ...(setup.generationConfig || {}), @@ -138,6 +142,10 @@ class TaskLlmGoogle_S2S extends Task { try { const args = [ep.uuid, 'session.create', this.apiKey]; + if (this.host) { + args.push(this.host); + if (this.version) args.push(this.version); + } await this._api(ep, args); } catch (err) { this.logger.error({err}, 'TaskLlmGoogle_S2S:_startListening');