[PR #4948] [MERGED] Update LMStudio LLM & Embedder for API token #4842

Closed
opened 2026-02-22 18:36:38 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/4948
Author: @timothycarambat
Created: 1/30/2026
Status: Merged
Merged: 1/30/2026
Merged by: @timothycarambat

Base: masterHead: 4944-lmstudio-auth-token


📝 Commits (1)

  • a47852c Update LMStudio LLM & Embedder for API token

📊 Changes

12 files changed (+233 additions, -66 deletions)

View changed files

📝 docker/.env.example (+1 -0)
📝 frontend/src/components/EmbeddingSelection/LMStudioOptions/index.jsx (+87 -21)
📝 frontend/src/components/LLMSelection/LMStudioOptions/index.jsx (+108 -29)
📝 server/.env.example (+1 -0)
📝 server/models/systemSettings.js (+1 -0)
📝 server/utils/AiProviders/lmStudio/index.js (+11 -6)
📝 server/utils/EmbeddingEngines/lmstudio/index.js (+2 -1)
📝 server/utils/agents/aibitat/providers/ai-provider.js (+4 -2)
📝 server/utils/agents/aibitat/providers/lmstudio.js (+5 -3)
📝 server/utils/agents/index.js (+1 -1)
📝 server/utils/helpers/customModels.js (+8 -3)
📝 server/utils/helpers/updateENV.js (+4 -0)

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #4944

What is in this change?

  • Updates Option panels to be consistent for other providers adds API key to all LMStudio API calls
  • Applied changes to LLM and Embedder
  • Tested all combinations with and without a key applied to AnythingLLM or LMStudio server

Additional Information

  • Sending an API key when LMStudio does not require it has no impact on any calls
  • Catches Unauthorized throws from sending invalid non-api keyed requests to LMstudio server.

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • 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/4948 **Author:** [@timothycarambat](https://github.com/timothycarambat) **Created:** 1/30/2026 **Status:** ✅ Merged **Merged:** 1/30/2026 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `4944-lmstudio-auth-token` --- ### 📝 Commits (1) - [`a47852c`](https://github.com/Mintplex-Labs/anything-llm/commit/a47852cad234e98014adde4092a04f85e853db41) Update LMStudio LLM & Embedder for API token ### 📊 Changes **12 files changed** (+233 additions, -66 deletions) <details> <summary>View changed files</summary> 📝 `docker/.env.example` (+1 -0) 📝 `frontend/src/components/EmbeddingSelection/LMStudioOptions/index.jsx` (+87 -21) 📝 `frontend/src/components/LLMSelection/LMStudioOptions/index.jsx` (+108 -29) 📝 `server/.env.example` (+1 -0) 📝 `server/models/systemSettings.js` (+1 -0) 📝 `server/utils/AiProviders/lmStudio/index.js` (+11 -6) 📝 `server/utils/EmbeddingEngines/lmstudio/index.js` (+2 -1) 📝 `server/utils/agents/aibitat/providers/ai-provider.js` (+4 -2) 📝 `server/utils/agents/aibitat/providers/lmstudio.js` (+5 -3) 📝 `server/utils/agents/index.js` (+1 -1) 📝 `server/utils/helpers/customModels.js` (+8 -3) 📝 `server/utils/helpers/updateENV.js` (+4 -0) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [ ] ✨ feat - [ ] 🐛 fix - [x] ♻️ refactor - [ ] 💄 style - [x] 🔨 chore - [ ] 📝 docs ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> resolves #4944 ### What is in this change? - Updates Option panels to be consistent for other providers adds API key to all LMStudio API calls - Applied changes to LLM and Embedder - Tested all combinations with and without a key applied to AnythingLLM or LMStudio server <!-- Describe the changes in this PR that are impactful to the repo. --> ### Additional Information - Sending an API key when LMStudio does not require it has no impact on any calls - Catches Unauthorized throws from sending invalid non-api keyed requests to LMstudio server. <!-- Add any other context about the Pull Request here that was not captured above. --> ### Developer Validations <!-- All of the applicable items should be checked. --> - [ ] I ran `yarn lint` from the root of the repo & committed changes - [ ] Relevant documentation has been updated - [ ] I have tested my code functionality - [ ] 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-02-22 18:36:38 -05:00
yindo closed this issue 2026-02-22 18:36:39 -05:00
yindo changed title from [PR #4948] Update LMStudio LLM & Embedder for API token to [PR #4948] [MERGED] Update LMStudio LLM & Embedder for API token 2026-06-05 15:20:39 -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#4842