Rebase PR #784 and fix OpenAI model/chat regressions (#1384)

* Wire conversation history through OpenAI responses API

* Fix RuboCop hash brace spacing in assistant tests

* Pipelock ignores

* Batch fixes

---------

Co-authored-by: sokiee <sokysrm@gmail.com>
This commit is contained in:
Juan José Mata
2026-04-15 18:45:24 +02:00
committed by GitHub
parent 53ea0375db
commit 7b2b1dd367
24 changed files with 937 additions and 90 deletions

View File

@@ -63,6 +63,13 @@ class Assistant::Builtin < Assistant::Base
responder.respond(previous_response_id: latest_response_id)
rescue => e
stop_thinking
# If we streamed any partial content before the error, the message was
# persisted with the default `complete` status. Demote it to `failed` so
# `Assistant::Responder#conversation_history` won't feed a broken turn
# back into future prompts.
if assistant_message&.persisted?
assistant_message.update_columns(status: "failed")
end
chat.add_error(e)
end