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] The environment variable DEFAULT_MODEL configuration is invalid #5947

Open
chiachan163 opened this issue Dec 18, 2024 · 5 comments
Open
Labels
bug Something isn't working

Comments

@chiachan163
Copy link

📦 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

最后定位到这里,发现是接口返回数据并没有写入。所以取数据还是默认值gpt-4o-mini

📷 Recurrence Steps

No response

🚦 Expected Behavior

No response

📝 Additional Information

No response

@chiachan163 chiachan163 added the bug Something isn't working label Dec 18, 2024
@Issues-translate-bot
Copy link

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


Title: [Bug] The environment variable DEFAULT_MODEL configuration is invalid

@chiachan163 chiachan163 changed the title [Bug] 环境变量DEFAULT_MODEL配置无效 [Bug] The environment variable DEFAULT_MODEL configuration is invalid Dec 18, 2024
@wangping886
Copy link

同样的问题,DEFAULT_MODEL 和CUSTOM_MODELS 配置不起作用。我自己本地设置了DEFAULT_MODEL = qwen-turbo
访问web页面看到默认的模型还是gpt-4-mini。 另外我尝试了设置CUSTOM_MODELS = +qwen-7b-chat,也并没有看到新模型;

@Issues-translate-bot
Copy link

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


Same problem, DEFAULT_MODEL and CUSTOM_MODELS configurations don't work. I set DEFAULT_MODEL = qwen-turbo locally myself
Visit the web page and see that the default model is still gpt-4-mini. In addition, I tried setting CUSTOM_MODELS = +qwen-7b-chat, but I did not see the new model;

@wangping886
Copy link

同样的问题,DEFAULT_MODEL 和CUSTOM_MODELS 配置不起作用。我自己本地设置了DEFAULT_MODEL = qwen-turbo 访问web页面看到默认的模型还是gpt-4-mini。 另外我尝试了设置CUSTOM_MODELS = +qwen-7b-chat,也并没有看到新模型;

我的是因为配置文件后面的空值DEFAULT_MODEL覆盖了前面的DEFAULT_MODEL 。 而且DEFAULT_MODEL 需要这样设置+qwen-coder-turbo@Alibaba

@Issues-translate-bot
Copy link

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


Same problem, DEFAULT_MODEL and CUSTOM_MODELS configurations don't work. I set DEFAULT_MODEL = qwen-turbo locally and visited the web page to see that the default model is still gpt-4-mini. In addition, I tried setting CUSTOM_MODELS = +qwen-7b-chat, but I did not see the new model;

Mine is because the empty value DEFAULT_MODEL at the end of the configuration file overwrites the previous DEFAULT_MODEL. And DEFAULT_MODEL needs to be set like this +qwen-coder-turbo@Alibaba

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

No branches or pull requests

3 participants