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

fix(PluginsClient.js): fix ChatOpenAI Azure Config Issue (#812)

Danny Avilaae5b7d3d53a3
diff --git a/api/app/clients/PluginsClient.js b/api/app/clients/PluginsClient.js
index 680fbfea0d..d29f03517a 100644
--- a/api/app/clients/PluginsClient.js
+++ b/api/app/clients/PluginsClient.js
@@ -150,6 +150,7 @@ Only respond with your conversational reply to the following User Message:
}
createLLM(modelOptions, configOptions) {
+ let azure = {};
let credentials = { openAIApiKey: this.openAIApiKey };
let configuration = {
apiKey: this.openAIApiKey,
@@ -158,6 +159,7 @@ Only respond with your conversational reply to the following User Message:
if (this.azure) {
credentials = {};
configuration = {};
+ ({ azure } = this);
}
if (this.options.debug) {
@@ -165,7 +167,7 @@ Only respond with your conversational reply to the following User Message:
console.debug(configOptions);
}
- return new ChatOpenAI({ credentials, configuration, ...modelOptions }, configOptions);
+ return new ChatOpenAI({ credentials, configuration, ...azure, ...modelOptions }, configOptions);
}
async initialize({ user, message, onAgentAction, onChainEnd, signal }) {