#31167 [Bug]: Cohere rerank v2 duplicates endpoint path for versioned api_base
### Check for existing issues
- [x] I have searched the existing issues and checked that my issue is not a duplicate.
### What happened?
When using Cohere rerank v2 with a custom `api_base` that already ends in `/v2`, LiteLLM appends `/v2/rerank` again and builds an invalid duplicated endpoint path.
For example, `api_base="https://api.cohere.ai/v2"` currently resolves to:
```text https://api.cohere.ai/v2/v2/rerank ```
Expected behavior: versioned Cohere v2 API roots should resolve to the v2 rerank endpoint without duplicating the version path:
```text https://api.cohere.ai/v2/rerank ```
I would like to work on this issue. A draft fix is open in #31162.
### Steps to Reproduce
1. Use Cohere rerank v2 with a custom `api_base` ending in `/v2`. 2. Build the complete URL through `CohereRerankV2Config.get_complete_url`. 3. Observe that `/v2/rerank` is appended to a base that already includes `/v2`.
Example:
```python from litellm.llms.cohere.rerank_v2.transformation import CohereRerankV2Config
config = CohereRerankV2Config() url = config.get_complete_url( api_base="https://api.cohere.ai/v2", model="rerank-v3.5", )
print(url) # Current behavior: https://api.cohere.ai/…