Invalid URL (POST /compatible-api/v1/embeddings)
Environment Configurations: .env
`OPENAI_API_KEY=sk-6ebdXXXXXXXXXXXXXXXX692c
MEMU_OPENAI_MODEL=qwen-plus
OPENAI_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
MEMU_EMBEDDING_MODEL=qwen-plus`
Error Log:
2025-08-18 09:41:44 | memu.memory.actions.update_memory_with_suggestions:414 | WARNING | Failed to generate embedding for memory item 600745: NotFoundError("Error code: 404 - {'error': {'code': '', 'param': None, 'message': 'Invalid URL (POST /compatible-api/v1/embeddings)', 'type': 'invalid_request_error'}, 'request_id': 'd3ad9012-43ce-901e-9756-db021c186140'}")
Questions: Could the 404 be caused by an incorrect URL path for embeddings in the DashScope compatible mode? (e.g., should the path be different from OpenAI's standard /v1/embeddings?) Does qwen-plus support embedding generation, or is a different model required for embeddings with DashScope? Are there any adjustments needed in the configuration (e.g., OPENAI_BASE_URL or MEMU_EMBEDDING_MODEL) to resolve this?
MemU needs an LLM, and an embeddings model to function properly. The error you have usually happens when your endpoint does not provide embeddings. To test if your endpoint supports embeddings, try to send the following request:
{
"model": "qwen-plus",
"input": [
"The food was delicious and the service was excellent",
"I had a terrible experience at this restaurant",
"The weather today is sunny and warm"
],
"encoding_format": "float",
"dimensions": 1536
}
To https://dashscope.aliyuncs.com/compatible-mode/v1/embeddings. This is a correctly formed OpenAI API request for embeddings. If it responds with a huge array of floats, your endpoint provides embeddings. If it doesn't, then your enpoint most likely only provides an LLM, or qwen-plus is not a valid embeddings model.
For example, you can use curl:
curl -X POST "https://dashscope.aliyuncs.com/compatible-mode/v1/embeddings" --data '{
"model": "qwen-plus",
"input": [
"The food was delicious and the service was excellent",
"I had a terrible experience at this restaurant",
"The weather today is sunny and warm"
],
"encoding_format": "float",
"dimensions": 1536
}'
Qwen-plus is an LLM, not an embeddings model. There are embedding models from Qwen such as Qwen/Qwen3-Embedding-8B. You need to look up your provider's documentation, to see what embedding models do they provide.
I think the root cause here is that you’re pointing memU at a language model (Qwen) instead of an embedding model. That’s why the request fails — the API path expects an embedding-capable endpoint.
This matches what we’ve seen many times in Problem Map (No.4, embedding mis-routing). The fix is not just the URL, you need to make sure the model type itself is an embedding model.
If you want, I can share the detailed breakdown of the mismatch and the safe configuration that avoids this trap.