add: document call.timeElapsed hook for assistant hooks#1017
Merged
dhruva-reddy merged 1 commit intomainfrom Apr 9, 2026
Merged
add: document call.timeElapsed hook for assistant hooks#1017dhruva-reddy merged 1 commit intomainfrom
dhruva-reddy merged 1 commit intomainfrom
Conversation
The call.timeElapsed hook exists in the codebase but was missing from documentation. This adds full documentation including basic usage, call discipline patterns with graceful wrap-up, and system message injection for guiding LLM behavior at specific time points.
cellog
approved these changes
Apr 9, 2026
Contributor
|
🌿 Preview your docs: https://vapi-preview-b711377c-920c-4f87-b92b-adbf2b950f48.docs.buildwithfern.com |
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.
Description
call.timeElapsedassistant hook event, which was implemented in the codebase but missing from docscall.timeElapsedcall.timeElapsedin the options descriptioncall.timeElapsedhooks withmaxDurationSecondsfor structured call endingmessage.addaction to change LLM behavior at a time thresholdfern/assistants/assistant-hooks.mdxThe
call.timeElapsedhook is fully implemented inlibs/core/src/types/call.types/call.hooks.types.tsand scheduled at runtime viahookStream.ts. It fires once at a specified number of seconds (1-3600) from call start. This documentation fills the gap so customers can discover and use this feature.Testing Steps
fern check-- passes with 0 errors (4 pre-existing warnings)options.secondsfield name, min/max values (1-3600), and one-shot behavior against source types incall.hooks.types.ts