From f48344f2ff0b322b6329b87fa638f72eea36fd38 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Thu, 4 Jun 2026 23:08:49 +0000 Subject: [PATCH] fix(realtime): register pipeline streaming/thinking config fields TestAllFieldsHaveRegistryEntries (core/config/meta) requires every config field to have a meta registry entry. The four new pipeline fields (disable_thinking, streaming.{llm,tts,transcription}) had none, failing tests-linux/tests-apple. Add toggle entries for them. Also handle the os.Remove return in realtime_speech_test.go to satisfy errcheck (golangci-lint). Assisted-by: Claude:claude-opus-4-8 go test, golangci-lint Signed-off-by: Ettore Di Giacinto --- core/config/meta/registry.go | 28 +++++++++++++++++++ .../endpoints/openai/realtime_speech_test.go | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/core/config/meta/registry.go b/core/config/meta/registry.go index 548b21892..565bc2d4e 100644 --- a/core/config/meta/registry.go +++ b/core/config/meta/registry.go @@ -308,6 +308,34 @@ func DefaultRegistry() map[string]FieldMetaOverride { }, Order: 64, }, + "pipeline.disable_thinking": { + Section: "pipeline", + Label: "Disable Thinking", + Description: "Suppress reasoning/thinking output from the pipeline LLM (sets enable_thinking=false on the underlying model). Use for models that emit blocks you don't want spoken or streamed back to the realtime client.", + Component: "toggle", + Order: 65, + }, + "pipeline.streaming.llm": { + Section: "pipeline", + Label: "Stream LLM", + Description: "Stream LLM tokens to the realtime client as they are generated instead of waiting for the full response. Emits incremental response.output_audio_transcript.delta / text deltas.", + Component: "toggle", + Order: 66, + }, + "pipeline.streaming.tts": { + Section: "pipeline", + Label: "Stream TTS", + Description: "Stream synthesized audio chunks to the realtime client as they are produced (requires a TTS backend that implements TTSStream). Falls back to unary synthesis otherwise.", + Component: "toggle", + Order: 67, + }, + "pipeline.streaming.transcription": { + Section: "pipeline", + Label: "Stream Transcription", + Description: "Stream partial transcription text to the realtime client as the STT backend produces it (requires a transcription backend that implements AudioTranscriptionStream). Falls back to unary transcription otherwise.", + Component: "toggle", + Order: 68, + }, // --- Functions --- "function.grammar.parallel_calls": { diff --git a/core/http/endpoints/openai/realtime_speech_test.go b/core/http/endpoints/openai/realtime_speech_test.go index 6d09a7217..a501f946c 100644 --- a/core/http/endpoints/openai/realtime_speech_test.go +++ b/core/http/endpoints/openai/realtime_speech_test.go @@ -47,7 +47,7 @@ var _ = Describe("emitSpeech", func() { // A minimal real WAV file for the unary TTS path to read + parse. f, err := os.CreateTemp("", "emit-*.wav") Expect(err).ToNot(HaveOccurred()) - defer os.Remove(f.Name()) + defer func() { _ = os.Remove(f.Name()) }() pcm := make([]byte, 320) // 160 samples of silence hdr := laudio.NewWAVHeader(uint32(len(pcm))) Expect(hdr.Write(f)).To(Succeed())