Cooking on a gas fire pit that isn't specifically built for cooking is not recommended, the only exception being toasting marshmallows, since they only touch the flame and not the pit itself. However, some fire pits do sell accessories that you can add for safe cooking, and others are designed with cooking in mind.