Files
zhanlu_proxy/internal
m1saka f988c47fec
build / build (push) Successful in 2m29s
Fix silent data loss in function_call arguments/output non-string JSON parsing
responsesInputToMessages unmarshaled function_call.arguments and
function_call_output.output as bare strings, silently dropping the
value when it arrived as an object or content-parts array. This
caused the model to lose tool-call context in multi-turn
conversations, increasing the likelihood of malformed tool-call JSON.

Add rawJSONToString (re-encodes non-string values as JSON strings)
and outputToString (extracts text from content-parts arrays, re-encodes
other non-string values). Add 3 regression tests covering object
arguments, array output, and object output.
2026-08-23 14:15:01 +08:00
..