Issue input tokens lenght with boltdiy and claude 3.5 sonnet

2024-12-12 16:45:27     statusCode: 429,
2024-12-12 16:45:27     responseHeaders: {
2024-12-12 16:45:27       'anthropic-ratelimit-input-tokens-limit': '40000',
2024-12-12 16:45:27       'anthropic-ratelimit-input-tokens-remaining': '0',
2024-12-12 16:45:27       'anthropic-ratelimit-input-tokens-reset': '2024-12-12T15:46:32Z',
2024-12-12 16:45:27       'anthropic-ratelimit-output-tokens-limit': '8000',
2024-12-12 16:45:27       'anthropic-ratelimit-output-tokens-remaining': '8000',
2024-12-12 16:45:27       'anthropic-ratelimit-output-tokens-reset': '2024-12-12T15:45:28Z',
2024-12-12 16:45:27       'anthropic-ratelimit-requests-limit': '50',
2024-12-12 16:45:27       'anthropic-ratelimit-requests-remaining': '50',
2024-12-12 16:45:27       'anthropic-ratelimit-requests-reset': '2024-12-12T15:45:28Z',
2024-12-12 16:45:27       'anthropic-ratelimit-tokens-limit': '48000',
2024-12-12 16:45:27       'anthropic-ratelimit-tokens-remaining': '8000',
2024-12-12 16:45:27       'anthropic-ratelimit-tokens-reset': '2024-12-12T15:45:28Z',
2024-12-12 16:45:27       'cf-cache-status': 'DYNAMIC',
2024-12-12 16:45:27       'cf-ray': '8f0ed7793d6ebc41-ZRH',
2024-12-12 16:45:27       connection: 'keep-alive',
2024-12-12 16:45:27       'content-length': '478',
2024-12-12 16:45:27       'content-type': 'application/json',
2024-12-12 16:45:27       date: 'Thu, 12 Dec 2024 15:45:28 GMT',
2024-12-12 16:45:27       'request-id': 'req_015CurUMAcqQPPk7meGpE1fy',
2024-12-12 16:45:27       'retry-after': '63',
2024-12-12 16:45:27       server: 'cloudflare',
2024-12-12 16:45:27       via: '1.1 google',
2024-12-12 16:45:27       'x-robots-tag': 'none',
2024-12-12 16:45:27       'x-should-retry': 'true'
2024-12-12 16:45:27     },
2024-12-12 16:45:27     responseBody: '{"type":"error","error":{"type":"rate_limit_error","message":"This request would exceed your organization’s rate limit of 40,000 input tokens per minute. For details, refer to: https://docs.anthropic.com/en/api/rate-limits; see the response headers for current usage. Please reduce the prompt length or the maximum tokens requested, or try again later. You may also contact sales at https://www.anthropic.com/contact-sales to discuss your options for a rate limit increase."}}',

Hi @mredodos,
what problem do you see here with bolt? As far as I see in your Error/Stacktrace, your prompt is just to large, what depends on your context and the limits of the provider/model. I dont think there is something needing fixed in bolt, or I am I wrong?

i have just said “craeate a dashboard for connecting WordPress site” just this. i dont have share file or something. if you check the other post i have issue with claude not finish the editings or overwrite file and corrupt it

it seems bot send too much token in the prompt in backend

What Provider you testing on?

I just tested your prompt and working fine for me, without any problems/errors:


I am guessing its a rate-limit from anthropic

im using anthropic, do you think is better use another provider?


im trying with OpenRouter but same issue the file is not complete and is stuck on generation

is that happening when you reload the page also ??

this happens always, from first time i write the first prompt, when i reload the chat…

Is it possible that your PC maybe run out of memory? I see a lot of open browser tabs etc.
Just maybe worth to check, because bolt-tab can easily get a few GB of RAM needed.

i have 32 Gb of ram 50% free, i dont think the issue is related…

Ok, justed wanted to be sure.

Did you check the Browser Devtools for errors (F12) ?

Did you do check your modfiles?

would be great if you can me a video and post that on a issue on github… easer to understand exactly what is happening.

also before that try the latest main branch and see if the issue is resolved

ok i try the last version.

the input token problem trigger just with anthropic but with openrouter not trigger