Skip to content

[Bug]: Outdated anthropic sdk windows #4740

@Redes240

Description

@Redes240

What happened?

Hello everyone,

Creating a new anthropic api key gives you a ant-api03 key, however, this is incompatible with the older @anthropic-ai/sdk v0.16.x being used, which expects an ant-xxx key.

When sending a request i get this error:
Something went wrong. Here's the specific error message we encountered: Operation failed after 3 attempts: 401 {"type":"error","error":{"type":"authentication_error","message":"invalid x-api-key"}}

Upgrading the sdk to v0.32.1 (also change this in api/package.json) fixed the problem for me.

OS: Windows 11

Steps to Reproduce

  1. Install librechat by cloning the repo and docker compose
  2. Set ANTHROPIC_API_KEY=ant-api03-xxx as env variable
  3. prompt any anthropic model

What browsers are you seeing the problem on?

Firefox, Chrome, Microsoft Edge

Relevant log output

No response

Screenshots

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions