feat(voice): support evidence reuse, 120s output capacity, and input ASR coalescing

- Add internal reuse_last_evidence tool for continuing existing topic without repeated retrieval
- Expand OpenAI output capacity to 120s / 5,760,000 bytes and add delivery fairness
- Coalesce adjacent user ASR transcript deltas to prevent client control queue overflow
- Add server-side OPENAI_REALTIME_SPEED configuration and update style to v4
- Add extensive unit and integration regressions for evidence reuse, capacity, and fairness
This commit is contained in:
11linear11
2026-10-12 17:57:27 -04:00
parent 9e6864ae2a
commit 111710c47c
33 changed files with 1189 additions and 55 deletions
@@ -336,6 +336,12 @@ UNIQUE(conversation_id,sequence_no), UNIQUE(turn_id,role). Both roles may exist
UNIQUE(live_session_id,external_call_id); scoped FK to live_sessions.
CHECK terminal iff completed_at is non-null; CHECK tool_name='search_knowledge'.
The 2026-10-12 continuation amendment adds no table or migration: internal
`reuse_last_evidence` revalidates and references the original successful retrieval
row without inserting a new `tool_calls` row. It requires both its saved access
epoch and knowledge revision to match current settings, and rechecks every
document/chunk. New turn source events retain that retrieval's public reference;
session-local reuse state is discarded on session termination.
No turn_id or FK to deferred turns/messages/citations is required in this
migration. A later text extension must explicitly add its parent/constraint
design; it is not implicit scope for this MVP.
@@ -491,7 +497,11 @@ See [Phase 3 handoff](../guides/realtime-agent-phase3-handoff.md).
### OpenAI generation-limit profile amendment (2026-10-12)
New OpenAI live_sessions.execution_profile JSON freezes max_output_tokens (default
256) alongside audio_input, reasoning, style_revision and instruction digest.
256) alongside audio_input, audio_output_speed (default 1.0), reasoning,
style_revision and instruction digest. The OpenAI repair profile additionally
freezes `output_backlog_bytes` (default 5760000) and `output_slab_limit` (664).
Gemini retains its existing capacity/profile fields. These are JSON profile
amendments; no schema migration or existing-row backfill is permitted.
Existing reservation profiles/request hashes are immutable: replay returns the
original identity, and missing/mismatched profile fields reject stream admission.
No schema/migration or session status enum changes. A limited audio answer keeps