mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-24 05:41:40 +00:00
fix(stream-consumer): preserve thread routing on overflow first-send path
When the first streamed message exceeds the platform length limit and gets split into chunks, _send_new_chunk was called with self._message_id (which is None on first send), dropping thread routing entirely. Fallback to self._initial_reply_to_id so overflow chunks land in the correct topic/thread. Also fix a fragile test assertion that could be silently skipped.
This commit is contained in:
parent
ff14666cdc
commit
e164a9c1ed
2 changed files with 37 additions and 6 deletions
|
|
@ -365,7 +365,7 @@ class GatewayStreamConsumer:
|
|||
self._accumulated, _safe_limit
|
||||
)
|
||||
chunks_delivered = False
|
||||
reply_to = self._message_id
|
||||
reply_to = self._message_id or self._initial_reply_to_id
|
||||
for chunk in chunks:
|
||||
new_id = await self._send_new_chunk(chunk, reply_to)
|
||||
if new_id is not None and new_id != reply_to:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue