[GH-ISSUE #3312] [BUG]: /v1/openai/embeddings is not compatible with openai spec / sdk #2130

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

Originally created by @miraculixx on GitHub (Feb 21, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3312

Originally assigned to: @shatfield4 on GitHub.

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

Currently

  • The /v1/openai/embeddings endpoint requires the "inputs" key, and it needs to be a list
  • this is not compatible with the OpenAI Embedding REST API Specs, which requires the "input" key
  • in consequence, the AnythingLLM embeddings REST API cannot be used with the openai sdk. Using the openai sdk, AnythingLLM returns HTTP 500

Expected

  • make the /v1/openai/embeddings endpoint compatible to OpenAI's

Are there known steps to reproduce?

  1. Download & install AnythingLLM Desktop
  2. Add an API Key
  3. Use the OpenAI Python SDK
client = OpenAI(api_key=api_key, base_url='http://localhost:3001/api/v1/openai')
embeddings = client.embeddings.create(
            model=None,
            input=[ "some text" ],
            encoding_format="float"
        ) 

Environment

  • OS: Linux
  • AnythingLLM Version: v1.7.4
Originally created by @miraculixx on GitHub (Feb 21, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3312 Originally assigned to: @shatfield4 on GitHub. ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? *Currently* * The `/v1/openai/embeddings` endpoint requires the "inputs" key, and it needs to be a list * this is not compatible with the [OpenAI Embedding REST API Specs](https://platform.openai.com/docs/api-reference/embeddings/create), which requires the "input" key * in consequence, the AnythingLLM embeddings REST API cannot be used with the openai sdk. Using the openai sdk, AnythingLLM returns HTTP 500 *Expected* * make the `/v1/openai/embeddings` endpoint compatible to OpenAI's ### Are there known steps to reproduce? 1. Download & install AnythingLLM Desktop 2. Add an API Key 3. Use the OpenAI Python SDK ``` client = OpenAI(api_key=api_key, base_url='http://localhost:3001/api/v1/openai') embeddings = client.embeddings.create( model=None, input=[ "some text" ], encoding_format="float" ) ``` Environment * OS: Linux * AnythingLLM Version: v1.7.4
yindo added the possible bug label 2026-02-22 18:28:15 -05:00
yindo closed this issue 2026-02-22 18:28:16 -05:00
yindo changed title from [BUG]: /v1/openai/embeddings is not compatible with openai spec / sdk to [GH-ISSUE #3312] [BUG]: /v1/openai/embeddings is not compatible with openai spec / sdk 2026-06-05 14:44:43 -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#2130