From 3ac2d0cb04c84e38725bc86f39542696ab77cb77 Mon Sep 17 00:00:00 2001 From: dhruva Date: Fri, 20 Nov 2026 23:19:42 +0000 Subject: [PATCH 1/2] docs: sync insight formula and endpointing contracts Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- fern/config-as-code.mdx | 2 ++ .../voice-pipeline-configuration.mdx | 14 ++++++++--- fern/observability/boards-quickstart.mdx | 25 ++++++++++++++++--- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/fern/config-as-code.mdx b/fern/config-as-code.mdx index 463457194..f916765b2 100644 --- a/fern/config-as-code.mdx +++ b/fern/config-as-code.mdx @@ -160,6 +160,8 @@ See the [PR checks guide](https://github.com/VapiAI/gitops/blob/main/docs/guides You can keep using the dashboard alongside the repository. `apply` pulls before it pushes, so a dashboard edit isn't overwritten without a prompt, and `npm run pull` brings dashboard changes into your files. +`npm run pull -- my-org --force` overwrites local files without direction labels or three-way conflict reporting. Run a plain pull first to review drift. Outside CI, a forced pull prints a warning and waits two seconds so you can abort. Setting `VAPI_GITOPS_FORCE_PAUSE=off` skips both that warning and the pause; it does not make the overwrite safer. Setup skips them automatically for its own pulls, and `CI=true` also skips them. + Vapi's built-in [versioning](/assistants/versioning) also works alongside it. Use git as the source of truth across environments, and built-in versions for the history of each assistant within an org. ## Learn more diff --git a/fern/customization/voice-pipeline-configuration.mdx b/fern/customization/voice-pipeline-configuration.mdx index 1cd14531d..ab88b6bf0 100644 --- a/fern/customization/voice-pipeline-configuration.mdx +++ b/fern/customization/voice-pipeline-configuration.mdx @@ -289,6 +289,14 @@ Deepgram Flux's end-of-turn detection is configured at the transcriber level, al Mathematical expression that determines wait time based on speech completion probability. The function takes a confidence value (0-1) and returns a wait time in milliseconds. +Use an expression of at most **5,000 characters**, not a function definition. `x` ranges from `0` (caller has finished) to `1` (caller is still speaking); `t` is seconds since the conversation started. + +- Supported syntax: numbers, parentheses, arithmetic (`+`, `-`, `*`, `/`, `^`, `%`), comparisons (`<`, `>`, `<=`, `>=`, `==`, `!=`), logical operators (`and`, `or`, `not`), and conditionals (`condition ? value : value`). Use at most two `%` characters; `mod` is also supported. +- Constants: `pi` and `e`. +- Scalar math functions: `abs`, `acos`, `asin`, `atan`, `atan2`, `cbrt`, `ceil`, `cos`, `cosh`, `exp`, `floor`, `log`, `log10`, `log2`, `max`, `min`, `mod`, `pow`, `round`, `sign`, `sin`, `sinh`, `sqrt`, `tan`, and `tanh`. + +Arrays, matrices, ranges, strings, property access, assignments, and other identifiers or functions are not supported. The API rejects invalid expressions, including expressions that exceed the length cap or fail its sample evaluation. The call worker rechecks stored expressions: missing, invalid, or unparseable expressions fall back to **400 ms**. Evaluation errors or non-finite/nonnumeric results during a call also use **400 ms**; negative numeric results are clamped to zero. + **Aggressive (Fast Response):** ```json @@ -297,7 +305,7 @@ Mathematical expression that determines wait time based on speech completion pro - **Behavior:** Responds quickly when confident user is done speaking - **Use case:** Customer service, gaming, real-time interactions -- **Timing:** ~200ms wait at 50% confidence, ~50ms at 90% confidence +- **Timing:** ~1000ms wait at 50% confidence the caller is done, ~36ms at 90% confidence **Normal (Balanced):** @@ -307,7 +315,7 @@ Mathematical expression that determines wait time based on speech completion pro - **Behavior:** Waits for natural pauses in conversation - **Use case:** Most conversations, general purpose -- **Timing:** ~800ms wait at 50% confidence, ~300ms at 90% confidence +- **Timing:** ~693ms wait at 50% confidence the caller is done, ~440ms at 90% confidence **Conservative (Careful Response):** @@ -317,7 +325,7 @@ Mathematical expression that determines wait time based on speech completion pro - **Behavior:** Very patient, rarely interrupts users - **Use case:** Healthcare, formal settings, sensitive conversations -- **Timing:** ~2700ms wait at 50% confidence, ~700ms at 90% confidence +- **Timing:** 700ms wait at both 50% and 90% confidence the caller is done; longer waits when the caller is more likely to continue ### Vapi heuristic endpointing diff --git a/fern/observability/boards-quickstart.mdx b/fern/observability/boards-quickstart.mdx index 1f19a1f07..2cb764099 100644 --- a/fern/observability/boards-quickstart.mdx +++ b/fern/observability/boards-quickstart.mdx @@ -199,7 +199,7 @@ Filter data to focus on specific segments or conditions. ## Step 5: Create calculated metrics -Build custom metrics using formulas to calculate rates, averages, and more. Formulas use [Math.js](https://mathjs.org/) syntax for calculations. +Build custom metrics using formulas to calculate rates, averages, and more. Formulas use a restricted subset of [Math.js](https://mathjs.org/) syntax that produces a single numeric result. Line, bar, and pie insights support up to **20 formulas** each. @@ -250,11 +250,28 @@ Common calculated metrics you can create using Math.js syntax: ``` - **Formula editor features:** - Syntax highlighting - Variable autocomplete - - Validation on preview - Supports all [Math.js](https://mathjs.org/) - operations: `+`, `-`, `*`, `/`, `%`, parentheses, and more + The formula editor supports syntax highlighting, variable autocomplete, and validation on preview. Not all Math.js operations are supported. +### Formula syntax and validation + +Every formula must reference at least one configured query using `{{query_name}}`, `{{['query name']}}`, or `{{["query name"]}}`. Names must match exactly, including case. Whitespace around a bare name is trimmed; whitespace inside a quoted name is preserved. These are query placeholders, not general Liquid templates. + +Supported syntax: + +- Numbers, parentheses, arithmetic (`+`, `-`, `*`, `/`, `^`, `%`), comparisons (`<`, `>`, `<=`, `>=`, `==`, `!=`), and conditional expressions (`condition ? value : value`). +- Constants: `pi`, `e`, `NaN`, `null`, and `Infinity`. +- Functions: `abs`, `acos`, `asin`, `atan`, `atan2`, `cbrt`, `ceil`, `cos`, `cosh`, `exp`, `floor`, `log`, `log10`, `log2`, `max`, `mean`, `median`, `min`, `mod`, `pow`, `round`, `sign`, `sin`, `sinh`, `sqrt`, `sum`, `tan`, and `tanh`. +- Literal lists only as direct arguments to `max`, `min`, `sum`, `mean`, or `median`, such as `max([{{bookings}}, 1])`. Standalone lists, matrices, ranges, property access, assignments, and function definitions are not supported. Expressions may contain at most two `%` characters; use `mod` for additional modulo operations. + +Invalid syntax, unsupported operations, missing placeholders, or unknown query names reject the save. Formulas are checked again when run. If a formula fails evaluation or produces an invalid result (such as `NaN` or a complex number), the insight run returns an error rather than substituting the raw query result. Division by zero returns `0`; null, empty, or non-finite query values are substituted as `0`. Boolean results become `1` or `0`, and null or infinite results become `0`. + +Query names must be unique. Names inherited from JavaScript's `Object.prototype`, such as `constructor`, `toString`, `valueOf`, and `hasOwnProperty`, and the name `__proto__` are reserved and rejected. + +### Chart result limits + +Chart-ready results (`format: "recharts"`) are limited to **400,000 cells** across the run's query and formula results. For time-series charts, cells are time buckets multiplied by series, summed across results. The time-bucket upper bound must also not exceed **10,000**. Oversized results return an error instead of being silently truncated. Use a shorter time range, a larger time step, or fewer group-by values. Run-time time-range overrides must also satisfy the limits for the effective time step. + ## Step 6: Organize your dashboard Arrange insights for optimal visual hierarchy and readability. From d5724dd1e278a2b077d5d1f6607f11c28f65a72b Mon Sep 17 00:00:00 2001 From: dhruva Date: Fri, 20 Nov 2026 23:31:40 +0000 Subject: [PATCH 2/2] docs: drop LiveKit waitFunction changes Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../customization/voice-pipeline-configuration.mdx | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/fern/customization/voice-pipeline-configuration.mdx b/fern/customization/voice-pipeline-configuration.mdx index ab88b6bf0..1cd14531d 100644 --- a/fern/customization/voice-pipeline-configuration.mdx +++ b/fern/customization/voice-pipeline-configuration.mdx @@ -289,14 +289,6 @@ Deepgram Flux's end-of-turn detection is configured at the transcriber level, al Mathematical expression that determines wait time based on speech completion probability. The function takes a confidence value (0-1) and returns a wait time in milliseconds. -Use an expression of at most **5,000 characters**, not a function definition. `x` ranges from `0` (caller has finished) to `1` (caller is still speaking); `t` is seconds since the conversation started. - -- Supported syntax: numbers, parentheses, arithmetic (`+`, `-`, `*`, `/`, `^`, `%`), comparisons (`<`, `>`, `<=`, `>=`, `==`, `!=`), logical operators (`and`, `or`, `not`), and conditionals (`condition ? value : value`). Use at most two `%` characters; `mod` is also supported. -- Constants: `pi` and `e`. -- Scalar math functions: `abs`, `acos`, `asin`, `atan`, `atan2`, `cbrt`, `ceil`, `cos`, `cosh`, `exp`, `floor`, `log`, `log10`, `log2`, `max`, `min`, `mod`, `pow`, `round`, `sign`, `sin`, `sinh`, `sqrt`, `tan`, and `tanh`. - -Arrays, matrices, ranges, strings, property access, assignments, and other identifiers or functions are not supported. The API rejects invalid expressions, including expressions that exceed the length cap or fail its sample evaluation. The call worker rechecks stored expressions: missing, invalid, or unparseable expressions fall back to **400 ms**. Evaluation errors or non-finite/nonnumeric results during a call also use **400 ms**; negative numeric results are clamped to zero. - **Aggressive (Fast Response):** ```json @@ -305,7 +297,7 @@ Arrays, matrices, ranges, strings, property access, assignments, and other ident - **Behavior:** Responds quickly when confident user is done speaking - **Use case:** Customer service, gaming, real-time interactions -- **Timing:** ~1000ms wait at 50% confidence the caller is done, ~36ms at 90% confidence +- **Timing:** ~200ms wait at 50% confidence, ~50ms at 90% confidence **Normal (Balanced):** @@ -315,7 +307,7 @@ Arrays, matrices, ranges, strings, property access, assignments, and other ident - **Behavior:** Waits for natural pauses in conversation - **Use case:** Most conversations, general purpose -- **Timing:** ~693ms wait at 50% confidence the caller is done, ~440ms at 90% confidence +- **Timing:** ~800ms wait at 50% confidence, ~300ms at 90% confidence **Conservative (Careful Response):** @@ -325,7 +317,7 @@ Arrays, matrices, ranges, strings, property access, assignments, and other ident - **Behavior:** Very patient, rarely interrupts users - **Use case:** Healthcare, formal settings, sensitive conversations -- **Timing:** 700ms wait at both 50% and 90% confidence the caller is done; longer waits when the caller is more likely to continue +- **Timing:** ~2700ms wait at 50% confidence, ~700ms at 90% confidence ### Vapi heuristic endpointing