claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

claude code not working on Mac Os with Bedrock

Open massi-ang opened this issue 1 year ago • 16 comments

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).

massi-ang avatar Feb 25 '25 15:02 massi-ang

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

8enmann avatar Feb 25 '25 18:02 8enmann

Update:

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

massi-ang avatar Feb 26 '25 09:02 massi-ang

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.

oscarthorn avatar Feb 26 '25 11:02 oscarthorn

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?

8enmann avatar Feb 27 '25 00:02 8enmann

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

nalindley avatar Feb 27 '25 00:02 nalindley

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

8enmann avatar Feb 27 '25 23:02 8enmann

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

BoldPlut0 avatar Mar 01 '25 22:03 BoldPlut0

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.

nalindley avatar Mar 02 '25 02:03 nalindley

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

BoldPlut0 avatar Mar 02 '25 19:03 BoldPlut0

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

nalindley avatar Mar 02 '25 21:03 nalindley

Same issue

nikhil-pandey avatar Mar 03 '25 22:03 nikhil-pandey

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

anand-bakerev avatar Mar 06 '25 13:03 anand-bakerev

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.

ngn999 avatar Mar 08 '25 05:03 ngn999

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

8enmann avatar Mar 08 '25 07:03 8enmann

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 ?

abhikanike avatar Mar 19 '25 00:03 abhikanike

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.

github-actions[bot] avatar Aug 09 '25 14:08 github-actions[bot]