High error rate for more than 200-ish tokens

I have been using codegpt for Emacs (link below) and I’ve noticed that if I do a smaller function that’s less than about 200 tokens then everything works just fine. Though if I try to pass something larger in I always get an error back.

So I was curious if there was a limit to the tokens that can be used per request? I know there’s the max_token value, but currently that’s set to 4,000 in codegpt and I can’t get anywhere near that large of a set.