feat(voice): implement local S2S retained history and provider selection

Add pinned CPU engine dependencies, retained interrupted-response history, provider admission, offline evaluation and isolated browser tooling.

Record Phase 2 acceptance and Phase 3/4 preparation, bounded paid-test accounting and interruption incident findings. Human interruption acceptance, paired OpenAI evaluation and rollback remain pending.
This commit is contained in:
11linear11
2026-10-16 17:09:27 -04:00
parent 8d348f0ba1
commit a94b8cd3ea
111 changed files with 14764 additions and 58 deletions
+4
View File
@@ -63,6 +63,10 @@ def install_session_proof(handler_class, service_components, session_template):
return [project(a, b) for a, b in zip(value, shape)]
return value
session = project(actual, session_template)
from app.modules.voice.local_s2s import RETENTION_INSTRUCTIONS as INSTRUCTIONS
if (session.get('instructions', '').endswith(INSTRUCTIONS)
and not getattr(self._service, '_rag_retention_enabled', False)):
raise ValueError('LOCAL_ENGINE_RETENTION_EXTENSION_MISSING')
components = service_components[id(self._service)]
identity = effective_identity(components, session)
return result.model_copy(update={'session': result.session.model_copy(update={'s2s_effective': identity})})