mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-10-13 14:28:00 +00:00
Own Responses-API state advancement in hist_add_ai_response
Make llm_result required in hist_add_ai_response and move _remember_llm_result_state inside so plugin authors cannot silently break response_id chaining. Drop manual state calls in main loop and _30_repeat_response. Pass empty LLMResult() for greeting and intervention progress. Document invariant in root AGENTS.md and affected extension DOX.
This commit is contained in:
parent
d75f6a259d
commit
4634070e95
7 changed files with 11 additions and 7 deletions
|
|
@ -19,6 +19,7 @@
|
|||
- Nonempty non-tool output becomes `{"thoughts":[raw]}`; XML-like output becomes `{}` only when suppression is enabled.
|
||||
- Blank-line-separated thoughts expand into separate entries after repair when the split strategy is enabled (default on).
|
||||
- A raw-text fallback conversion must emit a `fw.msg_thoughts_fallback.md` history warning and a separate `fw.msg_thoughts_fallback_response.md` user notice, refresh the generating log and response item with the transformed thoughts JSON, and set `skip_default_processing` so the retry advances the unusable-response counter.
|
||||
- The fallback passes the repaired `llm_result` to `hist_add_ai_response`, which owns Responses-API state advancement (`_remember_llm_result_state`); do not call the state method directly. The fallback turn's `response_id` is recorded so the next turn's `previous_response_id` chain stays intact.
|
||||
- The fallback warning is counted by the core stop-unusable-response loop alongside `fw.msg_misformat.md`, `fw.msg_repeat.md`, `fw.msg_empty_response.md`, and `fw.msg_reasoning_only.md`.
|
||||
- Log kvps retain streamed `reasoning` and `thoughts`, then add transformed output; `update_log` controls only View Details content.
|
||||
- A repaired `response` tool call refreshes the response log item when streaming did not create it.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue