NextChat icon indicating copy to clipboard operation
NextChat copied to clipboard

[Miscfg / Bug] "you are not allowed to use xxx model"

Open Charon2050 opened this issue 10 months ago • 8 comments

📦 Deployment Method

Vercel

📌 Version

2.15.8

💻 Operating System

Windows

📌 System Version

11

🌐 Browser

Firefox

📌 Browser Version

135.0

🐛 Bug Description

使用任何非用户自定义模型时,均报错:

{
  "error": true,
  "message": "you are not allowed to use xxx model"
}

env:

BYTEDANCE_URL: "https://ark.cn-beijing.volces.com/api/v3"
BYTEDANCE_API_KEY: "xxxx"
DEFAULT_MODEL: "ep-2025xxx7p@bytedance"
CUSTOM_MODELS: "-all,+claude-3-opus-latest,+ep-2025xxx7p@bytedance=DeepSeek-R1"
ENABLE_BALANCE_QUERY: "1"
DISABLE_GPT4: "1"
ANTHROPIC_API_VERSION: "2023-06-01"
ANTHROPIC_API_KEY: "xxxx"
ANTHROPIC_URL: "https://api.anthropic.com/"
OPENAI_API_KEY: "xxxx"

📷 Recurrence Steps

No response

🚦 Expected Behavior

期望任何游客均可直接开始对话

📝 Additional Information

No response

Charon2050 avatar Feb 11 '25 16:02 Charon2050

+1 添加了自定义模型时,第一次对话还是会使用openai,需要手动切换一次模型才正常

Montaro2017 avatar Feb 14 '25 01:02 Montaro2017

Bot detected the issue body's language is not English, translate it automatically.


+1 When adding a custom model, openai will still be used for the first conversation, and it is necessary to manually switch the model to normal.

Issues-translate-bot avatar Feb 14 '25 01:02 Issues-translate-bot

Seems still trying to use openai:

[Server Config] using 1 of 1 api key - xxx
[openai Route] params  { provider: 'openai', path: [ 'v1', 'chat', 'completions' ] }
[OpenAI Route] params  { provider: 'openai', path: [ 'v1', 'chat', 'completions' ] }
[Server Config] using 1 of 1 api key - xxx
[Auth] allowed hashed codes:  []
[Auth] got access code:
[Auth] hashed access code: d41d8cd98f00b204e9800998ecf8427e
[User IP]  ::ffff:192.168.56.1
[Time]  2/14/2025, 7:00:05 AM
[Server Config] using 1 of 1 api key - xxx
[Auth] admin did not provide an api key
[Proxy]  v1/chat/completions
[Base Url] https://chatgpt1.nextweb.fun/api/proxy
fetchUrl https://chatgpt1.nextweb.fun/api/proxy/v1/chat/completions
[openai Route] params  { provider: 'openai', path: [ 'v1', 'chat', 'completions' ] }
[OpenAI Route] params  { provider: 'openai', path: [ 'v1', 'chat', 'completions' ] }
[Server Config] using 1 of 1 api key - xxx
[Auth] allowed hashed codes:  []
[Auth] got access code:
[Auth] hashed access code: d41d8cd98f00b204e9800998ecf8427e
[User IP]  ::ffff:192.168.56.1
[Time]  2/14/2025, 7:00:05 AM
[Server Config] using 1 of 1 api key - xxx
[Auth] admin did not provide an api key
[Proxy]  v1/chat/completions
[Base Url] https://chatgpt1.nextweb.fun/api/proxy
fetchUrl https://chatgpt1.nextweb.fun/api/proxy/v1/chat/completions
[Server Config] using 1 of 1 api key - xxx

windowsair avatar Feb 14 '25 07:02 windowsair

+1

qinst64 avatar Feb 16 '25 14:02 qinst64

我也遇到了类似的问题,丑陋的规避方法是将 app/utils/model.ts 文件中 isModelNotavailableInServer() 函数体改掉,例如直接返回false。

neevop avatar Feb 20 '25 16:02 neevop

Bot detected the issue body's language is not English, translate it automatically.


I also encountered a similar problem. The ugly way to avoid it is to change the body of the isModelNotavailableInServer() function in the app/utils/model.ts file, for example, return false directly.

Issues-translate-bot avatar Feb 20 '25 16:02 Issues-translate-bot

Bot detected the issue body's language is not English, translate it automatically.


I also encountered a similar problem. The ugly way to avoid it is to change the body of the isModelNotavailableInServer() function in the app/utils/model.ts file, for example, directly return false.

Can you ask if you deployed it with DOCKER? I didn't find this file after deploying it with docker

Issues-translate-bot avatar Apr 19 '25 05:04 Issues-translate-bot