To exit a bracket order, you need to send cancel order request with second leg order id and parent order id with variety co. You can refer to the pykiteconnect docs here.
exit_order is for placing the exit order for CO. You need to use place_order to exit the order for regular order. There you can use the tag param to specify the source.