Nevermind. I found out that one of my items that was supposed to be passed into the generation function, specifically the GCS file URI, was undefined for some reason.
For people in the future trying to solve this problem, make sure to console.log EVERYTHING that is going into your prompt, including text, media, and anything else that isn’t explicitly written,