You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: adapt non-generated code for SSE overload support (stream param on complete methods)
Update custom code regions, examples, and tests to use the new
`complete(stream=True)` pattern alongside the existing dedicated
`stream()` methods.
Custom code regions (preserved by Speakeasy across regenerations):
- chat.py: parse/parse_async now call complete(stream=False) with
assert isinstance; parse_stream/parse_stream_async now call
complete(stream=True) instead of stream()
- conversations.py: run_async uses start_async(stream=False/True)
and append_async(stream=False/True) instead of separate stream methods
Examples (not generated):
- All streaming examples updated to use complete(stream=True) pattern
Tests (not generated):
- Integration tests: use complete(stream=True) instead of stream()
- Parity tests: add accept_header_override param, add stream/stream_async
to known public methods, remove redundant stream-only test methods
Note: Speakeasy-generated code is NOT included in this commit. The SDK
was locally regenerated with specs that add text/event-stream as an
alternative response on non-streaming operations (SSE overload pattern).
Once the specs are published, the GitHub Actions workflow will regenerate
the SDK code automatically.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
:param model: ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions.
@@ -168,6 +183,7 @@ def complete(
168
183
:param retries: Override the default retry configuration for this method
169
184
:param server_url: Override the default server URL for this method
170
185
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
186
+
:param accept_header_override: Override the default accept header for this method
171
187
:param http_headers: Additional headers to set or replace on requests.
:param model: ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions.
@@ -340,6 +372,7 @@ async def complete_async(
340
372
:param retries: Override the default retry configuration for this method
341
373
:param server_url: Override the default server URL for this method
342
374
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
375
+
:param accept_header_override: Override the default accept header for this method
343
376
:param http_headers: Additional headers to set or replace on requests.
0 commit comments