Skip to content
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

OpenAI API "Request too large for gpt-4o" #144

Open
appreciated opened this issue Jun 6, 2024 · 1 comment
Open

OpenAI API "Request too large for gpt-4o" #144

appreciated opened this issue Jun 6, 2024 · 1 comment

Comments

@appreciated
Copy link
Contributor

appreciated commented Jun 6, 2024

Description

I stumbled today over an issue, where too many token were being used when communicating with the OpenAI api.

2024/06/06 14:56:37 Error creating chat completion stream: error, status code: 429, message: Request too large for gpt-4o in organization org-... on tokens per min (TPM): Limit 30000, Requested 30182. The input or output tokens must be reduced in order to run successfully. Visit https://platform.openai.com/account/rate-limits to learn more., retry: 10

This might be a regression introduced by #123.

Expected behaviour

If the response body contains "Request too large", there should be no retries, instead it should stop immediatly.
Also present the user a hint on how to resolve the issue.
In my case I forgot to reset the history by using plandex new and readding the context and retelling the task.
This brings me to another point, it would be great If I could transfer the current context to another plan pdx new --keep-context

@appreciated appreciated changed the title OpenAI API Request too large for gpt-4o OpenAI API "Request too large for gpt-4o" Jun 6, 2024
@cooffeeRequired
Copy link

Same issue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants