From acb46626392c9dfb70ce836a939f075290ec230e Mon Sep 17 00:00:00 2001 From: Blake Ledden Date: Sat, 20 Dec 2025 23:54:48 -0800 Subject: [PATCH] Remove unused streaming response type from embeddings endpoint (fixes #98) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The embeddings endpoint had a text/event-stream response type defined in the OpenAPI spec, but the spec itself noted: "Not used for embeddings - embeddings do not support streaming." This unused response type caused Speakeasy to generate: type CreateEmbeddingsResponse = CreateEmbeddingsResponseBody | string; Which forces developers to write unnecessary type guards. After regenerating with Speakeasy, the type will be: type CreateEmbeddingsResponse = CreateEmbeddingsResponseBody; Allowing direct access to response.data[0].embedding without checking if the response is a string first. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .speakeasy/in.openapi.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.speakeasy/in.openapi.yaml b/.speakeasy/in.openapi.yaml index 4047ff25..26c91c9f 100644 --- a/.speakeasy/in.openapi.yaml +++ b/.speakeasy/in.openapi.yaml @@ -6716,11 +6716,6 @@ paths: - object - data - model - text/event-stream: - schema: - type: string - description: Not used for embeddings - embeddings do not support streaming - x-speakeasy-sse-sentinel: '[DONE]' '400': description: Bad Request - Invalid request parameters or malformed input content: