[GH-ISSUE #3245] [BUG]: Generic OpenAI Embedder 404 Error with Embedding APIs (Silicon Flow, HF, Jina) #2090

Closed
opened 2026-02-22 18:28:06 -05:00 by yindo · 1 comment
Owner

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

How are you running AnythingLLM?

Docker (remote machine)

What happened?

🐛 Bug Report

Description

When using AnythingLLM to connect to embedding APIs, including Silicon Flow, Hugging Face Inference API, and Jina AI Embedding API, configuring the "Generic OpenAI" embedder results in a 404 error "404 page not found" during document embedding. Testing the APIs directly with curl commands works fine, ruling out network issues and API key problems. This suggests that AnythingLLM's "Generic OpenAI" embedder might be using an incorrect request method (GET instead of POST) or an incorrect request URL.

Expected behavior

AnythingLLM should successfully call the configured embedding API (Silicon Flow, Hugging Face, or Jina), embed the document content, and add the document to the Workspace without 404 errors.

Actual behavior

AnythingLLM document addition fails, reporting "Generic OpenAI Failed to embed: [failed_to_embed]: 404 404 page not found" error when using Silicon Flow, Hugging Face Inference API, and Jina AI Embedding API.

Environment

  • AnythingLLM Version: latest
  • Deployment Method: Docker
  • OS: Ubuntu 22.04
  • Browser: Chrome
  • Silicon Flow/Hugging Face/Jina API works with curl?: Yes, curl commands work fine for all tested APIs.

Additional context

I am not a developer and have deployed AnythingLLM by following AI instructions. Therefore, I have limited coding knowledge and rely heavily on AI guidance for setup and troubleshooting.

I have tested the "Generic OpenAI" embedder with three different embedding APIs: Silicon Flow, Hugging Face Inference API, and Jina AI Embedding API. All three APIs result in the same 404 error in AnythingLLM, while curl commands to these APIs work correctly. This strongly suggests the issue lies within the "Generic OpenAI" embedder's request construction or handling in AnythingLLM, rather than with the API endpoints themselves or network connectivity. It is possible that the "Generic OpenAI" embedder is incorrectly using GET requests instead of POST requests, or is constructing the request URL or request body incorrectly for these APIs.

Are there known steps to reproduce?

To Reproduce

  1. In the AnythingLLM backend, configure the "Generic OpenAI" embedder with API Endpoint URLs for Silicon Flow (https://api.siliconflow.cn/v1/embeddings), Hugging Face Inference API (https://api-inference.huggingface.co/v2/embeddings), and Jina AI Embedding API (https://api.jina.ai/embeddings) respectively, and configure the correct API Keys, Model Names (e.g., BAAI/bge-large-zh-v1.5 for Silicon Flow, and relevant models for Hugging Face and Jina).
  2. Create a Workspace and select the "Generic OpenAI" embedder.
  3. Upload a document (e.g., PDF, TXT).
  4. Observe the document adding process, which fails with the error message "Error: 1 documents failed to add." and "Generic OpenAI Failed to embed: [failed_to_embed]: 404 404 page not found".
  5. Inspect the browser developer tools console (Console) to see the "Generic OpenAI Failed to embed: [failed_to_embed]: 404 404 page not found" error, but no 404 error request in the Network tab.
  6. Check the AnythingLLM server-side logs, which show the error "addDocumentToNamespace GenericOpenAI Failed to embed: [failed_to_embed]: 404 404 page not found".
Originally created by @CookingNoodle on GitHub (Feb 17, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3245 ### How are you running AnythingLLM? Docker (remote machine) ### What happened? ## 🐛 Bug Report **Description** When using AnythingLLM to connect to embedding APIs, including Silicon Flow, Hugging Face Inference API, and Jina AI Embedding API, configuring the "Generic OpenAI" embedder results in a 404 error "404 page not found" during document embedding. Testing the APIs directly with curl commands works fine, ruling out network issues and API key problems. This suggests that AnythingLLM's "Generic OpenAI" embedder might be using an incorrect request method (GET instead of POST) or an incorrect request URL. **Expected behavior** AnythingLLM should successfully call the configured embedding API (Silicon Flow, Hugging Face, or Jina), embed the document content, and add the document to the Workspace without 404 errors. **Actual behavior** AnythingLLM document addition fails, reporting "Generic OpenAI Failed to embed: [failed_to_embed]: 404 404 page not found" error when using Silicon Flow, Hugging Face Inference API, and Jina AI Embedding API. **Environment** * AnythingLLM Version: latest * Deployment Method: Docker * OS: Ubuntu 22.04 * Browser: Chrome * Silicon Flow/Hugging Face/Jina API works with curl?: Yes, curl commands work fine for all tested APIs. **Additional context** I am not a developer and have deployed AnythingLLM by following AI instructions. Therefore, I have limited coding knowledge and rely heavily on AI guidance for setup and troubleshooting. I have tested the "Generic OpenAI" embedder with three different embedding APIs: Silicon Flow, Hugging Face Inference API, and Jina AI Embedding API. All three APIs result in the same 404 error in AnythingLLM, while curl commands to these APIs work correctly. This strongly suggests the issue lies within the "Generic OpenAI" embedder's request construction or handling in AnythingLLM, rather than with the API endpoints themselves or network connectivity. It is possible that the "Generic OpenAI" embedder is incorrectly using GET requests instead of POST requests, or is constructing the request URL or request body incorrectly for these APIs. ### Are there known steps to reproduce? **To Reproduce** 1. In the AnythingLLM backend, configure the "Generic OpenAI" embedder with API Endpoint URLs for Silicon Flow (`https://api.siliconflow.cn/v1/embeddings`), Hugging Face Inference API (`https://api-inference.huggingface.co/v2/embeddings`), and Jina AI Embedding API (`https://api.jina.ai/embeddings`) respectively, and configure the correct API Keys, Model Names (e.g., BAAI/bge-large-zh-v1.5 for Silicon Flow, and relevant models for Hugging Face and Jina). 2. Create a Workspace and select the "Generic OpenAI" embedder. 3. Upload a document (e.g., PDF, TXT). 4. Observe the document adding process, which fails with the error message "Error: 1 documents failed to add." and "Generic OpenAI Failed to embed: [failed_to_embed]: 404 404 page not found". 5. Inspect the browser developer tools console (Console) to see the "Generic OpenAI Failed to embed: [failed_to_embed]: 404 404 page not found" error, but no 404 error request in the Network tab. 6. Check the AnythingLLM server-side logs, which show the error "addDocumentToNamespace GenericOpenAI Failed to embed: [failed_to_embed]: 404 404 page not found".
yindo added the possible bug label 2026-02-22 18:28:06 -05:00
yindo closed this issue 2026-02-22 18:28:07 -05:00
Author
Owner

@timothycarambat commented on GitHub (Feb 17, 2025):

Because you are using the wrong base URL.
We use OpenAi SDK in the backend, so all you need to https://api.siliconflow.cn for the base. Same for all of the other providers. It is a 404, so your base URL is wrong - it is not a bug.

Example with SiliconFlow: https://github.com/Mintplex-Labs/anything-llm/issues/3109#issuecomment-2635780845

@timothycarambat commented on GitHub (Feb 17, 2025): Because you are using the wrong base URL. We use `OpenAi` SDK in the backend, so all you need to `https://api.siliconflow.cn` for the base. Same for all of the other providers. It is a 404, so your base URL is wrong - it is not a bug. Example with SiliconFlow: https://github.com/Mintplex-Labs/anything-llm/issues/3109#issuecomment-2635780845
yindo changed title from [BUG]: Generic OpenAI Embedder 404 Error with Embedding APIs (Silicon Flow, HF, Jina) to [GH-ISSUE #3245] [BUG]: Generic OpenAI Embedder 404 Error with Embedding APIs (Silicon Flow, HF, Jina) 2026-06-05 14:44:28 -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#2090