continue icon indicating copy to clipboard operation
continue copied to clipboard

There was an error handling the response from Claude 4 Sonnet.

Open prikshitSharma opened this issue 11 months ago • 3 comments

Before submitting your bug report

Relevant environment info

- OS:windows 
- Continue version:1.2.11
- IDE version:1.107.1
- Model:
- config:
  

  
  OR link to agent in Continue hub:

Description

getting issue while using claude Sonnet 4 Error handling model response There was an error handling the response from Claude 4 Sonnet. {"type":"invalid_request_error","message":"prompt is too long: 201248 tokens > 200000 maximum"}

To reproduce

No response

Log output


prikshitSharma avatar Dec 21 '25 17:12 prikshitSharma

Related issues:

  • #9231 - Context length calculation incorrect for Anthropic Claude models (shows 130k tokens at 70% when actually 200k)
  • #8454 - Error Handling model response (input length and max_tokens exceed context limit: 143653 + 64000 > 200000)
  • #6136 - Error handling model response (input length and max_tokens exceed context limit: 198214 + 8192 > 200000)
  • #3342 - AWS Bedrock Always Returns MaxTokens Error

continue avatar Dec 21 '25 17:12 continue

This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.

github-actions[bot] avatar Mar 22 '26 02:03 github-actions[bot]

@prikshitSharma I believe this was addressed as we added a 30% counting buffer for anthropic models around the time this was opened.

RomneyDa avatar Mar 23 '26 21:03 RomneyDa