Skip to content

Commit cdfa782

Browse files
committed
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 774df7f commit cdfa782

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
@@ -277,6 +277,34 @@ func DefaultRegistry() map[string]FieldMetaOverride {
277277
AutocompleteProvider: ProviderModelsVAD,
278278
Order: 63,
279279
},
280+
"pipeline.disable_thinking": {
281+
Section: "pipeline",
282+
Label: "Disable Thinking",
283+
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.",
284+
Component: "toggle",
285+
Order: 64,
286+
},
287+
"pipeline.streaming.llm": {
288+
Section: "pipeline",
289+
Label: "Stream LLM",
290+
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.",
291+
Component: "toggle",
292+
Order: 65,
293+
},
294+
"pipeline.streaming.tts": {
295+
Section: "pipeline",
296+
Label: "Stream TTS",
297+
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.",
298+
Component: "toggle",
299+
Order: 66,
300+
},
301+
"pipeline.streaming.transcription": {
302+
Section: "pipeline",
303+
Label: "Stream Transcription",
304+
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.",
305+
Component: "toggle",
306+
Order: 67,
307+
},
280308

281309
// --- Functions ---
282310
"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)