Skip to content

Unsupported embedding model: bge-m3. Either add it to EMBEDDING_DIMENSIONS or set embedding.dimensions in config #339

@jszhang98

Description

@jszhang98

Plugin Version

memory-lancedb-pro/beta

OpenClaw Version

2026.03.23

Bug Description

When I run the plugin firstly, If I didn't give the "dimentions", it gave following error.

20:52:26 [plugins] memory-lancedb-pro failed during register from C:\Users\Administrator.openclaw\extensions\memory-lancedb-pro\index.ts: Error: Unsupported embedding model: bge-m3. Either add it to EMBEDDING_DIMENSIONS or set embedding.dimensions in config.

or, if I give the "dimentions" in configuration file. the error gone. but I got the following error.

21:17:56 [gateway] memory-lancedb-pro: initialized successfully (embedding: FAIL, retrieval: FAIL, mode: hybrid, FTS: disabled)
21:17:56 [gateway] memory-lancedb-pro: embedding test failed: Failed to generate embedding from api.modelarts-maas.com: 400 ModelArts.81001: 400 Model "bge-m3" does not support matryoshka representation, changing output dimensions will lead to poor results.
21:17:56 [gateway] memory-lancedb-pro: retrieval test failed: Failed to generate embedding from api.modelarts-maas.com: 400 ModelArts.81001: 400 Model "bge-m3" does not support matryoshka representation, changing output dimensions will lead to poor results.

this mean that I config it it didn't work, I don't confit it, it can not start the openclaw gateway.
(I used Huawei Bge-m3 model for embeddings. windows operaton system, openclaw 3.23 )

`
"memory-lancedb-pro": {
"enabled": true,
"config": {
"embedding": {
"apiKey": "R-v6OoE9b65mgnZX-zgtkw42vZS2Ng0pM75nUJRPk2OLESx54El09CsKgBJpCPo_2hiQ0offPtHD_8SlHj1NkA",
"baseURL": "https://api.modelarts-maas.com/v1",
"model": "bge-m3",
"normalized": true
},
"autoCapture": true,
"autoRecall": true,
"smartExtraction": true,
"extractMinMessages": 2,
"extractMaxChars": 8000,
"sessionMemory": {
"enabled": false
}
}
},

`

Later, I had to comment the code:

`export function getVectorDimensions(model: string, overrideDims?: number): number {
if (overrideDims && overrideDims > 0) {
return overrideDims;
}

const dims = EMBEDDING_DIMENSIONS[model];
// if (!dims) {
// throw new Error(
// Unsupported embedding model: ${model}. Either add it to EMBEDDING_DIMENSIONS or set embedding.dimensions in config.
// );
// }

return dims;
}`

and change the following code also:
`const EMBEDDING_DIMENSIONS: Record<string, number> = {
"text-embedding-3-small": 1536,
"text-embedding-3-large": 3072,
"text-embedding-004": 768,
"gemini-embedding-001": 3072,
"nomic-embed-text": 768,
"mxbai-embed-large": 1024,
"bge-m3": 1024, // changed this row.
"all-MiniLM-L6-v2": 384,
"all-mpnet-base-v2": 512,

// Jina v5
"jina-embeddings-v5-text-small": 1024,
"jina-embeddings-v5-text-nano": 768,
};`

I think these two changes would lead not to pass the dimentions param to 'bge-m3', it worked.

Once all lancedb initially done. I found that I don't have to set the 'dimentions' param. it can start the gateway also.

I finally think that bge-m3 can not accept the 'dimentions' param.

Please follow this issues.

thanks.

Expected Behavior

system should support that there is no 'dimentions' param for some models.

Steps to Reproduce

  1. install a memory-lancedb-pro firstly and newly.
  2. use bge-m3 model of Huawei
  3. start openclaw gateway.

Error Logs / Screenshots

20:52:26 [plugins] memory-lancedb-pro failed during register from C:\Users\Administrator\.openclaw\extensions\memory-lancedb-pro\index.ts: Error: Unsupported embedding model: bge-m3. Either add it to EMBEDDING_DIMENSIONS or set embedding.dimensions in config.


21:17:56 [gateway] memory-lancedb-pro: initialized successfully (embedding: FAIL, retrieval: FAIL, mode: hybrid, FTS: disabled)
21:17:56 [gateway] memory-lancedb-pro: embedding test failed: Failed to generate embedding from api.modelarts-maas.com: 400 ModelArts.81001: 400 Model "bge-m3" does not support matryoshka representation, changing output dimensions will lead to poor results.
21:17:56 [gateway] memory-lancedb-pro: retrieval test failed: Failed to generate embedding from api.modelarts-maas.com: 400 ModelArts.81001: 400 Model "bge-m3" does not support matryoshka representation, changing output dimensions will lead to poor results.

Embedding Provider

Other

OS / Platform

Windows 11 pro

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions