ChatGPTNextWeb / ChatGPTNextWeb/NextChat

[Bug] 自定义模型分组无法使用,报错 you are not allowed to use xxx model

Open
#6,242 16 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

Docker

### 📌 Version

v2.16.0

### 💻 Operating System

Ubuntu

### 📌 System Version

22.04

### 🌐 Browser

Chrome

### 📌 Browser Version

latest

### 🐛 Bug Description

## 使用背景
我目前在使用 `v2.15.3`,`docker` 部署方式
各个渠道的key都使用 `one-api` 管理,然后在启动 `next-chat` 时设置
```bash
-e CUSTOM_MODELS="-all,+gpt-3.5-turbo@AZ-OAI,AZ/DeepSeek-R1@AZ-AI,gpt-4o@openai,claude-3-5-sonnet@BP-Anthropic,Qwen/Qwen2.5-7B-Instruct@硅基流动,THUDM/glm-4-9b-chat@硅基流动,glm-4-flash@智谱"
```
这个 `model_name@group_name` 的方式在UI展示上很好用

## 错误描述
用同样的 `CUSTOM_MODELS` 启动,最新的版本里UI显示没问题,但使用自定义模型时会报错:
```json
{
"error": true,
"message": "you are not allowed to use xxx model"
}
```
只有后面 `@openai`,`@OpenAI` 或者不加`@xxx` 的自定义模型可以用

## 预期
希望能够继续使用 `model_name@group_name` 的方式来展示和使用

### 📷 Recurrence Steps

_No response_

### 🚦 Expected Behavior

_No response_

### 📝 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.