How to fix ApiSyntaxError: Could not parse API call kwargs as JSON on my GPTs

Hi friends,

I’ve done lots of research about this error within the community but I haven’t found a good solution yet. I notice that this error is more likely to happen when it’s the second request and onwards in the same chat. If I start a new chat, this error will likely to go away.

The error just started to surface to my GPTs (screenshot). I checked my API server and these erroneous requests don’t even hit my server. Does anyone know how to resolve this? This error is flaky and hard to replicate.

When I am in the debug mode, I noticed that the failed requests don’t have the params field set up.

This is the culprit of the error. The successful requests have non-empty params field.

The successful request should look like this:

The issue appeared to have gone away once I removed all the actions from my GPT and re-add them back.