Skip to content

Server Error 500 – "Prompt is too long" (200348 tokens > 200000 maximum) #5896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 2 tasks
Vaibhavbambhaniya17 opened this issue May 29, 2025 · 1 comment
Open
1 of 2 tasks
Assignees
Labels
kind:bug Indicates an unexpected problem or unintended behavior

Comments

@Vaibhavbambhaniya17
Copy link

Validations

  • I believe this is a way to improve. I'll try to join the Continue Discord for questions
  • I'm not able to find an open issue that requests the same enhancement

Problem

When I send a very large prompt to the Continue server, it returns a 500 Internal Server Error. The error message says the prompt is too long (200348 tokens > 200000), but a 500 status code usually means a server problem. In this case, it's actually caused by the prompt being too big.

Solution

Return a proper 4xx status code (e.g. 413 Payload Too Large or 400 Bad Request) instead of a 500, since this is a client-side error due to exceeding token limits.

Include a clearer error message in the response that explains:

The input exceeded the maximum token limit.

The exact token count versus the limit.

How the user can reduce the prompt length.

Optionally, implement client-side validation (if applicable) or server-side pre-checks to catch token limit issues before attempting processing.

@sestinj sestinj self-assigned this May 29, 2025
@dosubot dosubot bot added the kind:bug Indicates an unexpected problem or unintended behavior label May 29, 2025
@0x23d11
Copy link
Contributor

0x23d11 commented May 31, 2025

@Vaibhavbambhaniya17 can you give more specific details like OS, model, api provider, the exact prompt. This would really help to fix the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Indicates an unexpected problem or unintended behavior
Projects
Status: Todo
Development

No branches or pull requests

3 participants