Inconsistent and weird tool calls in ChatGPT

I have been developing a ChatGPT app recently, and I keep encountering weird behaviors while testing my app.

First of all, it seems like sometimes, for large JSON payloads exceeding some seemingly random size, the output of the tool call gets truncated, making the model unable to extract the data it needs from the tool’s output.

More recently, ChatGPT started behaving weirdly in the way it called my tools. When explicitly asking it to pass certain parameters to my tools, it would tell me it was doing so, but I would not see the right payload being sent through to my app—or I would even see totally wrong payloads. It really seems like there’s some sort of other runtime changing what is being sent to my app instead of having the main agent thread do it.

Would anyone have any sources explaining why these behaviors are happening?

Thanks!