[Bug] 从 v2.15.3 开始使用 Azure 模型时无法正确指定默认模型
📦 Deployment Method
Docker
📌 Version
2.15.3
💻 Operating System
Ubuntu
📌 System Version
22.04.4 LTS
🌐 Browser
Chrome
📌 Browser Version
129.0.6668.71 (ARM)
🐛 Bug Description
上个版本 v2.15.2,想指定某个 Azure 上的模型为默认模型,必须使用模型在网页上模型列表中显示的名字作为 DEFAULT_MODEL 变量,才能正确设置。
例如,变量 CUSTOM_MODELS 设为 -all,+gpt-4o@Azure,+gpt-4o-mini@Azure,也就是使用两款 Azure 的模型
此时将变量 DEFAULT_MODEL 设为 gpt-4o 或者 gpt-4o@Azure 都是不行的
而是必须设置为 gpt-4o(Azure),也就是 与网页模型显示列表上的模型名必须完全一样,才能成功设置为默认模型。
PR #5428 更新后,也就是 v2.15.3 版本开始,网页模型显示列表上的模型名称变成了 gpt-4o (Azure),中间加了个空格,此时 DEFAULT_MODEL 填什么都没办法成功设置默认模型了,即使把中间这个空格加上也不行。默认模型设置失败,会回退到 OpenAI 的模型,然后提示 “ unsupported_country_region_territory” 的错误信息,用户必须手动选择一下模型才能正常使用。
📷 Recurrence Steps
No response
🚦 Expected Behavior
No response
📝 Additional Information
建议更新一下 DEFAULT_MODEL 的默认选择模型的机制(以及默认模型的回退机制),目前对非 OpenAI 用户来讲太不友好了,这个设置方式还是我自己试验试出来的。
另外,很多用 Azure 或者第三方 AI 模型的人最近遇到的 “访问密码不正确或为空” 的问题,可能也和这个有关,这个默认模型的设置经常无效,导致回退到 OpenAI,然后我们用 Azure 的并没有提供 OpenAI 的密钥,所以就会有这些错误提示。
Bot detected the issue body's language is not English, translate it automatically.
Title: [Bug] Default model cannot be specified correctly when using Azure models starting from v2.15.3
我也遇到了同样的问题
Bot detected the issue body's language is not English, translate it automatically.
I also encountered the same problem
我是遇到了
Bot detected the issue body's language is not English, translate it automatically.
I have met
@jia-niang 我看了一下PR https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/pull/5428 这里只改了展示的title,按道理匹配模型应该匹配select组件的value值,应该不是这里导致的吧?
Bot detected the issue body's language is not English, translate it automatically.
@jia-niang I took a look at the PR https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/pull/5428. Only the displayed title has been changed. Logically, the matching model should match the value of the select component. It should not be caused by this. ?
@jia-niang 可以用最新的 2.15.4 试试?默认模型这里是生效的
Bot detected the issue body's language is not English, translate it automatically.
@jia-niang Can you try using the latest 2.15.4? The default model is in effect here
我这边不生效,我还是写了DEFAULT_MODEL=gpt4omini (Azure)
Bot detected the issue body's language is not English, translate it automatically.
@jia-niang 可以用最新的 2.15.4 Download c69-eb1d-4fbc- be2d-3de0f3b56c38.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6 ImtleTUiLCJleHAiOjE3Mjg1NDQ5MjgsIm5iZiI6MTcyODU0NDYyOCwicGF0aCI6Ii8xMTAxNjk4MTEvMzc1MjAyMzA0LTkyYzk5YzY5LWViMWQtNGZiYy1iZTJkLTNkZTBmM2I1NmMzOC5wbmc _WC1BB 3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MTAxMFQwNzE3MDhaJlgtQW16LUV4cGlyZXM9Z 
我这边不生效,我还是写了DEFAULT_MODEL=gpt4omini(Azure) 不过我(Azure)前不用加空格
DEFAULT_MODEL=gpt4omini(Azure) 这不对把 没有这样的写法
Bot detected the issue body's language is not English, translate it automatically.
DEFAULT_MODEL=gpt4omini(Azure) This is wrong. There is no such way of writing it.
#5115
Bot detected the issue body's language is not English, translate it automatically.
#5115
DEFAULT_MODEL=gpt4omini(Azure) 这不对把 没有这样的写法
我是试出来的,这么写至少是管用的。
Bot detected the issue body's language is not English, translate it automatically.
DEFAULT_MODEL=gpt4omini(Azure) This is wrong. There is no such way of writing it.
I tried it out, and at least it works.
Bot detected the issue body's language is not English, translate it automatically.
DEFAULT_MODEL=gpt4omini(Azure) This is wrong. There is no such way of writing it.
I tried it out, and at least it works.
same with u.