Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

feat: add host params to bingAI.

Wentao Lyu06b90f6a7772
diff --git a/api/.env.example b/api/.env.example
index c952ebe491..4fa5a432a1 100644
--- a/api/.env.example
+++ b/api/.env.example
@@ -41,6 +41,11 @@ OPENAI_KEY=
# Leave it and BINGAI_USER_TOKEN blank to disable this endpoint.
BINGAI_TOKEN=
+# BingAI Host:
+# Necessary for some people in different countries, e.g. China (https://cn.bing.com)
+# Leave it blank to use default server.
+# BINGAI_HOST="https://cn.bing.com"
+
# BingAI User defined Token
# Allow user to set their own token by client
# Uncomment this to enable this feature.
diff --git a/api/app/clients/bingai.js b/api/app/clients/bingai.js
index 015da79069..ca790ec43d 100644
--- a/api/app/clients/bingai.js
+++ b/api/app/clients/bingai.js
@@ -27,6 +27,7 @@ const askBing = async ({
// cookies: '',
debug: false,
cache: store,
+ host: process.env.BINGAI_HOST || null,
proxy: process.env.PROXY || null
});