Skip to content

fix(vapi): restore full assistant behavior after bisect#47

Merged
ByteStreams-AI merged 2 commits intomainfrom
fix/vapi-restore-full-assistant
May 6, 2026
Merged

fix(vapi): restore full assistant behavior after bisect#47
ByteStreams-AI merged 2 commits intomainfrom
fix/vapi-restore-full-assistant

Conversation

@ByteStreams-AI
Copy link
Copy Markdown
Owner

@ByteStreams-AI ByteStreams-AI commented May 6, 2026

Refs #32

Restores the full assistant-request behavior after the bisect rounds:

  • restores prompt rendering and greeting generation
  • restores tool selection and wrapped Vapi tool config
  • restores , , and completion behavior
  • re-enables the integration assertion for the Sui's Sushi assistant response shape

Also records the restore in the developer journal.

Greptile Summary

This PR reverts the two bisect-round commits (Issue #32) and restores the full dynamic assistant-request handler in vapi_call_start: prompt rendering, customer lookup, tool selection with Vapi-spec server blocks, endCallPhrases, endCallFunctionEnabled, and the voice/transcriber config. The integration test for Sui's Sushi is re-enabled with the now-correct assertions.

  • The restored response no longer carries a legacy functions field alongside tools — the prior concern about dual-path dispatch is resolved.
  • endCallFunctionEnabled: true and an endCallPhrases array (including 'goodbye' as the safety-net trigger) are both returned and asserted in the test.
  • The callFn generic in the test declares tools as Array<{ name: string }> while the actual wrapped shape nests the name at tool.function.name, requiring an inline as unknown as cast.

Confidence Score: 5/5

Safe to merge — the restore cleanly removes the bisect stubs and returns the production assistant config to its pre-bisect state, with the confirmed-safe field set (no serverMessages, no legacy functions field).

The changed code is a direct revert of two temporary debug commits whose sole purpose was the bisect investigation. The key incident findings (serverMessages rejection, dispatcher URL requirement) are already encoded in the comments and test assertions. All three assertions the previous reviewer flagged as missing (endCallFunctionEnabled, endCallPhrases, wrapped-tool shape) are now present.

No files require special attention. The only nit is the stale tools type annotation in the test generic.

Important Files Changed

Filename Overview
supabase/functions/vapi_call_start/index.ts Restores full dynamic assistant-request handling: prompt rendering, customer lookup, tool wrapping with server blocks, endCallPhrases, and endCallFunctionEnabled. No legacy functions field present alongside tools — the prior concern is resolved in this restore.
packages/shared/test/db/voice.test.ts Re-enables skipped integration test and adds endCallFunctionEnabled and endCallPhrases assertions. The tools type in the callFn generic is declared as Array<{ name: string }> but the actual wrapped shape is { function: { name } }, requiring an inline cast.
developer/developer-journal.md Adds a chronological entry recording the bisect restore rationale and validation results. Documentation only.

Reviews (2): Last reviewed commit: "fix(vapi): address PR #47 review comment..." | Re-trigger Greptile

Comment thread supabase/functions/vapi_call_start/index.ts Outdated
Comment thread packages/shared/test/db/voice.test.ts
@ByteStreams-AI
Copy link
Copy Markdown
Owner Author

Addressed PR #47 review feedback in 89958c8:

  • dropped the legacy functions field from the assistant model config so only wrapped tools with server blocks are sent
  • added an integration assertion covering endCallPhrases restoration (goodbye)

Local validation: pnpm ci:fast passes (299/299).

@ByteStreams-AI ByteStreams-AI merged commit 9b688d7 into main May 6, 2026
2 checks passed
@ByteStreams-AI ByteStreams-AI deleted the fix/vapi-restore-full-assistant branch May 6, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant