feat: add COHERE_BASE_URL configuration support for custom Cohere rerank endpoints

- Add cohereBaseUrl to webSearchSchema configuration
- Update loadWebSearchConfig to load cohereBaseUrl from environment
- Add cohereBaseUrl to TWebSearchKeys type definition
- Configure cohereBaseUrl as optional parameter for cohere reranker
- Add COHERE_BASE_URL documentation to .env.example

This enables configuration of custom Cohere endpoints (such as LiteLLM proxy)
for web search reranking. The configuration infrastructure is ready for when
the @librechat/agents package supports custom base URLs.

Usage:
COHERE_BASE_URL=http://litellm:8000/v1
COHERE_API_KEY=your_api_key
This commit is contained in:
Jón Levy 2025-08-17 12:51:47 +00:00 committed by Jón Levy
parent 2a50c372ef
commit 00a99aca0a
No known key found for this signature in database
GPG key ID: 397E4D775F694BF3
4 changed files with 11 additions and 2 deletions

View file

@ -836,6 +836,7 @@ export const webSearchSchema = z.object({
jinaApiKey: z.string().optional().default('${JINA_API_KEY}'),
jinaApiUrl: z.string().optional().default('${JINA_API_URL}'),
cohereApiKey: z.string().optional().default('${COHERE_API_KEY}'),
cohereBaseUrl: z.string().optional().default('${COHERE_BASE_URL}'),
searchProvider: z.nativeEnum(SearchProviders).optional(),
scraperProvider: z.nativeEnum(ScraperProviders).optional(),
rerankerType: z.nativeEnum(RerankerTypes).optional(),