Files
LocalAI/core/http/endpoints/openai
Ettore Di Giacinto 008f9fdf81 fix(realtime): end a client response cleanly when its commit fails
A client response.create waits for the in-flight commit before the LLM
starts. Two exits left the client without a usable outcome:

- When the wait was cancelled (response.cancel, a newer response or
  teardown) the response returned with no event at all.
- When the commit produced no user item (transcription error, empty
  transcript, voice gate rejection) the LLM ran on a history that
  lacked the turn.

Send response.created and response.done with status cancelled for the
first case. For the second, do not run the LLM: send response.done with
status failed and an input_not_committed error. The commit still
reports its own cause. A response.create with no commit in flight is
unchanged. Add specs for STT error, empty transcript, cancel and
supersede during the wait.

Assisted-by: Claude Code:claude-sonnet-5-5
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2026-10-13 08:44:23 +00:00
..