Skip to content

Commit 4cf73fb

Browse files
committed
docs(learnings): silenceTimeoutSeconds min=10 + structuredOutput.name 40-char limit + gitignore pnpm-lock
Two field-level Vapi API validation constraints that fail at push time and aren't documented in the gitops engine README. Surfaced during a gitops-mudflap iteration where both blocked a deploy mid-push: - silenceTimeoutSeconds: assistant config minimum is 10s; setting < 10 fails with "must not be less than 10". Tradeoff implications documented for the "end call immediately" pattern. - structuredOutput.name: 1-40 character limit on inline scenario evaluations and standalone structured outputs. Long descriptive names like assistant_left_voicemail_and_ended_call_promptly (48) silently exceed the limit. Examples of compact alternatives included. Also gitignoring pnpm-lock.yaml — repo uses npm with package-lock.json, but stray pnpm-lock.yaml files appear when contributors accidentally run pnpm install. Same paper cut affects every customer fork.
1 parent 1e7ae16 commit 4cf73fb

3 files changed

Lines changed: 25 additions & 0 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Dependencies
22
node_modules/
3+
# This repo uses npm (package-lock.json). Stray pnpm-lock.yaml files
4+
# can appear if someone accidentally runs `pnpm install` — never commit them.
5+
pnpm-lock.yaml
36

47
# Environment files (secrets - never commit these!)
58
# Covers dev/stg/prod and any org slug (e.g. .env.roofr-production)

docs/learnings/assistants.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,17 @@ If a hook references a `toolId` that doesn't exist, Vapi logs a warning and cont
409409

410410
`customer.speech.timeout` (hook) and `silenceTimeoutSeconds` (assistant) are separate mechanisms. The hook fires an action; the timeout ends the call. Configure them independently.
411411

412+
### `silenceTimeoutSeconds` minimum is 10
413+
414+
The Vapi API enforces a hard minimum of **10 seconds** on `silenceTimeoutSeconds`. Setting this field to anything less than 10 (e.g., `5` or `8`) will fail at push time with:
415+
416+
```
417+
PATCH /assistant/<id> → 400
418+
silenceTimeoutSeconds must not be less than 10
419+
```
420+
421+
The minimum is not documented in the gitops engine README and is only surfaced when you POST/PATCH. If you need an "end the call almost immediately" pattern (e.g., a voicemail-leaver that should fire `end_call` right after delivering its request-start message), drive that behavior through the assistant's prompt + `firstMessageMode: assistant-speaks-first-with-model-generated-message` + `endCallFunctionEnabled: true` so the model fires the end-call tool on activation. The 10-second timeout is then just a safety net, not the primary exit path.
422+
412423
### Available hook events
413424

414425
- `call.ending` — call is about to end

docs/learnings/structured-outputs.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@ Primitive schemas (`string`, `boolean`, `number`) are automatically wrapped in a
2121

2222
The result is unwrapped before being returned. This is transparent but can cause confusion if you inspect raw API calls.
2323

24+
### `structuredOutput.name` is limited to 1-40 characters
25+
26+
The Vapi API enforces a hard 40-character maximum on the `name` field of any structured output (including inline structured outputs used inside scenario evaluations). Names longer than 40 chars fail at push time with:
27+
28+
```
29+
POST /eval/simulation/scenario → 400
30+
evaluations.5.structuredOutput.Name must be between 1 and 40 characters
31+
```
32+
33+
Long, descriptive evaluator names like `assistant_left_voicemail_and_ended_call_promptly` (48 chars) or `assistant_detected_hostile_recording_and_ended_call` (51 chars) will silently exceed the limit until you POST. Keep names compact (`assistant_ended_call_after_message`, `assistant_handled_hostile_recording`) and put the descriptive nuance in the `description` field, which has no length cap. The constraint applies to the field on every structured output type — both standalone resources and inline evaluations within scenarios.
34+
2435
---
2536

2637
## assistant_ids Must Be UUIDs

0 commit comments

Comments
 (0)