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
fix: add content_index to streamed text deltas and improve stream reliability (#52)
* fix: add content_index to streamed text delta events and improve stream reliability (#44)
Add the missing `content_index` field to `response.output_text.delta` SSE
events so clients that validate against the OpenAI Responses API spec
(e.g. ChatKit SDK) no longer fail with a Pydantic validation error.
Also introduces SSE heartbeat keepalives, configurable stream timeout,
and structured stream timing logs to improve reliability with slow backends.
Closes#44
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address PR review - heartbeat task cleanup and trailing whitespace
- Add try/finally to _with_heartbeat() to cancel in-flight tasks and
close the underlying async iterator on cancellation/exit
- Guard against interval <= 0 to prevent tight heartbeat loops
- Fix trailing whitespace and missing newline in config.py
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: resolve SonarCloud quality gate failures in _with_heartbeat
- S7497: Re-raise asyncio.CancelledError after cleanup instead of
swallowing it
- B110: Replace bare except/pass with logger.debug for aclose errors
- S5806: Rename `aiter` to `inner` to avoid shadowing the builtin
- S3776: Extract cleanup logic to _cleanup_heartbeat() to reduce
cognitive complexity below threshold
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments