danny-avila / LibreChat

Enhanced ChatGPT Clone: Features Anthropic, AWS, OpenAI, Assistants API, Azure, Groq, o1, GPT-4o, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, langchain, DALL-E-3, ChatGPT Plugins, OpenAI Functions, Secure Multi-User System, Presets, completely open-source for self-hosting. Actively in public development.
https://librechat.ai/
MIT License
19.4k stars 3.24k forks source link

[Bug]: Outdated anthropic sdk windows #4740

Closed Redes240 closed 6 days ago

Redes240 commented 1 week ago

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