diff --git a/core/llm/autodetect.ts b/core/llm/autodetect.ts index e6acea28e..417498de9 100644 --- a/core/llm/autodetect.ts +++ b/core/llm/autodetect.ts @@ -52,6 +52,7 @@ const PROVIDER_HANDLES_TEMPLATING: string[] = [ "msty", "anthropic", "bedrock", + "cohere", "sagemaker", "continue-proxy", "mistral", @@ -140,6 +141,7 @@ function modelSupportsImages( const PARALLEL_PROVIDERS: string[] = [ "anthropic", "bedrock", + "cohere", "sagemaker", "deepinfra", "gemini", @@ -176,6 +178,7 @@ function autodetectTemplateType(model: string): TemplateType | undefined { if ( lower.includes("gpt") || lower.includes("command") || + lower.includes("aya") || lower.includes("chat-bison") || lower.includes("pplx") || lower.includes("gemini") || diff --git a/core/llm/toolSupport.test.ts b/core/llm/toolSupport.test.ts index d3100a61b..8556fa8fa 100644 --- a/core/llm/toolSupport.test.ts +++ b/core/llm/toolSupport.test.ts @@ -221,6 +221,7 @@ describe("PROVIDER_TOOL_SUPPORT", () => { expect(supportsFn("qwen2")).toBe(true); expect(supportsFn("mixtral-8x7b")).toBe(true); expect(supportsFn("command-r")).toBe(true); + expect(supportsFn("command-a")).toBe(true); expect(supportsFn("smollm2")).toBe(true); expect(supportsFn("hermes3")).toBe(true); expect(supportsFn("athene-v2")).toBe(true); diff --git a/core/llm/toolSupport.ts b/core/llm/toolSupport.ts index e6d4387ce..cae3910e7 100644 --- a/core/llm/toolSupport.ts +++ b/core/llm/toolSupport.ts @@ -144,6 +144,7 @@ export const PROVIDER_TOOL_SUPPORT: Record boolean> = "qwen3", "mixtral", "command-r", + "command-a", "smollm2", "hermes3", "athene-v2", @@ -226,6 +227,7 @@ export const PROVIDER_TOOL_SUPPORT: Record boolean> = "qwen/qwen3", "qwen/qwen-", "cohere/command-r", + "cohere/command-a", "ai21/jamba-1.6", "mistralai/mistral", "mistralai/ministral", diff --git a/docs/docs/customize/model-providers/more/cohere.mdx b/docs/docs/customize/model-providers/more/cohere.mdx index 352908e12..b68814ffd 100644 --- a/docs/docs/customize/model-providers/more/cohere.mdx +++ b/docs/docs/customize/model-providers/more/cohere.mdx @@ -7,15 +7,15 @@ Before using Cohere, visit the [Cohere dashboard](https://dashboard.cohere.com/a ## Chat model -We recommend configuring **Command-R Plus** as your chat model. +We recommend configuring **Command A** as your chat model. ```yaml title="config.yaml" models: - - name: Cohere + - name: Command A 03-2025 provider: cohere - model: command-r-plus + model: command-a-03-2025 apiKey: ``` @@ -24,9 +24,9 @@ We recommend configuring **Command-R Plus** as your chat model. { "models": [ { - "title": "Cohere", + "title": "Command A 03-2025", "provider": "cohere", - "model": "command-r-plus", + "model": "command-a-03-2025", "apiKey": "" } ] @@ -43,15 +43,15 @@ Cohere currently does not offer any autocomplete models. ## Embeddings model -We recommend configuring **embed-english-v3.0** as your embeddings model. +We recommend configuring **embed-v4.0** as your embeddings model. ```yaml title="config.yaml" models: - - name: Cohere Embed + - name: Cohere Embed v4.0 provider: cohere - model: embed-english-v3.0 + model: embed-v4.0 apiKey: roles: - embed @@ -62,7 +62,7 @@ We recommend configuring **embed-english-v3.0** as your embeddings model. { "embeddingsProvider": { "provider": "cohere", - "model": "embed-english-v3.0", + "model": "embed-v4.0", "apiKey": "" } } @@ -72,15 +72,15 @@ We recommend configuring **embed-english-v3.0** as your embeddings model. ## Reranking model -We recommend configuring **rerank-english-v3.0** as your reranking model. +We recommend configuring **rerank-v3.5** as your reranking model. ```yaml title="config.yaml" models: - - name: Cohere Reranker + - name: Cohere Rerank v3.5 provider: cohere - model: rerank-english-v3.0 + model: rerank-v3.5 apiKey: roles: - rerank @@ -92,7 +92,7 @@ We recommend configuring **rerank-english-v3.0** as your reranking model. "reranker": { "name": "cohere", "params": { - "model": "rerank-english-v3.0", + "model": "rerank-v3.5", "apiKey": "" } } diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/model-providers/more/cohere.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/model-providers/more/cohere.md index e69029b00..b33ebc3ba 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/model-providers/more/cohere.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/model-providers/more/cohere.md @@ -4,15 +4,15 @@ ## 聊天模型 -我们推荐配置 **Command-R Plus** 作为你的聊天模型。 +我们推荐配置 **Command-A** 作为你的聊天模型。 ```json title="config.json" { "models": [ { - "title": "Cohere", + "title": "Command A 03-2025", "provider": "cohere", - "model": "command-r-plus", + "model": "command-a-03-2025", "apiKey": "YOUR_API_KEY" } ] @@ -27,13 +27,13 @@ Cohere 当前没有提供任何自动补全模型。 ## 嵌入模型 -我们推荐配置 **embed-english-v3.0** 作为你的嵌入模型。 +我们推荐配置 **embed-v4.0** 作为你的嵌入模型。 ```json title="config.json" { "embeddingsProvider": { "provider": "cohere", - "model": "embed-english-v3.0", + "model": "embed-v4.0", "apiKey": "" } } @@ -41,14 +41,14 @@ Cohere 当前没有提供任何自动补全模型。 ## 重排序模型 -我们推荐配置 **rerank-english-v3.0** 作为你的重排序模型。 +我们推荐配置 **rerank-v3.5** 作为你的重排序模型。 ```json title="config.json" { "embeddingsProvider": { "provider": "cohere", "params": { - "model": "rerank-english-v3.0", + "model": "rerank-v3.5", "apiKey": "" } } diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 576c184e9..76686f24e 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -868,7 +868,21 @@ "then": { "properties": { "model": { - "enum": ["command-r", "command-r-plus"] + "enum": [ + "c4ai-aya-expanse-8b", + "c4ai-aya-expanse-32b", + "c4ai-aya-vision-8b", + "c4ai-aya-vision-32b", + "command-r", + "command-r-plus", + "command-r-03-2024", + "command-r-plus-04-2024", + "command-r-08-2024", + "command-r-plus-08-2024", + "command-r7b-12-2024", + "command-r7b-arabic-02-2025", + "command-a-03-2025" + ] } } } diff --git a/gui/src/pages/AddNewModel/configs/models.ts b/gui/src/pages/AddNewModel/configs/models.ts index 87c2c7bcc..f68ac0555 100644 --- a/gui/src/pages/AddNewModel/configs/models.ts +++ b/gui/src/pages/AddNewModel/configs/models.ts @@ -913,12 +913,68 @@ export const models: { [key: string]: ModelPackage } = { providerOptions: ["gemini"], isOpenSource: false, }, - commandR: { - title: "Command R", + c4aiAyaExpanse8B: { + title: "C4AI Aya Expanse 8B", + description: + "Aya Expanse is a massively multilingual large language model excelling in enterprise-scale tasks.", + params: { + model: "c4ai-aya-expanse-8b", + contextLength: 8_000, + title: "C4AI Aya Expanse 8B", + apiKey: "", + }, + providerOptions: ["cohere"], + icon: "cohere.png", + isOpenSource: false, + }, + c4aiAyaExpanse32B: { + title: "C4AI Aya Expanse 32B", + description: + "Aya Expanse is a massively multilingual large language model excelling in enterprise-scale tasks.", + params: { + model: "c4ai-aya-expanse-32b", + contextLength: 128_000, + title: "C4AI Aya Expanse 32B", + apiKey: "", + }, + providerOptions: ["cohere"], + icon: "cohere.png", + isOpenSource: false, + }, + c4aiAyaVision8B: { + title: "C4AI Aya Vision 8B", + description: + "Aya Vision is a state-of-the-art multimodal and massively multilingual large language model excelling at critical benchmarks for language, text, and image capabilities.", + params: { + model: "c4ai-aya-vision-8b", + contextLength: 16_000, + title: "C4AI Aya Vision 8B", + apiKey: "", + }, + providerOptions: ["cohere"], + icon: "cohere.png", + isOpenSource: false, + }, + c4aiAyaVision32B: { + title: "C4AI Aya Vision 32B", + description: + "Aya Vision is a state-of-the-art multimodal and massively multilingual large language model excelling at critical benchmarks for language, text, and image capabilities.", + params: { + model: "c4ai-aya-vision-32b", + contextLength: 16_000, + title: "C4AI Aya Vision 32B", + apiKey: "", + }, + providerOptions: ["cohere"], + icon: "cohere.png", + isOpenSource: false, + }, + commandR032024: { + title: "Command R 03-2024", description: "Command R is a scalable generative model targeting RAG and Tool Use to enable production-scale AI for enterprise.", params: { - model: "command-r", + model: "command-r-03-2024", contextLength: 128_000, title: "Command R", apiKey: "", @@ -927,12 +983,12 @@ export const models: { [key: string]: ModelPackage } = { icon: "cohere.png", isOpenSource: false, }, - commandRPlus: { - title: "Command R+", + commandRPlus042024: { + title: "Command R+ 04-2024", description: - "Command R+ is a state-of-the-art RAG-optimized model designed to tackle enterprise-grade workloads", + "Command R+ is a state-of-the-art RAG-optimized model designed to tackle enterprise-grade workloads.", params: { - model: "command-r-plus", + model: "command-r-plus-04-2024", contextLength: 128_000, title: "Command R+", apiKey: "", @@ -941,6 +997,76 @@ export const models: { [key: string]: ModelPackage } = { icon: "cohere.png", isOpenSource: false, }, + commandR082024: { + title: "Command R 08-2024", + description: + "Command R is a scalable generative model targeting RAG and Tool Use to enable production-scale AI for enterprise.", + params: { + model: "command-r-08-2024", + contextLength: 128_000, + title: "Command R 08-2024", + apiKey: "", + }, + providerOptions: ["cohere"], + icon: "cohere.png", + isOpenSource: false, + }, + commandRPlus082024: { + title: "Command R+ 08-2024", + description: + "Command R+ is a state-of-the-art RAG-optimized model designed to tackle enterprise-grade workloads.", + params: { + model: "command-r-plus-08-2024", + contextLength: 128_000, + title: "Command R+ 08-2024", + apiKey: "", + }, + providerOptions: ["cohere"], + icon: "cohere.png", + isOpenSource: false, + }, + commandR7B122024: { + title: "Command R7B 12-2024", + description: + "The smallest model in our R series delivers top-tier speed, efficiency, and quality to build powerful AI applications on commodity GPUs and edge devices.", + params: { + model: "command-r7b-12-2024", + contextLength: 128_000, + title: "Command R7B 12-2024", + apiKey: "", + }, + providerOptions: ["cohere"], + icon: "cohere.png", + isOpenSource: false, + }, + commandR7BArabic022025: { + title: "Command R7B Arabic 02-2025", + description: + "Our state-of-the-art lightweight multilingual AI model has been optimized for advanced Arabic language capabilities to support enterprises in the MENA region.", + params: { + model: "command-r7b-arabic-02-2025", + contextLength: 128_000, + title: "Command R7B Arabic 02-2025", + apiKey: "", + }, + providerOptions: ["cohere"], + icon: "cohere.png", + isOpenSource: false, + }, + commandA032025: { + title: "Command A 03-2025", + description: + "Command A is Cohere’s most performant model to date, excelling at real world enterprise tasks including tool use, retrieval augmented generation (RAG), agents, and multilingual use cases.", + params: { + model: "command-a-03-2025", + contextLength: 256_000, + title: "Command A 03-2025", + apiKey: "", + }, + providerOptions: ["cohere"], + icon: "cohere.png", + isOpenSource: false, + }, gpt4turbo: { title: "GPT-4 Turbo", description: diff --git a/gui/src/pages/AddNewModel/configs/providers.ts b/gui/src/pages/AddNewModel/configs/providers.ts index a9b6f5573..d210da9d6 100644 --- a/gui/src/pages/AddNewModel/configs/providers.ts +++ b/gui/src/pages/AddNewModel/configs/providers.ts @@ -349,7 +349,19 @@ Select the \`GPT-4o\` model below to complete your provider configuration, but n }, ...completionParamsInputsConfigs, ], - packages: [models.commandR, models.commandRPlus], + packages: [ + models.commandA032025, + models.commandR7BArabic022025, + models.commandR7B122024, + models.commandRPlus082024, + models.commandR082024, + models.commandRPlus042024, + models.commandR032024, + models.c4aiAyaVision32B, + models.c4aiAyaVision8B, + models.c4aiAyaExpanse32B, + models.c4aiAyaExpanse8B, + ], apiKeyUrl: "https://docs.cohere.com/v2/docs/rate-limits", }, groq: { diff --git a/packages/llm-info/src/providers/cohere.ts b/packages/llm-info/src/providers/cohere.ts index edbaed4a7..91f8d0154 100644 --- a/packages/llm-info/src/providers/cohere.ts +++ b/packages/llm-info/src/providers/cohere.ts @@ -3,29 +3,167 @@ import { ModelProvider } from "../types.js"; export const Cohere: ModelProvider = { models: [ { - model: "command-r-plus", - displayName: "Command R+", - contextLength: 128000, - maxCompletionTokens: 4000, - // recommendedFor: ["chat"], + model: "command-a-03-2025", + displayName: "Command A 03-2025", + contextLength: 256000, + maxCompletionTokens: 8192, + description: + "Command A is Cohere’s most performant model to date, excelling at real world enterprise tasks including tool use, retrieval augmented generation (RAG), agents, and multilingual use cases.", + recommendedFor: ["chat"], }, { - model: "command-r", - displayName: "Command R", + model: "command-r7b-arabic-12-2024", + displayName: "Command R7B Arabic 02-2025", + contextLength: 128000, + maxCompletionTokens: 4096, + description: + "Our state-of-the-art lightweight multilingual AI model has been optimized for advanced Arabic language capabilities to support enterprises in the MENA region.", + recommendedFor: ["chat"], + }, + { + model: "command-r7b-12-2024", + displayName: "Command R7B 12-2024", + contextLength: 128000, + maxCompletionTokens: 4096, + description: + "The smallest model in our R series delivers top-tier speed, efficiency, and quality to build powerful AI applications on commodity GPUs and edge devices.", + recommendedFor: ["chat"], + }, + { + model: "command-r-plus-08-2024", + displayName: "Command R+ 08-2024", + contextLength: 128000, + maxCompletionTokens: 4096, + description: + "Command R is a scalable generative model targeting RAG and Tool Use to enable production-scale AI for enterprise.", + recommendedFor: ["chat"], + }, + { + model: "command-r-08-2024", + displayName: "Command R 08-2024", + contextLength: 128000, + maxCompletionTokens: 4096, + description: + "Command R+ is a state-of-the-art RAG-optimized model designed to tackle enterprise-grade workloads.", + recommendedFor: ["chat"], + }, + { + model: "command-r-plus-04-2024", + displayName: "Command R+ 04-2024", + contextLength: 128000, + maxCompletionTokens: 4096, + description: + "Command R is a scalable generative model targeting RAG and Tool Use to enable production-scale AI for enterprise.", + recommendedFor: ["chat"], + }, + { + model: "command-r-03-2024", + displayName: "Command R 03-2024", + contextLength: 128000, + maxCompletionTokens: 4096, + description: + "Command R+ is a state-of-the-art RAG-optimized model designed to tackle enterprise-grade workloads.", + recommendedFor: ["chat"], + }, + { + model: "c4ai-aya-vision-32b", + displayName: "C4AI Aya Vision 32B", + contextLength: 16000, + maxCompletionTokens: 4096, + description: + "Aya Vision is a state-of-the-art multimodal and massively multilingual large language model excelling at critical benchmarks for language, text, and image capabilities.", + recommendedFor: ["chat"], + }, + { + model: "c4ai-aya-vision-8b", + displayName: "C4AI Aya Vision 8B", + contextLength: 16000, + maxCompletionTokens: 4096, + description: + "Aya Vision is a state-of-the-art multimodal and massively multilingual large language model excelling at critical benchmarks for language, text, and image capabilities.", + recommendedFor: ["chat"], + }, + { + model: "c4ai-aya-expanse-32b", + displayName: "C4AI Aya Expanse 32B", + contextLength: 128000, + maxCompletionTokens: 4096, + description: + "Aya Expanse is a massively multilingual large language model excelling in enterprise-scale tasks.", + recommendedFor: ["chat"], + }, + { + model: "c4ai-aya-expanse-8b", + displayName: "C4AI Aya Expanse 8B", + contextLength: 8000, + maxCompletionTokens: 4096, + description: + "Aya Expanse is a massively multilingual large language model excelling in enterprise-scale tasks.", + recommendedFor: ["chat"], + }, + { + model: "embed-v4.0", + displayName: "Embed v4.0", + description: + "A model that allows for text and images to be classified or turned into embeddings.", + recommendedFor: ["embed"], contextLength: 128000, - maxCompletionTokens: 4000, }, { model: "embed-english-v3.0", - displayName: "Embed English 3.0", - // recommendedFor: ["embed"], + displayName: "Embed English v3.0", + description: + "A model that allows for text to be classified or turned into embeddings. English only.", + recommendedFor: ["embed"], contextLength: 512, }, + { + model: "embed-english-light-v3.0", + displayName: "Embed English Light v3.0", + description: + "A smaller, faster version of embed-english-v3.0. Almost as capable, but a lot faster. English only.", + recommendedFor: ["embed"], + contextLength: 512, + }, + { + model: "embed-multilingual-v3.0", + displayName: "Embed Multilingual v3.0", + description: + "Provides multilingual classification and embedding support.", + recommendedFor: ["embed"], + contextLength: 512, + }, + { + model: "embed-multilingual-light-v3.0", + displayName: "Embed Multilingual Light v3.0", + description: + "A smaller, faster version of embed-multilingual-v3.0. Almost as capable, but a lot faster.", + recommendedFor: ["embed"], + contextLength: 512, + }, + { + model: "rerank-v3.5", + displayName: "Rerank v3.5", + description: + "A model for documents and semi-structured data (JSON). State-of-the-art performance in English and non-English languages.", + recommendedFor: ["rerank"], + contextLength: 4096, + }, { model: "rerank-english-v3.0", - displayName: "Rerank English 3.0", - // recommendedFor: ["rerank"], - contextLength: 4000, + displayName: "Rerank English v3.0", + description: + "A model that allows for re-ranking English Language documents and semi-structured data (JSON).", + recommendedFor: ["rerank"], + contextLength: 4096, + }, + { + model: "rerank-multilingual-v3.0", + displayName: "Rerank Multilingual v3.0", + description: + "A model for documents and semi-structure data (JSON) that are not in English.", + recommendedFor: ["rerank"], + contextLength: 4096, }, ], id: "cohere", diff --git a/packages/openai-adapters/src/test/main.test.ts b/packages/openai-adapters/src/test/main.test.ts index c1e1ff29a..1d68a7782 100644 --- a/packages/openai-adapters/src/test/main.test.ts +++ b/packages/openai-adapters/src/test/main.test.ts @@ -85,7 +85,7 @@ const TESTS: Omit[] = [ }, // { // provider: "cohere", - // model: "embed-english-v3.0", + // model: "embed-v4.0", // apiKey: process.env.COHERE_API_KEY!, // roles: ["embed"], // }, @@ -103,7 +103,7 @@ const TESTS: Omit[] = [ }, // { // provider: "cohere", - // model: "rerank-english-v3.0", + // model: "rerank-v3.5", // apiKey: process.env.COHERE_API_KEY!, // roles: ["rerank"], // },