test: cover Google telephony TTS private network opt-in

This commit is contained in:
Peter Steinberger
2026-04-25 20:29:00 +01:00
parent cab66c5556
commit 8fb24ac3ce
2 changed files with 30 additions and 0 deletions

View File

@@ -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

View File

@@ -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 }),
);
});
});