sync(v2.12): preserve native Responses tool calls, history, schemas, and result metadata end-to-end #139

Open
opened 2026-09-09 14:58:55 +00:00 by nsaspy · 0 comments
Owner

Upstream

Agent Zero v2.12: https://github.com/agent0ai/agent-zero/releases/tag/v2.12

Gap

a0-symbolics already has custom Responses/XML-tool recovery, but v2.12 adds a broader canonical native-function-call/history contract. Current Agent.hist_add_ai_response() still accepts llm_result: LLMResult | None = None, so the v2.12 required-result/sentinel contract is not yet adopted.

Required work

  • Preserve canonical native function calls through Context Doctor without text repair rewriting them.
  • Store canonical function-call content in assistant history/masking and repeated-response detection.
  • Stream native tool arguments through the existing live tool display with alias normalization and masking.
  • Add non-strict argument schemas for bundled tool implementations used by Responses.
  • Preserve policy-filtered guidance in native function descriptions while converting the A0 tool envelope to native args.
  • Keep Responses-native IDs/encrypted reasoning in prepared history.
  • Keep Responses output-item reconstruction authoritative in the parser.
  • Skip Chat-only replay/input preparation for Chat Completions where it is unused.
  • Make llm_result required for AI-history writes, using an explicit LLMResult.non_llm() sentinel for greetings/interventions/non-provider turns while preserving intentional legacy call compatibility.
  • Keep encrypted reasoning markers out of readable assistant output.

Acceptance

  • Native tool calls survive parse -> repair/context doctor -> history -> next Responses request unchanged except intentional policy filtering/masking.
  • Existing XML/text tool recovery still works and does not hijack canonical function calls.
  • Non-LLM history writes carry an explicit sentinel, never ambiguous None state.
  • Repeated-response detection understands native function-call content.
  • Regression coverage includes canonical tool calls, streamed args, aliasing, masked args, encrypted reasoning, legacy history calls, and mixed Responses/text-repair turns.
## Upstream Agent Zero v2.12: https://github.com/agent0ai/agent-zero/releases/tag/v2.12 ## Gap `a0-symbolics` already has custom Responses/XML-tool recovery, but v2.12 adds a broader canonical native-function-call/history contract. Current `Agent.hist_add_ai_response()` still accepts `llm_result: LLMResult | None = None`, so the v2.12 required-result/sentinel contract is not yet adopted. ## Required work - Preserve canonical native function calls through Context Doctor without text repair rewriting them. - Store canonical function-call content in assistant history/masking and repeated-response detection. - Stream native tool arguments through the existing live tool display with alias normalization and masking. - Add non-strict argument schemas for bundled tool implementations used by Responses. - Preserve policy-filtered guidance in native function descriptions while converting the A0 tool envelope to native args. - Keep Responses-native IDs/encrypted reasoning in prepared history. - Keep Responses output-item reconstruction authoritative in the parser. - Skip Chat-only replay/input preparation for Chat Completions where it is unused. - Make `llm_result` required for AI-history writes, using an explicit `LLMResult.non_llm()` sentinel for greetings/interventions/non-provider turns while preserving intentional legacy call compatibility. - Keep encrypted reasoning markers out of readable assistant output. ## Acceptance - Native tool calls survive parse -> repair/context doctor -> history -> next Responses request unchanged except intentional policy filtering/masking. - Existing XML/text tool recovery still works and does not hijack canonical function calls. - Non-LLM history writes carry an explicit sentinel, never ambiguous `None` state. - Repeated-response detection understands native function-call content. - Regression coverage includes canonical tool calls, streamed args, aliasing, masked args, encrypted reasoning, legacy history calls, and mixed Responses/text-repair turns.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/a0-symbolics#139
No description provided.