Files
ragflow/rag
alex-makang 8562623bef fix(rerank): set NvidiaRerank base_url for all models (#17988)
### What problem does this PR solve?

`NvidiaRerank.__init__` only assigned `self.base_url` inside two
model-specific
`if` branches:

```python
if self.model_name == "nvidia/nv-rerankqa-mistral-4b-v3":
    self.base_url = urljoin(base_url, "nv-rerankqa-mistral-4b-v3/reranking")
if self.model_name == "nvidia/rerank-qa-mistral-4b":
    self.base_url = urljoin(base_url, "reranking")
```

Any other NVIDIA rerank model therefore left the attribute unset, and
the first
`_compute_rank()` call died with `AttributeError: 'NvidiaRerank' object
has no
attribute 'base_url'`.

This is reachable in normal use: `conf/llm_factories.json` ships no
NVIDIA
rerank entries at all, so every NVIDIA rerank model has to be added by
hand,
and any name other than those two hardcoded strings crashes.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Co-authored-by: Alex Ma <alex_makang@hotmail.com>
2026-08-07 16:49:24 +08:00
..
2025-12-31 17:18:30 +08:00