Commit Graph

3 Commits

Author SHA1 Message Date
tes 4cfb0d4b9a Test 4a: migrate session.update + event names to GA Realtime API
Hardware verification surfaced four shape changes from the beta API that
the spec/plan was written against:

1. Remove the OpenAI-Beta: realtime=v1 header (GA rejects it with
   beta_api_shape_disabled).
2. session.update payload nests under session.audio.{input,output} instead
   of flat fields. session.type = "realtime" + session.model are inline.
3. session.audio.{input,output}.format is now an object
   ({ type: "audio/pcm", rate: 24000 }), not a bare "pcm16" string.
4. 'session.modalities' is no longer accepted; dropped (server uses defaults).
5. response.audio.*  →  response.output_audio.*  (delta, done, transcript).

Also silenced a bunch of GA framing events (conversation.item.added /
.done, response.output_item.added / .done, response.content_part.added /
.done, rate_limits.updated) that were burying signal in the [ws] ignored
log lines.

Plus added an outer try/catch around main so a mid-startup WS error event
(which fires cts.Cancel via the receive loop) routes through cleanup
instead of crashing on the await SendSessionUpdate.

Verified on hardware: full round-trip works, t=0.44 s end-of-speech to
first audio sample arriving, assistant reply audible, clean exit.
2026-06-12 19:41:08 +00:00
tes a590c96d07 Test 4a: wire NoMoreDeltas + add UpstreamSendLoop stop-and-empty exit
Code-review feedback from Task 2:
- Use state.NoMoreDeltas in the output callback completion check instead
  of downstream.Reader.Completion.IsCompleted (spec called for it as the
  redundant fast path; it was dead code before).
- UpstreamSendLoop now break's when StopSending && upstream channel empty,
  matching the spec's stated exit shape.
2026-06-12 19:15:29 +00:00
tes a1a3b5c981 Test 4a: WS plumbing + audio streams + server VAD round-trip 2026-06-12 19:09:26 +00:00