ragflow/rag
Philipp Heyken Soares 1c06ec39ca
fix cohere rerank base_url default (#11353)
### What problem does this PR solve?

**Cohere rerank base_url default handling**

- Background: When no rerank base URL is configured, the settings
pipeline was passing an empty string through RERANK_CFG →
TenantLLMService → CoHereRerank, so the Cohere client received
base_url="" and produced “missing protocol” errors during rerank calls.

- What changed: The CoHereRerank constructor now only forwards base_url
to the Cohere client when it isn’t empty/whitespace, causing the client
to fall back to its default API endpoint otherwise.

- Why it matters: This prevents invalid URL construction in the rerank
workflow and keeps tests/sanity checks that rely on the default Cohere
endpoint from failing when no custom base URL is specified.

### Type of change

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

Co-authored-by: Philipp Heyken Soares <philipp.heyken-soares@am.ai>
2025-11-20 09:46:39 +08:00
..
app Fix: manual parser with mineru (#11336) 2025-11-18 15:22:52 +08:00
flow Fix: missing file formats in hierarchical_manager (#11129) 2025-11-10 13:27:22 +08:00
llm fix cohere rerank base_url default (#11353) 2025-11-20 09:46:39 +08:00
nlp Fix: concat images in word document. (#11310) 2025-11-17 19:38:26 +08:00
prompts Feat: Alter flask to Quart for async API serving. (#11275) 2025-11-18 17:05:16 +08:00
res Fix: prio synonym match than wordnet for english (#10762) 2025-10-27 09:32:55 +08:00
svr Feat: add Jira connector (#11285) 2025-11-17 09:38:04 +08:00
utils Refactor: move mcp connection utilities to common (#11304) 2025-11-17 15:34:17 +08:00
__init__.py Update comments (#4569) 2025-01-21 20:52:28 +08:00
benchmark.py Move api.settings to common.settings (#11036) 2025-11-06 09:36:38 +08:00
raptor.py Feat: add fault-tolerant mechanism to RAPTOR (#11206) 2025-11-13 18:48:07 +08:00
settings.py Move api.settings to common.settings (#11036) 2025-11-06 09:36:38 +08:00