fix: COHERE_API_URL

This commit is contained in:
Jón Levy 2025-08-19 10:22:23 +00:00 committed by Jón Levy
parent d0c0602edb
commit 1ddc3777b6
No known key found for this signature in database
GPG key ID: 397E4D775F694BF3
4 changed files with 8 additions and 8 deletions

View file

@ -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 #

View file

@ -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

View file

@ -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,

View file

@ -10,7 +10,7 @@ export type TWebSearchKeys =
| 'jinaApiKey'
| 'jinaApiUrl'
| 'cohereApiKey'
| 'cohereBaseUrl';
| 'cohereApiUrl';
export type TWebSearchCategories =
| SearchCategories.PROVIDERS