ChatGPTNextWeb / ChatGPTNextWeb/NextChat

[Bug] 使用claude模型时,调用后端缺失Authorization header

Open
#5,597 6 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
88.8k
Forks
59.1k
PR merge metrics
No merged PRs in 30d

Description

### 📦 Deployment Method

Vercel

### 📌 Version

2.15.3

### 💻 Operating System

Windows

### 📌 System Version

win11 23H2 22631.4169

### 🌐 Browser

Edge

### 📌 Browser Version

129.0.2792.79

### 🐛 Bug Description

使用OpenAI模型时,请求头中包含Authorization header,接口正常返回。
使用Claude系列模型时,请求头中无此header,导致401报错
```
{
"error": true,
"msg": "empty access code"
}
```
后端日志:
```
/api/anthropic/v1/messages
[Auth] hashed access code: xxx
Oct 08 15:29:14.98
POST
---
/api/anthropic/v1/messages
[Auth] got access code:
---
/api/anthropic/v1/messages
[POST] /api/anthropic/v1/messages?nxtPprovider=anthropic&nxtPpath=v1%2Fmessages st
```

### 📷 Recurrence Steps

选择Claude系列模型,发送消息,返回401报错

### 🚦 Expected Behavior

正常返回调用结果

### 📝 Additional Information

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.