NextChat icon indicating copy to clipboard operation
NextChat copied to clipboard

[Bug] 服务器在新加坡,但7月版本提问返回unsupported_country_region_territory

Open xumin323 opened this issue 1 year ago • 12 comments

📦 部署方式

Docker

📌 软件版本

2.13.1

💻 系统环境

Other Linux

📌 系统版本

Debian GNU/Linux 11 (bullseye)

🌐 浏览器

Chrome

📌 浏览器版本

126.0.6478.127

🐛 问题描述

我的服务器在新加坡,5月份的版本是正常的,但我更新到7月份的版本后,提问就返回 { "error": { "code": "unsupported_country_region_territory", "message": "Country, region, or territory not supported", "param": null, "type": "request_forbidden" } } 新加坡应该没被禁呀,请问下是什么原因?

📷 复现步骤

No response

🚦 期望结果

No response

📝 补充信息

No response

xumin323 avatar Jul 25 '24 07:07 xumin323

在服务器上使用 curl 请求OpenAI的api看看ip是否有问题。如果ip没有问题,拉取最新的v2.14.0镜像看看。

curl https://api.openai.com/v1/chat/completions \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer $OPENAI_API_KEY" \
     -d '{"model": "gpt-4o-mini","messages": [{"role": "system","content": "You are a poetic assistant, skilled in explaining complex programming concepts with creative flair."},{"role": "user","content": "Compose a poem that explains the concept of recursion in programming."}]}'

Kosette avatar Jul 26 '24 14:07 Kosette

相同问题, 新加坡VM,使用AOI节点也受到影响: image

已在该VM使用curl命令测试AzureOpenAI节点: curl -X POST "https://XXXXX.openai.azure.com/openai/deployments/XXXXXXXX/chat/completions?api-version=2024-02-15-preview" -H "Content-Type: application/json" -H "api-key: ==YOUR_API_KEY===" -d "{"messages":[{"role":"system","content":"You are an AI assistant that helps people find information."}],"max_tokens":800,"temperature":0.7,"frequency_penalty":0,"presence_penalty":0,"top_p":0.95,"stop":null}" 本身没有问题,问题应该出现在ChatGPTNextWeb方面。 image

尝试降级到 chatgpt-next-web:v2.12.4 问题解决: https://hub.docker.com/r/yidadaa/chatgpt-next-web/tags image

AndyX-Net avatar Jul 29 '24 07:07 AndyX-Net

相同问题, 新加坡VM,使用AOI节点也受到影响: image

已在该VM使用curl命令测试AzureOpenAI节点: curl -X POST "https://XXXXX.openai.azure.com/openai/deployments/XXXXXXXX/chat/completions?api-version=2024-02-15-preview" -H "Content-Type: application/json" -H "api-key: ==YOUR_API_KEY===" -d "{"messages":[{"role":"system","content":"You are an AI assistant that helps people find information."}],"max_tokens":800,"temperature":0.7,"frequency_penalty":0,"presence_penalty":0,"top_p":0.95,"stop":null}" 本身没有问题,问题应该出现在ChatGPTNextWeb方面。 image

尝试降级到 chatgpt-next-web:v2.12.4 问题解决: https://hub.docker.com/r/yidadaa/chatgpt-next-web/tags image

I got the same issue as well with my server deployed in SG region. Thanks @AndyX-Net for your share! The issue got resolved by downgrade the version to 2.12.4.

ghjkllasdf-fake avatar Jul 30 '24 00:07 ghjkllasdf-fake

应该是机器ip的问题,我换了个韩国服务器就可以了,谢谢各位专家了

xumin323 avatar Aug 02 '24 02:08 xumin323

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


It should be a problem with the machine IP. I just changed it to a Korean server. Thank you experts.

Issues-translate-bot avatar Aug 02 '24 02:08 Issues-translate-bot

应该是机器ip的问题,我换了个韩国服务器就可以了,谢谢各位专家了

It is not server IP issue. If you read the reply from @AndyX-Net , the issue got fixed without changing the server IP but just downgrade the version to 2.12.4. Thanks.

ghjkllasdf-fake avatar Aug 02 '24 12:08 ghjkllasdf-fake

Got same problem and fall back to v2.12.4 works fine. Checking the logs found that newer version using the wrong base url while Azure URL already configured. See below logs with exactly same config.

Logs from v2.12.4:

chatgpt-web  | [Base Url] https://MYENDPOINT.azure.com/openai/deployments/gpt-4o
chatgpt-web  | [Org ID] is not set up.
chatgpt-web  | [OpenAI Route] params  { path: [ 'v1', 'chat', 'completions' ] }

Logs from newer version:

chatgpt-web  | [Time]  9/6/2024, 3:51:15 PM
chatgpt-web  | [Server Config] using 1 of 1 api key - MYAPIKEY
chatgpt-web  | [Auth] admin did not provide an api key
chatgpt-web  | [Proxy]  v1/chat/completions?provider=openai&path=v1&path=chat&path=completions
chatgpt-web  | [Base Url] https://api.openai.com
chatgpt-web  | fetchUrl https://api.openai.com/v1/chat/completions?provider=openai&path=v1&path=chat&path=completions
chatgpt-web  | [Org ID] is not set up.
chatgpt-web  | [openai Route] params  { provider: 'openai', path: [ 'v1', 'chat', 'completions' ] }

davidwu111 avatar Sep 06 '24 08:09 davidwu111

感觉在v2.15.x的最新版本里还是有这个问题

daxnet avatar Apr 16 '25 01:04 daxnet

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


I feel like this problem is still there in the latest version of v2.15.x

Issues-translate-bot avatar Apr 16 '25 01:04 Issues-translate-bot

2.16 版本,使用gemini api,仍然出现这个问题

{
  "error": {
    "code": "unsupported_country_region_territory",
    "message": "Country, region, or territory not supported",
    "param": null,
    "type": "request_forbidden"
  }
}

viocha avatar Aug 15 '25 02:08 viocha

我的chatgpt网页版登录也不行,但我用的是蓝灯加速新加坡节点没法换

jhgfkdj avatar Oct 28 '25 13:10 jhgfkdj

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


My chatgpt web version login also doesn’t work, but I use the blue light to accelerate the Singapore node and I can’t change it.

Issues-translate-bot avatar Oct 28 '25 13:10 Issues-translate-bot