fix(vapi): drop serverMessages — phone-number-level subscription#30
Merged
ByteStreams-AI merged 1 commit intomainfrom May 5, 2026
Merged
fix(vapi): drop serverMessages — phone-number-level subscription#30ByteStreams-AI merged 1 commit intomainfrom
ByteStreams-AI merged 1 commit intomainfrom
Conversation
Even the minimal `serverMessages: ['end-of-call-report']` from PR #29 caused Vapi to reject the assistant config with "Couldn't get assistant". Removing the field entirely. The end-of-call-report subscription needs to live at the phone-number level in the Vapi dashboard: Phone Numbers → +16296001047 → Server → Server Messages → add 'end-of-call-report' (and 'tool-calls', 'status-update' if needed) That config is out-of-band of this code and stays fixed across calls. Once configured in the dashboard, the existing dispatcher in vapi_call_start handles `end-of-call-report` envelope correctly and the SMS dispatch path comes alive. Code comment in vapi_call_start documents the phone-number-level location so a future contributor doesn't try the field-level path again. Integration test asserts serverMessages is UNDEFINED on the dynamic assistant response — any re-add will fail this test and surface the prior incident note. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment on lines
+450
to
+458
| // NOTE: end-of-call-report subscription lives on the | ||
| // phone-number-level config in the Vapi dashboard (under | ||
| // Phone Numbers → +16296001047 → Server → Server Messages), | ||
| // NOT on this dynamic assistant response. Adding | ||
| // `serverMessages: [...]` here — even with a single value — | ||
| // caused Vapi's validator to reject the entire assistant | ||
| // config with "Couldn't get assistant" on the May 5 2026 | ||
| // deploys (PRs #28 and #29). The phone-number-level path is | ||
| // out-of-band of this code and stays fixed across calls. |
Contributor
There was a problem hiding this comment.
Operational dependency not verifiable by code
The post-call pipeline (vapi_call_end, voice_calls.ended_at, payment-link SMS) now depends entirely on a manual, one-time Vapi dashboard configuration. If that setting is absent — new environment, dashboard reset, or a second phone number is ever onboarded — events will silently not arrive and nothing in the codebase will surface the misconfiguration. Consider adding a startup or smoke-test assertion (e.g., a Vapi Management API call to verify the phone-number's serverMessages contains end-of-call-report) so the dependency is detectable without placing a live call.
This was referenced May 5, 2026
ByteStreams-AI
added a commit
that referenced
this pull request
May 5, 2026
Two new docs to anchor the May 5, 2026 governance reset: - docs/project-status2.md: operational + governance snapshot. Captures why we're resetting (PR #28→#30 regression chain), what's working in cloud, what's broken (#32 voice path), the new governance rules, and the step-by-step path to stable production via #33 (staging) → #31 (prod branch) → #34 (umbrella checklist). - docs/git-policy.md: authoritative branching, commit, PR, merge, hotfix, migration, and rollback policy. Codifies the four governance rules: prod branch as deploy gate, user-only staging/commits, Issues-before-PRs, and every PR must reference an Issue. docs/project-status.md (milestone tracker) and AGENTS.md (repo conventions and follow-ups) stay as-is; these are additive.
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
PR #29's minimal
serverMessages: ['end-of-call-report']still triggered Vapi's "Couldn't get assistant" rejection. Field is removed entirely.The end-of-call-report subscription has to live in the Vapi dashboard at the phone-number level, not on the dynamic assistant response:
Once that's configured in the dashboard, our existing dispatcher in
vapi_call_startalready handles theend-of-call-reportenvelope shape correctly,vapi_call_endfires, and the SMS dispatch path PR #27 wired comes alive.Test plan
pnpm ci:fast— 299/299voice_calls.ended_atis populated post-callNote for future contributors
Integration test asserts
assistant.serverMessages === undefined. Any re-add of the field will fail the test and surface the May 5 2026 incident comment in vapi_call_start/index.ts.🤖 Generated with Claude Code
Greptile Summary
Removes
serverMessages: ['end-of-call-report']from the dynamic assistant response invapi_call_startafter Vapi's validator rejected the field on two successive deploys (#28, #29). The subscription is moved to the phone-number-level Vapi dashboard config, and the test is updated to assertserverMessagesstaysundefinedgoing forward. The code change itself is correct and minimal; the one thing worth noting is that the post-call pipeline now has an invisible out-of-band dependency on a dashboard setting that no automated check currently verifies.Confidence Score: 4/5
Safe to merge; the code change is correct and the test guard is sound, with a minor operational risk from the unverifiable dashboard dependency.
No logic errors or security issues introduced. The only concern is a P2: the end-of-call pipeline now silently depends on a manual Vapi dashboard config with no programmatic verification, but this is an architectural trade-off explicitly acknowledged in the PR description rather than a defect in the changed code.
No files require special attention.
Important Files Changed
serverMessages: ['end-of-call-report']from dynamic assistant response; replaces with a detailed comment explaining the phone-number-level dashboard workaround..toContain('end-of-call-report')to.toBeUndefined()to guard against future re-addition ofserverMessages.Reviews (1): Last reviewed commit: "fix(vapi): drop serverMessages — phone-n..." | Re-trigger Greptile