Skip to content

Commit d35c214

Browse files
mudlerrichiejp
authored andcommitted
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 <mudler@localai.io>
1 parent 4aaf9c6 commit d35c214

2 files changed

Lines changed: 29 additions & 1 deletion

File tree

core/config/meta/registry.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,34 @@ func DefaultRegistry() map[string]FieldMetaOverride {
308308
},
309309
Order: 64,
310310
},
311+
"pipeline.disable_thinking": {
312+
Section: "pipeline",
313+
Label: "Disable Thinking",
314+
Description: "Suppress reasoning/thinking output from the pipeline LLM (sets enable_thinking=false on the underlying model). Use for models that emit <think> blocks you don't want spoken or streamed back to the realtime client.",
315+
Component: "toggle",
316+
Order: 65,
317+
},
318+
"pipeline.streaming.llm": {
319+
Section: "pipeline",
320+
Label: "Stream LLM",
321+
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.",
322+
Component: "toggle",
323+
Order: 66,
324+
},
325+
"pipeline.streaming.tts": {
326+
Section: "pipeline",
327+
Label: "Stream TTS",
328+
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.",
329+
Component: "toggle",
330+
Order: 67,
331+
},
332+
"pipeline.streaming.transcription": {
333+
Section: "pipeline",
334+
Label: "Stream Transcription",
335+
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.",
336+
Component: "toggle",
337+
Order: 68,
338+
},
311339

312340
// --- Functions ---
313341
"function.grammar.parallel_calls": {

core/http/endpoints/openai/realtime_speech_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ var _ = Describe("emitSpeech", func() {
4747
// A minimal real WAV file for the unary TTS path to read + parse.
4848
f, err := os.CreateTemp("", "emit-*.wav")
4949
Expect(err).ToNot(HaveOccurred())
50-
defer os.Remove(f.Name())
50+
defer func() { _ = os.Remove(f.Name()) }()
5151
pcm := make([]byte, 320) // 160 samples of silence
5252
hdr := laudio.NewWAVHeader(uint32(len(pcm)))
5353
Expect(hdr.Write(f)).To(Succeed())

0 commit comments

Comments
 (0)