Claude Sonnet 8K context error

Hi all

Sonnet has an 8k context output now but getting an error. Anyone know why?

CleanShot 2024-07-24 at 08.17.40

Hi,

To have 8192 output tokens, you must use anthropic-beta header:

  1. 8192 output tokens is in beta and requires the header anthropic-beta: max-tokens-3-5-sonnet-2024-07-15. If the header is not specified, the limit is 4096 tokens.

Source

So you must build a custom request using the HTTP module, as there is no “Make an API Call” option for Anthropic’s connection.

API docs are here.

3 Likes

Ahhh ok great thank you! Hopefully when it’s out of beta it will be default?

Ahhh ok great thank you!

If it solved your problem, please mark it as solved. Thanks! :slight_smile:

Hopefully when it’s out of beta it will be default?

Only Anthropic knows it for sure, it should be default- maybe with model update.

1 Like