BaseChannel.send_response docstring promises async-generator streaming that four of the five channels raise TypeError on
メンテナーはふだん 5 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 50/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
The docstring to change is BaseChannel.send_response in src/tac/channels/base.py (lines 90-105), which says it supports async-generator streaming unconditionally. Compare it with the Raises: block in MessagingChannel.send_response in src/tac/channels/messaging.py (lines 208-220), and check voice/provider.py:95 for the per-provider behaviour. Done means the base docstring no longer promises generators on every channel. The issue says the exact wording is the maintainers' call, so confirm it with them before editing.
索引モデルが issue の本文から書いたものです。
説明
Summary
BaseChannel.send_response's docstring states that generator streaming is supported, with no qualification. Four of the five concrete channels raise TypeError when given one.
The docstring one file over — MessagingChannel.send_response — already states the restriction correctly, including a Raises: block. So this is an internal contradiction with the fix already drafted in your own source, rather than a request for new documentation.
All line references are at 2c24bd98, read 2026-10-09.
The abstract base asserts it unconditionally
src/tac/channels/base.py:90-105:
@abstractmethod
async def send_response(
self,
conversation_id: str,
response: str | AsyncGenerator[str | dict[str, Any], None],
role: str | None = None,
) -> None:
"""
Send response back through the channel.
Supports both simple string responses and streaming via async generators.
...
Four of five channels raise
src/tac/channels/messaging.py:218-220:
channel_name = self.get_channel_name()
if not isinstance(response, str):
raise TypeError(f"{channel_name} channel only supports string responses")
SMSChannel, RCSChannel, WhatsAppChannel and ChatChannel all subclass MessagingChannel, and none of them overrides send_response — measured over every file under src/tac/channels/, which contains exactly two channel-level send_response definitions (the abstract one in base.py and the concrete one in messaging.py) plus voice/channel.py's delegation.
So the type and the base docstring both advertise a parameter shape that raises on four of the five channels a user can reach.
The correct wording already exists in this repo
src/tac/channels/messaging.py:208-215 — same method, overriding class:
response: Message content. Must be
str— messaging channels send a single complete message via the Conversation Orchestrator Send API and do not support streaming (unlike the Voice channel).Raises:
TypeError: If response is not a string (e.g. an async generator is passed, since messaging channels don't support streaming)
That is accurate, and it is the text the base class is missing.
Suggested change
Qualify base.py:99 so the base does not promise what most implementations refuse — for example:
Supports simple string responses on every channel. Streaming via async generators is supported only where the channel's provider implements it;
MessagingChanneland its subclasses raiseTypeErrorfor a generator, and voice support depends on the configured provider.
A narrower variant, if you would rather not describe subclass behaviour in the base: drop the "Supports both ..." sentence and point at the implementing class.
One related observation, offered rather than asserted as a defect
Voice support is also per-provider rather than per-channel, so "streaming is a voice capability" is not quite the invariant either. VoiceChannel.send_response (voice/channel.py:502) delegates to its provider; voice/provider.py:95 raises NotImplementedError by default, and media_streams/shared/openai_provider.py:223-233 raises for a string and a generator, with a clear reason in its docstring ("the model streams audio to Twilio directly, so there is no text response for this provider to send").
That design seems deliberate and reads well — mentioning it only because any rewording of the base docstring will want to account for it.
Why an issue and not a pull request
These are docstrings in hand-written source, so a PR would be mechanically simple. Filing as an issue because the right wording is a judgement about what the base class means to promise, which is yours rather than ours.
Context
We maintain a cross-provider specification of the TAC response-streaming contract and read connector source to verify each claim in it. This came out of promoting that document's unverified assertions to quoted-source ones, and the original claim — that a connector satisfies TAC by returning a string or an async generator — turned out to be the one that did not survive.
- 主要言語
- Python
- スター
- 17
- フォーク
- 11
- 平均マージ
- 5日 19時間
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
twilio/twilio-agent-connect-python のほかの issue
-
ParticipantResponse.name is required where the API definition marks it nullable, so a nameless participant fails to parse対応中かも @TheeCoderAhmed が 22 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
twilio/twilio-agent-connect-python#134 ·
メンテナーはふだん 5 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
twilio/twilio-agent-connect-python#135 ·
メンテナーはふだん 5 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
twilio/twilio-agent-connect-python#133 ·
メンテナーはふだん 5 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
twilio/twilio-agent-connect-python#101 ·
メンテナーはふだん 5 日以内に返信
-
add tac config validations対応中かも @rahulsjha が 4 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
twilio/twilio-agent-connect-python#70 · コメント 1 件 ·
メンテナーはふだん 5 日以内に返信
twilio/twilio-agent-connect-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
area:cli area:security enhancement priority:medium size:small
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
RonaldHensbergen/composable-data-stack#1338 ·
メンテナーはふだん 1 日以内に返信
-
area:stdlib effort:S impact:med platform:linux type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
automated endpoint-dead needs-curation
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
almanac-data/climate-almanac#139 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
UKGovernmentBEIS/inspect_ai#6695 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信