From be6b211e0182c342822e56ea12dc4bc311ccf676 Mon Sep 17 00:00:00 2001 From: Mark Daoust Date: Thu, 24 Sep 2026 16:12:23 -0700 Subject: [PATCH] chore: update Speakeasy OpenAPI generator to v2.937.19 and regenerate GAOS SDKs PiperOrigin-RevId: 987826949 --- .../java/com/google/genai/GaosClientTest.java | 49 +++---------------- 1 file changed, 6 insertions(+), 43 deletions(-) diff --git a/src/test/java/com/google/genai/GaosClientTest.java b/src/test/java/com/google/genai/GaosClientTest.java index a516466327f..5ccd7e7c27b 100644 --- a/src/test/java/com/google/genai/GaosClientTest.java +++ b/src/test/java/com/google/genai/GaosClientTest.java @@ -283,7 +283,12 @@ public CompletableFuture> sendAsync(HttpRequest reques HttpRequest req = capturedRequest.get(); assertNotNull(req); assertEquals("GET", req.method()); - assertEquals(URI.create(expectedUrlPrefix + "/interactions/" + interactionId), req.uri()); + assertEquals( + URI.create( + expectedUrlPrefix + + "/interactions/" + + interactionId), + req.uri()); // 2. Test Cancel capturedRequest.set(null); @@ -450,46 +455,4 @@ public void testGaosClientRetryConfigIsNoRetries() throws Exception { com.google.genai.gaos.utils.RetryConfig.Strategy.NONE, sdkConfig.retryConfig().get().strategy()); } - - @Test - public void testVoicesWiring() { - Client client = Client.builder().apiKey("test-api-key").vertexAI(false).build(); - assertNotNull(client.voices); - assertNotNull(client.async.voices); - } - - @Test - public void testVoicesGetPath_gemini() throws Exception { - Client client = Client.builder().apiKey("test-api-key").vertexAI(false).build(); - - AtomicReference capturedRequest = new AtomicReference<>(); - HTTPClient mockClient = - new HTTPClient() { - @Override - public HttpResponse send(HttpRequest request) { - capturedRequest.set(request); - return createMockResponse( - request, - 200, - "{\"name\": \"voices/test-voice-id\", \"id\": \"test-voice-id\"," - + " \"type\": \"prompted\"}"); - } - - @Override - public CompletableFuture> sendAsync(HttpRequest request) { - return CompletableFuture.completedFuture(send(request)); - } - }; - setMockGaosClient(client, mockClient); - - String voiceId = "test-voice-id"; - client.voices.get(voiceId); - - HttpRequest req = capturedRequest.get(); - assertNotNull(req); - assertEquals("GET", req.method()); - assertEquals( - URI.create("https://generativelanguage.googleapis.com/v1beta/voices/" + voiceId), req.uri()); - assertEquals("test-api-key", req.headers().firstValue("x-goog-api-key").orElse(null)); - } }