[GH-ISSUE #2333] [BUG]: LMStudioEmbedder try to fetch with HEAD an incorrect end-point #1524

Closed
opened 2026-02-22 18:25:15 -05:00 by yindo · 6 comments
Owner

Originally created by @predoctech on GitHub (Sep 20, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2333

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

When using LMStudio as embedder, a call to LMStudio resulted in

[ERROR] Unexpected endpoint or method. (HEAD /v1/embeddings/models). Returning 200 anyway

In the code "this.basePath" has been updated as "${process.env.EMBEDDING_BASE_PATH}/embeddings" in the class constructor. Thus "this.basePath/models" would contain the values as in the error message. The correct endpoint is "/v1/models"

Are there known steps to reproduce?

  1. Set LMStudio as Embedding Provider in Embedder
  2. Upload a document and move it to Workspace
  3. "Save and Embed" should trigger the call to LMStudio
  4. Error message show up in LMStudio Server log
Originally created by @predoctech on GitHub (Sep 20, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2333 ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? When using LMStudio as embedder, a call to LMStudio resulted in > [ERROR] Unexpected endpoint or method. (HEAD /v1/embeddings/models). Returning 200 anyway In the code "this.basePath" has been updated as "${process.env.EMBEDDING_BASE_PATH}/embeddings" in the class constructor. Thus "this.basePath/models" would contain the values as in the error message. The correct endpoint is "/v1/models" ### Are there known steps to reproduce? 1. Set LMStudio as Embedding Provider in Embedder 2. Upload a document and move it to Workspace 3. "Save and Embed" should trigger the call to LMStudio 4. Error message show up in LMStudio Server log
yindo added the possible bug label 2026-02-22 18:25:15 -05:00
yindo closed this issue 2026-02-22 18:25:15 -05:00
Author
Owner

@timothycarambat commented on GitHub (Sep 20, 2024):

This is not a bug, it is just set up incorrectly if I am understanding correctly. The LMStudio base path is always
HTTP(s)://your-ip-or-host:port/v1. Just because it is used for the embedder does not mean to pre-empt the URL with HTTP(s)://your-ip-or-host:port/v1/embeddings or else the above bug will indeed produce

@timothycarambat commented on GitHub (Sep 20, 2024): This is not a bug, it is just set up incorrectly if I am understanding correctly. The LMStudio base path is _always_ `HTTP(s)://your-ip-or-host:port/v1`. Just because it is used for the embedder does not mean to pre-empt the URL with `HTTP(s)://your-ip-or-host:port/v1/embeddings` or else the above bug will indeed produce
Author
Owner

@migueloporto commented on GitHub (Oct 3, 2024):

Hello, sorry for reopening this topic. I’m experiencing the same problem. My base path is HTTP(s)://your-ip-or-host/v1. The issue is that the endpoint in my LM studio is /v1/embeddings, but anything makes a POST request adding a /models to the path, causing the error [ERROR] Unexpected endpoint or method. (HEAD /v1/embeddings/models). Returning 200 anyway.

https://github.com/user-attachments/assets/bc756978-2b1d-4b78-98b5-d481fe60d102

@migueloporto commented on GitHub (Oct 3, 2024): Hello, sorry for reopening this topic. I’m experiencing the same problem. My base path is `HTTP(s)://your-ip-or-host/v1`. The issue is that the endpoint in my LM studio is `/v1/embeddings`, but anything makes a POST request adding a `/models` to the path, causing the error [ERROR] Unexpected endpoint or method. (HEAD /v1/embeddings/models). Returning 200 anyway. https://github.com/user-attachments/assets/bc756978-2b1d-4b78-98b5-d481fe60d102
Author
Owner

@timothycarambat commented on GitHub (Oct 4, 2024):

@shatfield4 ^

@timothycarambat commented on GitHub (Oct 4, 2024): @shatfield4 ^
Author
Owner

@Br0wn1e23 commented on GitHub (Nov 9, 2024):

Jup, same problem is occuring for me.

@Br0wn1e23 commented on GitHub (Nov 9, 2024): Jup, same problem is occuring for me.
Author
Owner

@ibetho commented on GitHub (Nov 12, 2024):

same issue :(

@ibetho commented on GitHub (Nov 12, 2024): same issue :(
Author
Owner

@softyoda commented on GitHub (Apr 9, 2025):

This is not a bug, it is just set up incorrectly if I am understanding correctly. The LMStudio base path is always HTTP(s)://your-ip-or-host:port/v1. Just because it is used for the embedder does not mean to pre-empt the URL with HTTP(s)://your-ip-or-host:port/v1/embeddings or else the above bug will indeed produce

It would be nice to have the copy button near the text field "Reachable at:" to have this /v1 in the url

@softyoda commented on GitHub (Apr 9, 2025): > This is not a bug, it is just set up incorrectly if I am understanding correctly. The LMStudio base path is _always_ `HTTP(s)://your-ip-or-host:port/v1`. Just because it is used for the embedder does not mean to pre-empt the URL with `HTTP(s)://your-ip-or-host:port/v1/embeddings` or else the above bug will indeed produce It would be nice to have the copy button near the text field "Reachable at:" to have this /v1 in the url
yindo changed title from [BUG]: LMStudioEmbedder try to fetch with HEAD an incorrect end-point to [GH-ISSUE #2333] [BUG]: LMStudioEmbedder try to fetch with HEAD an incorrect end-point 2026-06-05 14:41:13 -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#1524