From 083835d92eae6c841e1083701d484ab318989686 Mon Sep 17 00:00:00 2001 From: Christine Chen Date: Fri, 18 Sep 2026 02:53:31 +0000 Subject: [PATCH] fix: declare a JSON 200 for intern chat so the Python SDK compiles --- .../intern-chat-json-response.overlay.yaml | 19 +++++++++++++++++++ .speakeasy/workflow.yaml | 1 + 2 files changed, 20 insertions(+) create mode 100644 .speakeasy/overlays/intern-chat-json-response.overlay.yaml diff --git a/.speakeasy/overlays/intern-chat-json-response.overlay.yaml b/.speakeasy/overlays/intern-chat-json-response.overlay.yaml new file mode 100644 index 00000000..5689bb15 --- /dev/null +++ b/.speakeasy/overlays/intern-chat-json-response.overlay.yaml @@ -0,0 +1,19 @@ +overlay: 1.0.0 +x-speakeasy-jsonpath: rfc9535 +info: + title: Give the intern chat completion a JSON 200 sibling for the Python generator + version: 0.0.0 +actions: + - target: $.paths["/interns/{internId}/chat/completions"].post.responses["200"].content + description: >- + The public spec declares only a text/event-stream 200 for this operation. + With sseFlatResponse enabled, the Python generator annotates the method as + returning the flattened chunk while emitting an EventStream body, which + fails pyright and mypy and blocks every release. Declaring a JSON + representation of the same chunk restores the supported SSE-overload + shape so the generated method is typed as the union. The server still + streams every response. + update: + application/json: + schema: + $ref: '#/components/schemas/InternChatCompletionChunk' diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index 8e51a85a..dee12e9a 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -12,6 +12,7 @@ sources: - location: .speakeasy/overlays/boolean-query-params.overlay.yaml - location: .speakeasy/overlays/fix-nullable-pagination.overlay.yaml - location: .speakeasy/overlays/deprecated-beta-responses-alias.overlay.yaml + - location: .speakeasy/overlays/intern-chat-json-response.overlay.yaml output: .speakeasy/out.openapi.yaml registry: location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api