fix(reranker): align llm_reranker default model with SDK default (#6703)

This commit is contained in:
Kartik
2026-08-01 01:04:08 +05:30
committed by GitHub
parent 54328ffd97
commit cf3355e2ca
11 changed files with 26 additions and 26 deletions
@@ -97,7 +97,7 @@ const results = await memory.search("What movies do I like?", {
### LLM reranker
To score with an LLM instead of a dedicated reranker, use the `llm_reranker` provider. It builds its own LLM from the reranker's config (defaulting to `openai` / `gpt-4o-mini`) rather than reusing the Memory's main `llm`:
To score with an LLM instead of a dedicated reranker, use the `llm_reranker` provider. It builds its own LLM from the reranker's config (defaulting to `openai` / `gpt-5-mini`) rather than reusing the Memory's main `llm`:
```typescript
const memory = new Memory({
@@ -137,7 +137,7 @@ const memory = new Memory({
| `zero_entropy` | `zerank-1` | `apiKey`, `model`, `topK` |
| `sentence_transformer` | `Xenova/ms-marco-MiniLM-L-6-v2` | `model`, `device`, `maxLength`, `normalize`, `topK` |
| `huggingface` | `Xenova/bge-reranker-base` | `model`, `device`, `maxLength`, `normalize`, `topK` |
| `llm_reranker` | `openai` / `gpt-4o-mini` | `provider`, `model`, `apiKey`, `llm` (nested override), `topK` |
| `llm_reranker` | `openai` / `gpt-5-mini` | `provider`, `model`, `apiKey`, `llm` (nested override), `topK` |
<Note>
`rerank` is opt-in per search and a no-op when no `reranker` is configured. If the reranker call fails, Mem0 logs a warning and returns the original vector-ranked results.