ChatGPTNextWeb / ChatGPTNextWeb/NextChat

[Bug] The environment variable DEFAULT_MODEL configuration is invalid

Open
#5,947 5 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

v2.15.8

### ๐Ÿ’ป Operating System

Other

### ๐Ÿ“Œ System Version

vercel

### ๐ŸŒ Browser

Chrome

### ๐Ÿ“Œ Browser Version

131.0.6778.140

### ๐Ÿ› Bug Description

```
fetch("/api/config", {
method: "post",
body: null,
headers: {
...getHeaders(),
},
})
.then((res) => res.json())
.then((res) => {
const defaultModel = res.defaultModel ?? "";
if (defaultModel !== "") {
const [model, providerName] = getModelProvider(defaultModel);
DEFAULT_CONFIG.modelConfig.model = model;
DEFAULT_CONFIG.modelConfig.providerName = providerName as any;
}

return res;
})
```

้…็ฝฎไบ†็Žฏๅขƒๅ˜้‡DEFAULT_MODEL=gpt-3.5-turbo@OpenAi ๏ผŒๅ‘็Žฐไธ็”Ÿๆ•ˆใ€‚
็œ‹ๆฅๆบ็ ๏ผŒๆ˜ฏๆœ‰ๅค„็†็š„ใ€‚
![8039eb92588be0c54427f4377e68a52e](https://github.com/user-attachments/assets/d69ca1c5-1dd0-44be-ace3-87b67bc68f15)

ๆœ€ๅŽๅฎšไฝๅˆฐ่ฟ™้‡Œ๏ผŒๅ‘็Žฐๆ˜ฏๆŽฅๅฃ่ฟ”ๅ›žๆ•ฐๆฎๅนถๆฒกๆœ‰ๅ†™ๅ…ฅใ€‚ๆ‰€ไปฅๅ–ๆ•ฐๆฎ่ฟ˜ๆ˜ฏ้ป˜่ฎคๅ€ผgpt-4o-mini

### ๐Ÿ“ท 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.