claude code not working on Mac Os with Bedrock

Resolved 💬 16 comments Opened Feb 25, 2025 by massi-ang Closed Feb 27, 2025
💡 Likely answer: A maintainer (8enmann, collaborator) responded on this thread — see the highlighted reply below.

I have enabled bedrock integration, but I am getting the following error:

> /init is analyzing your codebase…
  ⎿  API Error (429 Too many tokens, please wait before trying again.) · Retrying in 1 seconds… (attempt 1/10)
  ⎿  API Error (429 Too many tokens, please wait before trying again.) · Retrying in 1 seconds… (attempt 2/10)
  ⎿  API Error (429 Too many tokens, please wait before trying again.) · Retrying in 2 seconds… (attempt 3/10)
  ⎿  API Error (429 Too many tokens, please wait before trying again.) · Retrying in 4 seconds… (attempt 4/10)

When looking at CW Logs I see a throttling exception for Claude Sonnet 3-5 (and not 3-7 as expected).

View original on GitHub ↗

16 Comments

8enmann collaborator · 1 year ago

Hi @massi-ang , can you share the command/envvars you used to invoke claude ?

massi-ang · 1 year ago

Update:

I tested the tool again today, and it is working as expected, at least for /init.

oscarthorn · 1 year ago

Same for me on linux. Started with: CLAUDE_CODE_USE_BEDROCK=1 ANTHROPIC_MODEL='us.anthropic.claude-3-7-sonnet-20250219-v1:0' DISABLE_PROMPT_CACHING=1 claude

Keep getting "Too many tokens, please wait before trying again." and then sometime it works.

8enmann collaborator · 1 year ago

We suggest getting at least 300k ITPM (input tokens per minute) of Sonnet 3.7 for a good experience. Do you know what your current rate limits are?

nalindley · 1 year ago

Same issue for me on WSL with limit of 1M tokens

8enmann collaborator · 1 year ago

@nalindley can you take a screenshot of your rate limits and provide them here?

BoldPlut0 · 1 year ago

Same issue :

⎿  API Error (429 Too many tokens, please wait before trying again.) · Retrying in 1 seconds… (attempt 1/10)
  ⎿  API Error (429 Too many tokens, please wait before trying again.) · Retrying in 1 seconds… (attempt 2/10)
  ⎿  API Error (429 Too many tokens, please wait before trying again.) · Retrying in 2 seconds… (attempt 3/10)
  ⎿  API Error (429 Too many tokens, please wait before trying again.) · Retrying in 1 seconds… (attempt 1/10)
  ⎿  API Error (429 Too many tokens, please wait before trying again.) · Retrying in 1 seconds… (attempt 2/10)
  ⎿  API Error (429 Too many tokens, please wait before trying again.) · Retrying in 2 seconds… (attempt 3/10)
  ⎿  API Error (429 Too many tokens, please wait before trying again.) · Retrying in 4 seconds… (attempt 4/10)
  ⎿  API Error (429 Too many tokens, please wait before trying again.) · Retrying in 8 seconds… (attempt 5/10)
  ⎿  API Error (429 Too many tokens, please wait before trying again.) · Retrying in 16 seconds… (attempt 6/10)
  ⎿  A

It was s small task and I already get this issue

nalindley · 1 year ago

Managed to figure it out - talked to AWS support, it's just a capacity issue on their end and they're applying limits lower than the stated service quota unless you have provisioned throughput. They recommended switching to a different region temporarily and that's worked so far for me.

BoldPlut0 · 1 year ago

I'm using oregon and which region did you switch to ?

nalindley · 1 year ago

Actually i switched to Oregon - the other thing that might help is just to make sure you've requested access to the model across multiple regions, so switch to us-east-1 and request it, same for us-east-2, etc. I might be making this up, but I think the cross-region inference isn't actually enabled until you have access everywhere

nikhil-pandey · 1 year ago

Same issue

anand-bakerev · 1 year ago

Facing same issue, apparently I have too low ITPM (10K only) configured in Service Quotas for Sonnet 3.7, anybody got that increased?

ngn999 · 1 year ago
Facing same issue, apparently I have too low ITPM (10K only) configured in Service Quotas for Sonnet 3.7, anybody got that increased?

We can't.

This quota isn't adjustable and you can't request a quota increase.
8enmann collaborator · 1 year ago

Sorry I suggest contacting AWS support for increased quota. Or try our API directly at https://console.anthropic.com/

abhikanike · 1 year ago

I contacted Support Center and they mentioned currently this limit (10k) cannot be increased.

Do you think downgrading the model version (Claude 3.5) help ?

github-actions[bot] · 11 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.