From 8fb24ac3cea0e87b9d154416ca575ed400b3b150 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 25 Apr 2026 20:29:00 +0100 Subject: [PATCH] test: cover Google telephony TTS private network opt-in --- CHANGELOG.md | 3 +++ extensions/google/speech-provider.test.ts | 27 +++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a6a6efd866..1aff0c720cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,6 +74,9 @@ Docs: https://docs.openclaw.ai - Diagnostics/trace: report live context usage from the current prompt snapshot instead of provider turn totals, avoiding false near-full context spikes on cached or tool-heavy runs. +- Providers/Google: honor `models.providers.google.request.allowPrivateNetwork` + for Gemini TTS and telephony TTS, matching Google image generation and media + understanding. (#71723) Thanks @ro-hansolo. - Plugins/Bonjour: stop the gateway from crash-looping on `CIAO PROBING CANCELLED` when the mDNS watchdog cancels a stuck probe. Restores the rejection-handler wiring dropped during the bonjour plugin migration and shares unhandled-rejection state across module instances so plugin-staged copies of `openclaw/plugin-sdk/runtime` register into the same handler set the host consults. Especially affects Docker on macOS, where mDNS probing reliably hits the watchdog. Thanks @troyhitch. - Google Meet: report pinned Chrome nodes as offline or missing capabilities in setup/join diagnostics, keep inaccessible nodes out of auto-selection, and diff --git a/extensions/google/speech-provider.test.ts b/extensions/google/speech-provider.test.ts index 752669d96e8..1c764d19fba 100644 --- a/extensions/google/speech-provider.test.ts +++ b/extensions/google/speech-provider.test.ts @@ -344,4 +344,31 @@ describe("Google speech provider", () => { expect.objectContaining({ allowPrivateNetwork: true }), ); }); + + it("honors configured private-network opt-in for Google telephony TTS", async () => { + installGoogleTtsFetchMock(); + const postJsonRequestSpy = vi.spyOn(providerHttp, "postJsonRequest"); + + const provider = buildGoogleSpeechProvider(); + await provider.synthesizeTelephony?.({ + text: "hello", + cfg: { + models: { + providers: { + google: { + baseUrl: "https://generativelanguage.googleapis.com/v1beta", + request: { allowPrivateNetwork: true }, + models: [], + }, + }, + }, + }, + providerConfig: { apiKey: "google-test-key" }, + timeoutMs: 12_345, + }); + + expect(postJsonRequestSpy).toHaveBeenCalledWith( + expect.objectContaining({ allowPrivateNetwork: true }), + ); + }); });