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:
@@ -132,10 +132,12 @@ def test_search_failure_policy(runner, persisted, supersede, exc, code):
|
||||
|
||||
|
||||
@pytest.mark.parametrize("known", [False, True])
|
||||
def test_unverified_profile_cancellation_diagnostics(runner, persisted, caplog, known):
|
||||
@pytest.mark.parametrize("voice", ["shimmer", "coral"])
|
||||
def test_profile_cancellation_diagnostics(runner, persisted, caplog, known, voice):
|
||||
async def scenario():
|
||||
runtime, transport, out = await make(SimpleNamespace(engine=None), runner, persisted)
|
||||
runtime.adapter.model = "gpt-realtime-2.1"
|
||||
runtime.adapter.voice = voice
|
||||
try:
|
||||
await input_turn(runtime)
|
||||
await response(runtime, transport)
|
||||
@@ -146,8 +148,13 @@ def test_unverified_profile_cancellation_diagnostics(runner, persisted, caplog,
|
||||
type="invalid_request_error" if known else "PRIVATE_TYPE",
|
||||
code="response_cancel_not_active" if known else "PRIVATE_CODE",
|
||||
param=None if known else "PRIVATE_PARAM", message="PRIVATE_MESSAGE")))
|
||||
if known and voice == "shimmer":
|
||||
assert runtime.usable and runtime.failure is None
|
||||
assert not runtime.responses["r1"].terminal
|
||||
assert len(commands(transport, "response.create")) == 1
|
||||
return
|
||||
assert runtime.failure == "LIVE_CONTEXT_SYNC_FAILED"
|
||||
assert "cancellation_profile_2_1_shimmer=1" in caplog.text
|
||||
assert f"cancellation_profile_2_1_shimmer={int(voice == 'shimmer')}" in caplog.text
|
||||
for field in ("type", "code", "param"):
|
||||
assert f"cancellation_{field}_match={int(known)}" in caplog.text
|
||||
assert "PRIVATE" not in caplog.text
|
||||
|
||||
Reference in New Issue
Block a user