Anyone else having issues with Live 3.1?

Cant make it work :frowning: not talking back to me

ps. I know about fix(google realtime): support gemini-3.1-flash-live-preview A2A model by youpesh · Pull Request #5238 · livekit/agents just making my voice be heard

+++ node_modules/@livekit/agents-plugin-google/dist/beta/realtime/realtime_api.js 2026-03-29 21:51:24.843948655 +0300

@@ -31,6 +31,15 @@

const OUTPUT_AUDIO_CHANNELS = 1;

const LK_GOOGLE_DEBUG = Number(process.env.LK_GOOGLE_DEBUG ?? 0);

const WS_CLOSE_NORMAL = 1e3;

+// — A2A Model Support (patch for Gemini 3.1 Flash Live) —

+// A2A models reject send_client_content and use send_realtime_input for everything

+const A2A_ONLY_MODELS = new Set([

+ ‘gemini-3.1-flash-live-preview’,

+]);

+function isA2AModel(options) {

+ return A2A_ONLY_MODELS.has(options.model);

+}

+// — End A2A patch —

const DEFAULT_IMAGE_ENCODE_OPTIONS = {

format: “JPEG”,

quality: 75,

@@ -324,12 +333,15 @@

pushAudio(frame) {

if (this.pendingToolCallIds.size > 0) return;

this.hasReceivedAudioInput = true;

+ const a2a = isA2AModel(this.options);

+ // A2A models require rate in MIME type: “audio/pcm;rate=16000”

+ const mimeType = a2a ? “audio/pcm;rate=16000” : “audio/pcm”;

for (const f of this.resampleAudio(frame)) {

for (const nf of this.bstream.write(f.data.buffer)) {

const realtimeInput = {

mediaChunks: [

{

- mimeType: “audio/pcm”,

+ mimeType,

data: Buffer.from(nf.data.buffer).toString(“base64”)

}

]

@@ -506,10 +518,14 @@

excludeFunctionCall: true

}).toProviderFormat(“google”, false);

if (turns.length > 0) {

- await session.sendClientContent({

- turns,

- turnComplete: false

- });

+ if (isA2AModel(this.options)) {

+ this.#logger.debug(“Skipping initial context seeding for A2A model (send_client_content rejected)”);

+ } else {

+ await session.sendClientContent({

+ turns,

+ turnComplete: false

+ });

+ }

}

} finally {

unlock();

@@ -568,16 +584,28 @@

} finally {

unlock();

}

+ const a2a = isA2AModel(this.options);

switch (msg.type) {

case “content”:

const { turns, turnComplete } = msg.value;

if (LK_GOOGLE_DEBUG) {

this.#logger.debug(`(client) → ${JSON.stringify(this.loggableClientEvent(msg))}`);

}

- await session.sendClientContent({

- turns,

- turnComplete: turnComplete ?? true

- });

+ if (a2a) {

+ // A2A models reject sendClientContent — route text via sendRealtimeInput

+ for (const turn of (turns || [])) {

+ for (const part of (turn.parts || [])) {

+ if (part.text) {

+ await session.sendRealtimeInput({ text: part.text });

+ }

+ }

+ }

+ } else {

+ await session.sendClientContent({

+ turns,

+ turnComplete: turnComplete ?? true

+ });

+ }

break;

Thank you Kind sir, I just moved to 2.5 a minute ago xdddddd

But let me test with 2.5, feel like I did something tonight, and will check back on this patch

I tried as well with Gemini 3.1 Flash Lite Preview and couldn’t connect at all. I am not sure what the issue is. Maybe LiveKit needs to work with Google to add it to their repertoire

Yeah bro, its google, there’s a workaround but I couldn’t make it work
I went back to Retell and its working for me very…okayish

Hopefully google and livekit fix 3.1 live in 1-2 weeks

Btw the solution and patch is already available but they havent launched to production yet
Probably doing tests

Forget about 3.1 for this week bro

Latest from the agents team are comments in this thread: fix(google realtime): support gemini-3.1-flash-live-preview by Hormold · Pull Request #5251 · livekit/agents · GitHub