mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### 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>