[PR #5092] [MERGED] Fix: Azure OpenAI model key collision #5296

Closed
opened 2026-06-05 15:20:53 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/5092
Author: @RALaBarge
Created: 3/1/2026
Status: Merged
Merged: 3/5/2026
Merged by: @timothycarambat

Base: masterHead: fix/azure-openai-model-key-collision


📝 Commits (5)

  • a61327a fix: Migrate AzureOpenAI model key from OPEN_MODEL_PREF to prevent the naming collision. No effort necessary from current users.
  • 474dc6b test: add backwards compat tests for AzureOpenAI model key migration
  • 1e04c6a patch missing env example file
  • 6e215f8 Merge branch 'master' of github.com:Mintplex-Labs/anything-llm into pr-5092-branch
  • 92b8d36 linting

📊 Changes

10 files changed (+76 additions, -11 deletions)

View changed files

📝 docker/.env.example (+1 -1)
📝 server/.env.example (+1 -1)
server/__tests__/utils/helpers/azureOpenAiModelPref.test.js (+55 -0)
📝 server/endpoints/utils.js (+2 -1)
📝 server/models/systemSettings.js (+2 -1)
📝 server/utils/AiProviders/azureOpenAi/index.js (+6 -3)
📝 server/utils/agents/aibitat/providers/azure.js (+4 -1)
📝 server/utils/agents/index.js (+3 -1)
📝 server/utils/helpers/index.js (+1 -1)
📝 server/utils/helpers/updateENV.js (+1 -1)

📄 Description

Pull Request Type

  • feat (New feature)
  • 🐛 fix (Bug fix)
  • ♻️ refactor (Code refactoring without changing behavior)
  • 💄 style (UI style changes)
  • 🔨 chore (Build, CI, maintenance)
  • 📝 docs (Documentation updates)

Relevant Issues

resolves #3839

Description

This resolves the issue where 2 different models were saving their information to the same var. This adds a new var and has a simple falsy check which will reference the old var if already set, otherwise reference the new var.

Additional Information

My first OSS contribution (i hope!)

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated (if applicable)
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/5092 **Author:** [@RALaBarge](https://github.com/RALaBarge) **Created:** 3/1/2026 **Status:** ✅ Merged **Merged:** 3/5/2026 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `fix/azure-openai-model-key-collision` --- ### 📝 Commits (5) - [`a61327a`](https://github.com/Mintplex-Labs/anything-llm/commit/a61327a764931db3ea421be8d8841cd884d2abeb) fix: Migrate AzureOpenAI model key from OPEN_MODEL_PREF to prevent the naming collision. No effort necessary from current users. - [`474dc6b`](https://github.com/Mintplex-Labs/anything-llm/commit/474dc6b998eb247a7d1496baa98488c90260c21f) test: add backwards compat tests for AzureOpenAI model key migration - [`1e04c6a`](https://github.com/Mintplex-Labs/anything-llm/commit/1e04c6a92b97a9cc19f67e9d097e2db5e5608eba) patch missing env example file - [`6e215f8`](https://github.com/Mintplex-Labs/anything-llm/commit/6e215f88f67c5e0b951c57de579fbe3229f69f9a) Merge branch 'master' of github.com:Mintplex-Labs/anything-llm into pr-5092-branch - [`92b8d36`](https://github.com/Mintplex-Labs/anything-llm/commit/92b8d36835501caee0baa8244c58ba931585b0aa) linting ### 📊 Changes **10 files changed** (+76 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `docker/.env.example` (+1 -1) 📝 `server/.env.example` (+1 -1) ➕ `server/__tests__/utils/helpers/azureOpenAiModelPref.test.js` (+55 -0) 📝 `server/endpoints/utils.js` (+2 -1) 📝 `server/models/systemSettings.js` (+2 -1) 📝 `server/utils/AiProviders/azureOpenAi/index.js` (+6 -3) 📝 `server/utils/agents/aibitat/providers/azure.js` (+4 -1) 📝 `server/utils/agents/index.js` (+3 -1) 📝 `server/utils/helpers/index.js` (+1 -1) 📝 `server/utils/helpers/updateENV.js` (+1 -1) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [ ] ✨ feat (New feature) - [X] 🐛 fix (Bug fix) - [ ] ♻️ refactor (Code refactoring without changing behavior) - [ ] 💄 style (UI style changes) - [ ] 🔨 chore (Build, CI, maintenance) - [ ] 📝 docs (Documentation updates) ### Relevant Issues resolves #3839 ### Description This resolves the issue where 2 different models were saving their information to the same var. This adds a new var and has a simple falsy check which will reference the old var if already set, otherwise reference the new var. ### Additional Information My first OSS contribution (i hope!) ### Developer Validations - [X] I ran `yarn lint` from the root of the repo & committed changes - [X] Relevant documentation has been updated (if applicable) - [X] I have tested my code functionality - [X] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-05 15:20:53 -04:00
yindo closed this issue 2026-06-05 15:20:53 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#5296