fix(security): prevent structured-output format downgrade (#2394)