Skip to content

Stream OpenClaw responses through native Assist - #39

Draft
techartdev wants to merge 2 commits into
mainfrom
papurha/native-assist-streaming
Draft

techartdev wants to merge 2 commits into
mainfrom
papurha/native-assist-streaming

Conversation

@techartdev

Copy link
Copy Markdown
Owner

Reimplements #30 on the current integration and Home Assistant conversation API instead of merging stale #21.

  • Registers the integration as a ConversationEntity and advertises native streaming.
  • Streams OpenClaw SSE deltas into Home Assistant's chat log on HA 2025.8+.
  • Retains the prior non-streaming behavior on HA 2025.1–2025.7 for compatibility.
  • Falls back to a regular chat-completions response when the SSE stream is empty or fails.
  • Adds dependency-free coverage for streaming deltas, fallback, and legacy mode.

Validation:

  • python3 -m unittest discover -s tests -v (12 tests)
  • Python syntax check
  • Chat-card JS syntax check

Closes #30.

@techartdev

Copy link
Copy Markdown
Owner Author

Live validation found two blockers before merge: (1) OpenClaw Gateway buffers generation and emits all SSE chunks only at the end, so this does not currently reduce TTS latency; (2) the class inherits conversation.ConversationEntity unconditionally, so the claimed HA 2025.1-2025.7 fallback cannot run if that symbol is absent during module import. Keeping the PR open as the active experiment, but it needs a Gateway-side streaming fix plus a real import-compatible legacy strategy (or a raised minimum HA version) before release.

@techartdev
techartdev marked this pull request as draft September 26, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Assignees

Couldn't load assignees.