I am getting the error on vscode

Request Failed: Anthropic (Sourcegraph Cody Gateway): unexpected status code 400: {“type”:“error”,“error”:{“type”:“invalid_request_error”,“message”:“input length and max_tokens exceed context limit: 199127 + 8000 > 200000, decrease input length or max_tokens and try again”}}.

@molumo

Even if you deleted your post, it would be very helpful if you could tell us what model you’d used and what version of Cody it is. Because we see this as a serious issue and the dev team is already investigating for a fix.

Thank you

Oh, i was switching between 3.5 and 3.7 sonnet depending on the task. And i’m using the Cody free tier.
I deleted cause i switched to Gemini 1.5 pro and the error clear.
Although, id rather stick to the Anthropic models

And the issue appeared with the Sonnet 3.7 model of the last sent message?

No! Works now. Looks like it’s fixed.
Thanks to SourceGraph team lol!

2 Likes