Repository navigation
feat(config): make phone_number optional for non-voice/SMS deployments (AA-1398) - #137
Open
wenzhu1587 wants to merge 2 commits into
Open
wenzhu1587 wants to merge 2 commits into
wenzhu1587 wants to merge 2 commits into
Conversation
…s (AA-1398) TACConfig no longer requires phone_number/phone_numbers, so RCS, WhatsApp, and Chat-only deployments can omit them. The requirement moves to the channels that actually use a phone number: - VoiceChannel now raises at construction without phone_number(s), matching the existing SMSChannel guard. - Chat handoff (which sends From the configured phone number) returns handoff_failed instead of posting a Studio execution with no From. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wenzhu1587
requested review from
ryanrishi,
ryanrouleau and
xinghaohuang91
as code owners
October 15, 2026 21:49
There was a problem hiding this comment.
🟡 Changes recommended
Missing-sender Chat handoff disables conversation routing before returning failure, leaving no receiving system to take over.
1 open finding
What changed in this PR
Makes phone numbers optional in TAC configuration for RCS-, WhatsApp-, and Chat-only deployments, moving enforcement to channels that need them.
Changes:
- Adds Voice construction validation and missing-sender Chat handoff handling.
- Updates configuration and channel regression tests.
- Revises setup documentation and the voice provider comment.
| File | Description |
|---|---|
| tests/test_voice_channel.py | Tests missing-number rejection. |
| tests/test_sms_channel.py | Tests validation at channel construction. |
| tests/test_rcs_channel.py | Tests construction without a phone number. |
| tests/test_handoff.py | Tests missing-number Chat handoff failure. |
| tests/test_config.py | Tests optional phone configuration. |
| tests/test_config_from_env.py | Tests omitted phone environment variables. |
| src/tac/tools/handoff.py | Rejects missing Studio senders. |
| src/tac/core/config.py | Makes phone numbers optional. |
| src/tac/channels/voice/conversation_relay/provider.py | Updates validation explanatory comment. |
| src/tac/channels/voice/channel.py | Requires configured phone numbers. |
| getting_started/README.md | Clarifies channel-specific requirements. |
| getting_started/examples/.env.example | Labels Voice/SMS phone requirements. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+210
to
+211
| if from_address is None: | ||
| error = "No Studio `From` sender: Chat handoff requires phone_number in TACConfig." |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Resolves AA-1398:
TACConfigno longer requiresphone_number/phone_numbers; they are required only by the Voice and SMS channels.The requirement moves from the config to the channels that actually use a phone number:
phone_numberpair is now optional, the same as the RCS and WhatsApp pairs.VoiceChannel: raisesValueErrorat construction when no phone number is configured, matching the existingSMSChannelguard.Fromthe configured phone number. Without one, it now returnshandoff_failedwith a clear error instead of posting a Studio execution with noFrom.getting_started/README.mdand.env.examplelist the phone number under "Required for Voice and SMS channels".Behavior change: a config with no phone number used to fail at
TACConfigvalidation. It now fails atVoiceChannel/SMSChannelconstruction, with a message naming the env vars. The library never constructs these channels implicitly (includingTACFastAPIServer), so apps that don't use them are unaffected.Type of Change
Checklist
New tests cover:
from_env()accepting no phone numbermake checkpasses (1087 tests).SDK Parity
This is the Python SDK. If this change affects shared functionality, ensure the TypeScript SDK is updated as well.
phoneNumber/phoneNumbers" requirement (packages/core/src/types/config.ts), so it needs a follow-up.🤖 Generated with Claude Code