refactor(channel): centralize retry around explicit send failures

Make channel delivery failures raise consistently so retry policy lives in ChannelManager rather than being split across individual channels. Tighten Telegram stream finalization, clarify sendMaxRetries semantics, and align the docs with the behavior the system actually guarantees.
This commit is contained in:
Xubin Ren authored and Xubin Ren committed 2026-03-25 22:37:11 +08:00
1 parent 5e9fa28ff2
commit f0f0bf02d7
12 files changed
+55 -17

No files matched your search

+8 -1
View File
@@ -85,11 +85,18 @@ class BaseChannel(ABC):
Args:
msg: The message to send.
Implementations should raise on delivery failure so the channel manager
can apply any retry policy in one place.
"""
pass
async def send_delta(self, chat_id: str, delta: str, metadata: dict[str, Any] | None = None) -> None:
"""Deliver a streaming text chunk. Override in subclass to enable streaming."""
"""Deliver a streaming text chunk.
Override in subclasses to enable streaming. Implementations should
raise on delivery failure so the channel manager can retry.
"""
pass
@property