fix(security): preserve chat structured response-format integrity (#2402)