Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Anthropic authentication_error CORS #5429

Closed
si1en7 opened this issue Sep 13, 2024 · 7 comments
Closed

[Bug] Anthropic authentication_error CORS #5429

si1en7 opened this issue Sep 13, 2024 · 7 comments
Assignees
Labels
bug Something isn't working planned planned feature, will support in the future

Comments

@si1en7
Copy link

si1en7 commented Sep 13, 2024

📦 Deployment Method

Official installation package

📌 Version

2.15.2

💻 Operating System

Windows

📌 System Version

Windows 11

🌐 Browser

Other

📌 Browser Version

Desktop

🐛 Bug Description

Changes to Anthropic API now responds:

{
  "type": "error",
  "error": {
    "type": "authentication_error",
    "message": "CORS requests must set 'anthropic-dangerous-direct-browser-access' header"
  }
}

This was a recent change to the API and now prevents NextChat from communicating correctly.

📷 Recurrence Steps

Any interaction with any existing or new chat will cause this issue.

🚦 Expected Behavior

No response

📝 Additional Information

No response

@si1en7 si1en7 added the bug Something isn't working label Sep 13, 2024
@Vaviera
Copy link

Vaviera commented Sep 13, 2024

📦 Deployment Method

Official installation package

📌 Version

2.15.2

💻 Operating System

Windows

📌 System Version

Windows 11

🌐 Browser

Other

📌 Browser Version

Desktop

🐛 Bug Description

Changes to Anthropic API now responds:

{
  "type": "error",
  "error": {
    "type": "authentication_error",
    "message": "CORS requests must set 'anthropic-dangerous-direct-browser-access' header"
  }
}

This was a recent change to the API and now prevents NextChat from communicating correctly.

📷 Recurrence Steps

Any interaction with any existing or new chat will cause this issue.

🚦 Expected Behavior

No response

📝 Additional Information

No response

Abrí yoro

@sunilsoni
Copy link

My API is completely stopped working because of this error:

Invalid API Key, please check it in Settings page.

{
  "type": "error",
  "error": {
    "type": "authentication_error",
    "message": "CORS requests must set 'anthropic-dangerous-direct-browser-access' header"
  }
}

@lloydzhou
Copy link
Member

#5379

@Issues-translate-bot

This comment was marked as duplicate.

@lloydzhou
Copy link
Member

You can now add the following HTTP request header to enable CORS support for the Anthropic API, which means you can make calls to Anthropic’s models directly from a browser:

anthropic-dangerous-direct-browser-access: true

https://simonwillison.net/2024/Aug/23/anthropic-dangerous-direct-browser-access/

@Sebastianxpp
Copy link

You can now add the following HTTP request header to enable CORS support for the Anthropic API, which means you can make calls to Anthropic’s models directly from a browser:

anthropic-dangerous-direct-browser-access: true

https://simonwillison.net/2024/Aug/23/anthropic-dangerous-direct-browser-access/

But where to add it and how to make it work in this application :(

@lloydzhou lloydzhou added the planned planned feature, will support in the future label Sep 14, 2024
Dogtiti added a commit that referenced this issue Sep 15, 2024
fix: #5429 Anthropic authentication_error CORS
@andremacola
Copy link

andremacola commented Sep 26, 2024

Still not working on 2.15.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working planned planned feature, will support in the future
Projects
None yet
Development

No branches or pull requests

8 participants