Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add support to claude 3.7 sonnet with extended outputΒ #489

@rafaelfbs

Description

@rafaelfbs

Hi πŸ‘‹πŸ», first of all, I'm loving this project! Keep up the great work on this awesome project.

Anthropic recently released Claude 3.7 Sonnet, which supports an output of up to 128K tokens. I’d love to use this extended output in srcbook. What changes would be needed to support this?

I made a naive solution by updating the generateText call to set maxTokens: 128000 and modifying the createAnthropic call to add the anthropic-beta header when using claude-3.7-sonnet models.

Would this be the right approach, or are there other places that need updates?
I think the best solution would be a configuration for max tokens and maybe a check for values > 8192 (the original maxTokens).

Happy to help with implementation if needed! πŸš€

Here is the list of Anthropic models.
Image

And this is the info for the extended output header.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions