From 1ddc3777b61094dd2e4937f671f40df8ecc6066d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3n=20Levy?= Date: Tue, 19 Aug 2025 10:22:23 +0000 Subject: [PATCH] fix: COHERE_API_URL --- .env.example | 4 ++-- packages/data-provider/src/config.ts | 4 ++-- packages/data-schemas/src/app/web.ts | 6 +++--- packages/data-schemas/src/types/web.ts | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.env.example b/.env.example index a36872d8e5..ac0e851bcb 100644 --- a/.env.example +++ b/.env.example @@ -814,8 +814,8 @@ OPENWEATHER_API_KEY= # JINA_API_KEY=your_jina_api_key # or # COHERE_API_KEY=your_cohere_api_key -# Optional: Custom Cohere API base URL (defaults to https://api.cohere.ai/v1) -# COHERE_BASE_URL=http://litellm:8000/v1 +# Optional: Custom Cohere API URL (defaults to https://api.cohere.ai/v1) +# COHERE_API_URL=http://litellm:8000/v1 #======================# # MCP Configuration # diff --git a/packages/data-provider/src/config.ts b/packages/data-provider/src/config.ts index 7cfd96dffb..435fda101b 100644 --- a/packages/data-provider/src/config.ts +++ b/packages/data-provider/src/config.ts @@ -1824,10 +1824,10 @@ export enum ForkOptions { export const CohereConstants = { /** * Cohere API Endpoint, for special handling - * Uses COHERE_BASE_URL environment variable if set, otherwise defaults to official API + * Uses COHERE_API_URL environment variable if set, otherwise defaults to official API */ get API_URL(): string { - return process.env.COHERE_BASE_URL || 'https://api.cohere.ai/v1'; + return process.env.COHERE_API_URL || 'https://api.cohere.ai/v1'; }, /** * Role for "USER" messages diff --git a/packages/data-schemas/src/app/web.ts b/packages/data-schemas/src/app/web.ts index 9dda3c6959..c11cc5e71e 100644 --- a/packages/data-schemas/src/app/web.ts +++ b/packages/data-schemas/src/app/web.ts @@ -33,7 +33,7 @@ export const webSearchAuth = { cohere: { cohereApiKey: 1 as const, /** Optional (0) */ - cohereBaseUrl: 0 as const, + cohereApiUrl: 0 as const, }, }, }; @@ -76,7 +76,7 @@ export function loadWebSearchConfig( const jinaApiKey = config?.jinaApiKey ?? '${JINA_API_KEY}'; const jinaApiUrl = config?.jinaApiUrl ?? '${JINA_API_URL}'; const cohereApiKey = config?.cohereApiKey ?? '${COHERE_API_KEY}'; - const cohereBaseUrl = config?.cohereBaseUrl ?? '${COHERE_BASE_URL}'; + const cohereApiUrl = config?.cohereApiUrl ?? '${COHERE_API_URL}'; const safeSearch = config?.safeSearch ?? SafeSearchTypes.MODERATE; return { @@ -85,7 +85,7 @@ export function loadWebSearchConfig( jinaApiKey, jinaApiUrl, cohereApiKey, - cohereBaseUrl, + cohereApiUrl, serperApiKey, searxngApiKey, firecrawlApiKey, diff --git a/packages/data-schemas/src/types/web.ts b/packages/data-schemas/src/types/web.ts index a1c2b8e96e..7896a00dc8 100644 --- a/packages/data-schemas/src/types/web.ts +++ b/packages/data-schemas/src/types/web.ts @@ -10,7 +10,7 @@ export type TWebSearchKeys = | 'jinaApiKey' | 'jinaApiUrl' | 'cohereApiKey' - | 'cohereBaseUrl'; + | 'cohereApiUrl'; export type TWebSearchCategories = | SearchCategories.PROVIDERS