From d469933fd53e3440bb7a412667bdd828b42fca00 Mon Sep 17 00:00:00 2001 From: Fmstrat Date: Tue, 25 Feb 2025 16:19:58 +0000 Subject: [PATCH 01/30] add support for Ollama num_gpu --- core/config/types.ts | 1 + core/control-plane/schema.ts | 1 + core/index.d.ts | 1 + core/llm/llms/Ollama.ts | 3 ++- docs/docs/json-reference.md | 1 + docs/docs/reference.md | 1 + .../docusaurus-plugin-content-docs/current/reference.md | 1 + extensions/vscode/config_schema.json | 5 +++++ packages/config-types/src/index.ts | 1 + 9 files changed, 14 insertions(+), 1 deletion(-) diff --git a/core/config/types.ts b/core/config/types.ts index 2a68c4c35..8ca427e58 100644 --- a/core/config/types.ts +++ b/core/config/types.ts @@ -843,6 +843,7 @@ declare global { numThreads?: number; useMmap?: boolean; keepAlive?: number; + numGpu?: number; raw?: boolean; stream?: boolean; prediction?: Prediction; diff --git a/core/control-plane/schema.ts b/core/control-plane/schema.ts index 9fcdd2219..32de122b9 100644 --- a/core/control-plane/schema.ts +++ b/core/control-plane/schema.ts @@ -58,6 +58,7 @@ const modelDescriptionSchema = z.object({ numThreads: z.number().optional(), useMmap: z.boolean().optional(), keepAlive: z.number().optional(), + numGpu: z.number().optional(), raw: z.boolean().optional(), stream: z.boolean().optional(), }) diff --git a/core/index.d.ts b/core/index.d.ts index 7d882cb27..86310d97d 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -903,6 +903,7 @@ export interface BaseCompletionOptions { numThreads?: number; useMmap?: boolean; keepAlive?: number; + numGpu?: number; raw?: boolean; stream?: boolean; prediction?: Prediction; diff --git a/core/llm/llms/Ollama.ts b/core/llm/llms/Ollama.ts index b9734acb9..fe1902b89 100644 --- a/core/llm/llms/Ollama.ts +++ b/core/llm/llms/Ollama.ts @@ -33,12 +33,12 @@ interface OllamaModelFileParams { top_k?: number; top_p?: number; min_p?: number; + num_gpu?: number; // deprecated or not directly supported here: num_thread?: number; use_mmap?: boolean; num_gqa?: number; - num_gpu?: number; num_keep?: number; typical_p?: number; presence_penalty?: number; @@ -264,6 +264,7 @@ class Ollama extends BaseLLM { num_thread: options.numThreads, use_mmap: options.useMmap, min_p: options.minP, + num_gpu: options.numGpu, }; } diff --git a/docs/docs/json-reference.md b/docs/docs/json-reference.md index 470d59921..ac5573b76 100644 --- a/docs/docs/json-reference.md +++ b/docs/docs/json-reference.md @@ -155,6 +155,7 @@ Parameters that control the behavior of text generation and completion settings. - `maxTokens`: The maximum number of tokens to generate in a completion (default: `2048`). - `numThreads`: The number of threads used during the generation process. Available only for Ollama as `num_thread`. - `keepAlive`: For Ollama, this parameter sets the number of seconds to keep the model loaded after the last request, unloading it from memory if inactive (default: `1800` seconds, or 30 minutes). +- `numGpu`: For Ollama, this parameter overrides the number of gpu layers that will be used to load the model into VRAM. - `useMmap`: For Ollama, this parameter allows the model to be mapped into memory. If disabled can enhance response time on low end devices but will slow down the stream. Example diff --git a/docs/docs/reference.md b/docs/docs/reference.md index 03707c4e4..7891ebc4a 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -157,6 +157,7 @@ Parameters that control the behavior of text generation and completion settings. - `maxTokens`: The maximum number of tokens to generate in a completion (default: `2048`). - `numThreads`: The number of threads used during the generation process. Available only for Ollama as `num_thread`. - `keepAlive`: For Ollama, this parameter sets the number of seconds to keep the model loaded after the last request, unloading it from memory if inactive (default: `1800` seconds, or 30 minutes). +- `numGpu`: For Ollama, this parameter overrides the number of gpu layers that will be used to load the model into VRAM. - `useMmap`: For Ollama, this parameter allows the model to be mapped into memory. If disabled can enhance response time on low end devices but will slow down the stream. Example diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/reference.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/reference.md index 98addf212..1252bd2fd 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/reference.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/reference.md @@ -155,6 +155,7 @@ Parameters that control the behavior of text generation and completion settings. - `maxTokens`: The maximum number of tokens to generate in a completion (default: `2048`). - `numThreads`: The number of threads used during the generation process. Available only for Ollama as `num_thread`. - `keepAlive`: For Ollama, this parameter sets the number of seconds to keep the model loaded after the last request, unloading it from memory if inactive (default: `1800` seconds, or 30 minutes). +- `numGpu`: For Ollama, this parameter overrides the number of gpu layers that will be used to load the model into VRAM. - `useMmap`: For Ollama, this parameter allows the model to be mapped into memory. If disabled can enhance response time on low end devices but will slow down the stream. Example diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 259d3e7c8..50fabaaaa 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -71,6 +71,11 @@ "title": "Ollama keep_alive", "description": "The number of seconds after no requests are made to unload the model from memory. Defaults to 60*30 = 30min", "type": "integer" + }, + "numGpu": { + "title": "Ollama num_gpu", + "description": "Override the number of gpu layers used when loading the model", + "type": "integer" } } }, diff --git a/packages/config-types/src/index.ts b/packages/config-types/src/index.ts index 8a0806d7b..41cdce373 100644 --- a/packages/config-types/src/index.ts +++ b/packages/config-types/src/index.ts @@ -13,6 +13,7 @@ export const completionOptionsSchema = z.object({ numThreads: z.number().optional(), useMmap: z.boolean().optional(), keepAlive: z.number().optional(), + numGpu: z.number().optional(), raw: z.boolean().optional(), stream: z.boolean().optional(), }); From b4a87a6de3bd84afa814c2f53cb065a3f007be06 Mon Sep 17 00:00:00 2001 From: aadarshkt Date: Sun, 23 Mar 2025 18:19:52 +0530 Subject: [PATCH 02/30] Add syntax highlighting for pascal and clojure languages. --- gui/package-lock.json | 56 ++++++++++--------- gui/package.json | 1 + .../markdown/StyledMarkdownPreview.tsx | 13 +++-- 3 files changed, 39 insertions(+), 31 deletions(-) diff --git a/gui/package-lock.json b/gui/package-lock.json index b0918360d..a953d2452 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -30,6 +30,7 @@ "dompurify": "^3.0.6", "downshift": "^7.6.0", "lodash": "^4.17.21", + "lowlight": "^3.3.0", "minisearch": "^7.0.2", "mustache": "^4.2.0", "posthog-js": "^1.130.1", @@ -7688,18 +7689,28 @@ } }, "node_modules/lowlight": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-1.20.0.tgz", - "integrity": "sha512-8Ktj+prEb1RoCPkEOrPMYUN/nCggB7qAWe3a7OpMjWQkh3l2RD5wKRQ+o8Q8YuI9RG/xs95waaI/E6ym/7NsTw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-3.3.0.tgz", + "integrity": "sha512-0JNhgFoPvP6U6lE/UdVsSq99tn6DhjjpAj5MxG49ewd2mOBVtwWYIT8ClyABhq198aXXODMU6Ox8DrGy/CpTZQ==", + "license": "MIT", "dependencies": { - "fault": "^1.0.0", - "highlight.js": "~10.7.0" + "@types/hast": "^3.0.0", + "devlop": "^1.0.0", + "highlight.js": "~11.11.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/lowlight/node_modules/highlight.js": { + "version": "11.11.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.11.1.tgz", + "integrity": "sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/lru-cache": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", @@ -10087,6 +10098,19 @@ "react": ">= 0.14.0" } }, + "node_modules/react-syntax-highlighter/node_modules/lowlight": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-1.20.0.tgz", + "integrity": "sha512-8Ktj+prEb1RoCPkEOrPMYUN/nCggB7qAWe3a7OpMjWQkh3l2RD5wKRQ+o8Q8YuI9RG/xs95waaI/E6ym/7NsTw==", + "dependencies": { + "fault": "^1.0.0", + "highlight.js": "~10.7.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/react-tooltip": { "version": "5.28.0", "resolved": "https://registry.npmjs.org/react-tooltip/-/react-tooltip-5.28.0.tgz", @@ -10371,28 +10395,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/rehype-highlight/node_modules/highlight.js": { - "version": "11.9.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.9.0.tgz", - "integrity": "sha512-fJ7cW7fQGCYAkgv4CPfwFHrfd/cLS4Hau96JuJ+ZTOWhjnhoeN1ub1tFmALm/+lW5z4WCAuAV9bm05AP0mS6Gw==", - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/rehype-highlight/node_modules/lowlight": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-3.1.0.tgz", - "integrity": "sha512-CEbNVoSikAxwDMDPjXlqlFYiZLkDJHwyGu/MfOsJnF3d7f3tds5J3z8s/l9TMXhzfsJCCJEAsD78842mwmg0PQ==", - "dependencies": { - "@types/hast": "^3.0.0", - "devlop": "^1.0.0", - "highlight.js": "~11.9.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/rehype-katex": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/rehype-katex/-/rehype-katex-7.0.1.tgz", diff --git a/gui/package.json b/gui/package.json index 6724bd757..e606aebe3 100644 --- a/gui/package.json +++ b/gui/package.json @@ -38,6 +38,7 @@ "dompurify": "^3.0.6", "downshift": "^7.6.0", "lodash": "^4.17.21", + "lowlight": "^3.3.0", "minisearch": "^7.0.2", "mustache": "^4.2.0", "posthog-js": "^1.130.1", diff --git a/gui/src/components/markdown/StyledMarkdownPreview.tsx b/gui/src/components/markdown/StyledMarkdownPreview.tsx index d968101d0..c21380454 100644 --- a/gui/src/components/markdown/StyledMarkdownPreview.tsx +++ b/gui/src/components/markdown/StyledMarkdownPreview.tsx @@ -1,4 +1,7 @@ import { ctxItemToRifWithContents } from "core/commands/util"; +import clojure from "highlight.js/lib/languages/clojure"; +import Delphi from "highlight.js/lib/languages/Delphi"; +import { common } from "lowlight"; import { memo, useEffect, useMemo } from "react"; import { useRemark } from "react-remark"; import rehypeHighlight, { Options } from "rehype-highlight"; @@ -234,14 +237,16 @@ const StyledMarkdownPreview = memo(function StyledMarkdownPreview( rehypePlugins: [ rehypeKatex as any, {}, - rehypeHighlight as any, + [ + rehypeHighlight, + { + languages: { ...common, clojure, Delphi}, + } as Options, + ], // Note: An empty obj is the default behavior, but leaving this here for scaffolding to // add unsupported languages in the future. We will need to install the `lowlight` package // to use the `common` language set in addition to unsupported languages. // https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md - { - // languages: {}, - } as Options, () => { let codeBlockIndex = 0; return (tree) => { From d0b8c45b8a2fff0fac2c782fa57e0b715c793e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Dywicki?= Date: Tue, 25 Mar 2025 21:42:51 +0400 Subject: [PATCH 03/30] Use same logic for carrying over requestOptions for completion and chat models. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Łukasz Dywicki --- core/config/load.ts | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/core/config/load.ts b/core/config/load.ts index 4c98e7728..6c7c03bf0 100644 --- a/core/config/load.ts +++ b/core/config/load.ts @@ -225,6 +225,20 @@ function isModelDescription( return (llm as ModelDescription).title !== undefined; } +// Merge request options set for entire config with model specific options +function applyRequestOptionsToModels(models: BaseLLM[], config : Config, roles : ModelRole[] | undefined = undefined) { + // Prepare models + for (const model of models) { + model.requestOptions = { + ...model.requestOptions, + ...config.requestOptions, + }; + if (roles !== undefined) { + model.roles = model.roles ?? roles; + } + } +} + export function isContextProviderWithParams( contextProvider: CustomContextProvider | ContextProviderWithParams, ): contextProvider is ContextProviderWithParams { @@ -318,15 +332,7 @@ async function intermediateToFinalConfig( } } } - - // Prepare models - for (const model of models) { - model.requestOptions = { - ...model.requestOptions, - ...config.requestOptions, - }; - model.roles = model.roles ?? ["chat", "apply", "edit", "summarize"]; // Default to chat role if not specified - } + applyRequestOptionsToModels(models, config, ["chat", "apply", "edit", "summarize"]) // Default to chat role if not specified if (allowFreeTrial) { // Obtain auth token (iff free trial being used) @@ -380,6 +386,7 @@ async function intermediateToFinalConfig( ) ).filter((x) => x !== undefined) as BaseLLM[]; } + applyRequestOptionsToModels(tabAutocompleteModels, config); // These context providers are always included, regardless of what, if anything, // the user has configured in config.json From 1a0d41128f30c7f5c087c7255d6ec3292c288664 Mon Sep 17 00:00:00 2001 From: liuk Date: Sat, 29 Mar 2025 01:57:29 +0800 Subject: [PATCH 04/30] feat: Enhance MCP connection refresh logic --- core/context/mcp/index.ts | 42 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/core/context/mcp/index.ts b/core/context/mcp/index.ts index 7e77561bf..f1eab0b4d 100644 --- a/core/context/mcp/index.ts +++ b/core/context/mcp/index.ts @@ -11,6 +11,8 @@ import { MCPResource, MCPServerStatus, MCPTool, + StdioOptions, + TransportOptions, } from "../.."; export class MCPManagerSingleton { @@ -58,7 +60,12 @@ export class MCPManagerSingleton { // Remove any connections that are no longer in config Array.from(this.connections.entries()).forEach(([id, connection]) => { - if (!servers.find((s) => s.id === id)) { + if ( + !servers.find( + // Refresh the connection if TransportOptions changed + (s) => s.id === id && this.compareTransportOptions(connection.options.transport, s.transport) + ) + ) { refresh = true; connection.abortController.abort(); void connection.client.close(); @@ -71,6 +78,12 @@ export class MCPManagerSingleton { if (!this.connections.has(server.id)) { refresh = true; this.connections.set(server.id, new MCPConnection(server)); + } else { + const conn = this.connections.get(server.id); + if (conn) { + // We need to update it. Some attributes may have changed, such as name, faviconUrl, etc. + conn.options = server; + } } }); @@ -80,6 +93,31 @@ export class MCPManagerSingleton { } } + private compareTransportOptions(a: TransportOptions, b: TransportOptions): boolean { + if (a.type !== b.type) { + return false; + } + if (a.type === "stdio" && b.type === "stdio") { + return ( + a.command === b.command && + JSON.stringify(a.args) === JSON.stringify(b.args) && + this.compareEnv(a, b) + ); + } else if (a.type !== "stdio" && b.type !== "stdio") { + return a.url === b.url; + } + return false; + } + + private compareEnv(a: StdioOptions, b: StdioOptions): boolean { + if (a.env === undefined && b.env === undefined) return true; + if (a.env === undefined || b.env === undefined) return false; + const aKeys = Object.keys(a.env); + const bKeys = Object.keys(b.env); + + return aKeys.length === bKeys.length && aKeys.every((key) => b[key] === a[key]); + } + async refreshConnection(serverId: string) { const connection = this.connections.get(serverId); if (!connection) { @@ -137,7 +175,7 @@ class MCPConnection { public tools: MCPTool[] = []; public resources: MCPResource[] = []; - constructor(private readonly options: MCPOptions) { + constructor(public options: MCPOptions) { this.transport = this.constructTransport(options); this.client = new Client( From 2c0413ecc539e7a6c16cd4fecdc411059b6e34ac Mon Sep 17 00:00:00 2001 From: ferenci84 Date: Tue, 8 Apr 2025 11:18:34 +0200 Subject: [PATCH 05/30] Add reasoning and reasoningBudgetTokens parameters to config schemas and docs --- docs/docs/json-reference.md | 2 ++ docs/docs/reference.md | 2 ++ extensions/vscode/config_schema.json | 10 ++++++++++ packages/config-yaml/src/schemas/models.ts | 2 ++ 4 files changed, 16 insertions(+) diff --git a/docs/docs/json-reference.md b/docs/docs/json-reference.md index 0fa8e2d25..897695b37 100644 --- a/docs/docs/json-reference.md +++ b/docs/docs/json-reference.md @@ -159,6 +159,8 @@ Parameters that control the behavior of text generation and completion settings. - `numThreads`: The number of threads used during the generation process. Available only for Ollama as `num_thread`. - `keepAlive`: For Ollama, this parameter sets the number of seconds to keep the model loaded after the last request, unloading it from memory if inactive (default: `1800` seconds, or 30 minutes). - `useMmap`: For Ollama, this parameter allows the model to be mapped into memory. If disabled can enhance response time on low end devices but will slow down the stream. +- `reasoning`: Enables thinking/reasoning for Anthropic Claude 3.7+ models. +- `reasoningBudgetTokens`: Sets budget tokens for thinking/reasoning in Anthropic Claude 3.7+ models. Example diff --git a/docs/docs/reference.md b/docs/docs/reference.md index 757cfa13e..4e418bc3d 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -160,6 +160,8 @@ The `models` section defines the language models used in your configuration. Mod - `topK`: Maximum number of tokens considered at each step. - `stop`: An array of stop tokens that will terminate the completion. - `n`: Number of completions to generate. + - `reasoning`: Boolean to enable thinking/reasoning for Anthropic Claude 3.7+ models. + - `reasoningBudgetTokens`: Budget tokens for thinking/reasoning in Anthropic Claude 3.7+ models. - `requestOptions`: HTTP request options specific to the model. diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 801bba5ea..d8b540483 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -71,6 +71,16 @@ "title": "Ollama keep_alive", "description": "The number of seconds after no requests are made to unload the model from memory. Defaults to 60*30 = 30min", "type": "integer" + }, + "reasoning": { + "title": "Reasoning", + "description": "Enable thinking/reasoning for Anthropic Claude 3.7+ models", + "type": "boolean" + }, + "reasoningBudgetTokens": { + "title": "Reasoning Budget Tokens", + "description": "Set budget tokens for thinking/reasoning in Anthropic Claude 3.7+ models", + "type": "integer" } } }, diff --git a/packages/config-yaml/src/schemas/models.ts b/packages/config-yaml/src/schemas/models.ts index ff3f6bec3..5730c74f9 100644 --- a/packages/config-yaml/src/schemas/models.ts +++ b/packages/config-yaml/src/schemas/models.ts @@ -47,6 +47,8 @@ export const completionOptionsSchema = z.object({ topK: z.number().optional(), stop: z.array(z.string()).optional(), n: z.number().optional(), + reasoning: z.boolean().optional(), + reasoningBudgetTokens: z.number().optional(), }); export type CompletionOptions = z.infer; From 0e4f17280b7a8eaeae9c92efea9a8494050582fe Mon Sep 17 00:00:00 2001 From: Lucien Loiseau Date: Wed, 9 Apr 2025 10:27:12 +0200 Subject: [PATCH 06/30] add OVHcloud AI Endpoints provider OVHcloud AI Endpoints is a serverless inference API that provides access to a curated selection of models (e.g., Llama, Mistral, Qwen, Deepseek). It is designed with security and data privacy in mind and is compliant with GDPR. This commit adds OVHcloud AI Endpoint as a listed provider and makes the appropriate connection to the supported models. --- core/control-plane/schema.ts | 2 + core/indexing/allEmbeddingsProviders.ts | 2 + core/llm/autodetect.ts | 5 +- core/llm/llms/OVHcloud.ts | 39 ++++++++++ core/llm/llms/index.ts | 2 + .../model-providers/more/ovhcloud.mdx | 72 ++++++++++++++++++ extensions/vscode/config_schema.json | 48 +++++++++++- gui/public/logos/ovhcloud.png | Bin 0 -> 6710 bytes gui/src/pages/AddNewModel/configs/models.ts | 13 ++-- .../pages/AddNewModel/configs/providers.ts | 34 +++++++++ package-lock.json | 4 +- packages/config-types/src/index.ts | 2 + packages/openai-adapters/README.md | 1 + packages/openai-adapters/src/index.ts | 7 +- packages/openai-adapters/src/types.ts | 1 + 15 files changed, 218 insertions(+), 14 deletions(-) create mode 100644 core/llm/llms/OVHcloud.ts create mode 100644 docs/docs/customize/model-providers/more/ovhcloud.mdx create mode 100644 gui/public/logos/ovhcloud.png diff --git a/core/control-plane/schema.ts b/core/control-plane/schema.ts index d29316d5e..34c391711 100644 --- a/core/control-plane/schema.ts +++ b/core/control-plane/schema.ts @@ -16,6 +16,7 @@ const modelDescriptionSchema = z.object({ "sagemaker", "cloudflare", "azure", + "ovhcloud", "nebius", "siliconflow", "scaleway", @@ -86,6 +87,7 @@ const embeddingsProviderSchema = z.object({ "cohere", "free-trial", "gemini", + "ovhcloud", "nebius", "siliconflow", "scaleway", diff --git a/core/indexing/allEmbeddingsProviders.ts b/core/indexing/allEmbeddingsProviders.ts index 3986fa2c0..41eb5fa6b 100644 --- a/core/indexing/allEmbeddingsProviders.ts +++ b/core/indexing/allEmbeddingsProviders.ts @@ -13,6 +13,7 @@ import Nebius from "../llm/llms/Nebius.js"; import Nvidia from "../llm/llms/Nvidia.js"; import Ollama from "../llm/llms/Ollama.js"; import OpenAI from "../llm/llms/OpenAI.js"; +import OVHcloud from "../llm/llms/OVHcloud.js"; import SageMaker from "../llm/llms/SageMaker.js"; import Scaleway from "../llm/llms/Scaleway.js"; import SiliconFlow from "../llm/llms/SiliconFlow.js"; @@ -42,6 +43,7 @@ export const allEmbeddingsProviders: Record< deepinfra: DeepInfra, ncompass: NCompass, nvidia: Nvidia, + ovhcloud: OVHcloud, voyage: Voyage, mistral: Mistral, nebius: Nebius, diff --git a/core/llm/autodetect.ts b/core/llm/autodetect.ts index 05c294f9d..2aa00a3b5 100644 --- a/core/llm/autodetect.ts +++ b/core/llm/autodetect.ts @@ -77,6 +77,7 @@ const PROVIDER_SUPPORTS_IMAGES: string[] = [ "azure", "scaleway", "nebius", + "ovhcloud" ]; const MODEL_SUPPORTS_IMAGES: string[] = [ @@ -147,6 +148,7 @@ const PARALLEL_PROVIDERS: string[] = [ "together", "novita", "sambanova", + "ovhcloud", "nebius", "vertexai", "function-network", @@ -380,5 +382,6 @@ export { autodetectTemplateType, llmCanGenerateInParallel, modelSupportsImages, - modelSupportsTools, + modelSupportsTools }; + diff --git a/core/llm/llms/OVHcloud.ts b/core/llm/llms/OVHcloud.ts new file mode 100644 index 000000000..d79b06b20 --- /dev/null +++ b/core/llm/llms/OVHcloud.ts @@ -0,0 +1,39 @@ +import { ChatCompletionCreateParams } from "openai/resources/index"; +import { ChatMessage, CompletionOptions, LLMOptions } from "../../index.js"; +import OpenAI from "./OpenAI.js"; + +export class OVHcloud extends OpenAI { + static providerName = "ovhcloud"; + + static defaultOptions: Partial = { + apiBase: "https://oai.endpoints.kepler.ai.cloud.ovh.net/v1/", + model: "Qwen2.5-Coder-32B-Instruct", + useLegacyCompletionsEndpoint: false, + }; + + private static MODEL_IDS: { [name: string]: string } = { + "llama3.1-8b": "Llama-3.1-8B-Instruct", + "llama3.1-70b": "Meta-Llama-3_1-70B-Instruct", + "llama3.3-70b": "Meta-Llama-3_3-70B-Instruct", + "qwen2.5-coder-32b": "Qwen2.5-Coder-32B-Instruct", + "codestral-mamba-latest": "mamba-codestral-7B-v0.1", + "mistral-7b": "Mistral-7B-Instruct-v0.3", + "mistral-8x7b": "Mixtral-8x7B-Instruct-v0.1", + "mistral-nemo": "Mistral-Nemo-Instruct-2407", + "DeepSeek-R1-Distill-Llama-70B": "DeepSeek-R1-Distill-Llama-70B" + }; + + protected _convertModelName(model: string) { + return OVHcloud.MODEL_IDS[model] || this.model; + } + + protected _convertArgs(options: CompletionOptions, messages: ChatMessage[]): ChatCompletionCreateParams { + const modifiedOptions = { + ...options, + model: this._convertModelName(options.model) + }; + return super._convertArgs(modifiedOptions, messages); + } +} + +export default OVHcloud; \ No newline at end of file diff --git a/core/llm/llms/index.ts b/core/llm/llms/index.ts index e6a33a9a8..11d38cc33 100644 --- a/core/llm/llms/index.ts +++ b/core/llm/llms/index.ts @@ -41,6 +41,7 @@ import Nvidia from "./Nvidia"; import Ollama from "./Ollama"; import OpenAI from "./OpenAI"; import OpenRouter from "./OpenRouter"; +import OVHcloud from "./OVHcloud"; import { Relace } from "./Relace"; import Replicate from "./Replicate"; import SageMaker from "./SageMaker"; @@ -74,6 +75,7 @@ export const LLMClasses = [ Kindo, LlamaCpp, OpenAI, + OVHcloud, LMStudio, Mistral, Bedrock, diff --git a/docs/docs/customize/model-providers/more/ovhcloud.mdx b/docs/docs/customize/model-providers/more/ovhcloud.mdx new file mode 100644 index 000000000..6dd4613b9 --- /dev/null +++ b/docs/docs/customize/model-providers/more/ovhcloud.mdx @@ -0,0 +1,72 @@ +--- +title: OVHcloud AI Endpoints +--- + +import TabItem from "@theme/TabItem"; +import Tabs from "@theme/Tabs"; + +OVHcloud AI Endpoints is a serverless inference API that provides access to a curated selection of models (e.g., Llama, Mistral, Qwen, Deepseek). It is designed with security and data privacy in mind and is compliant with GDPR. + +:::info +To get started, create an API key on the OVHcloud [AI Endpoints website](https://endpoints.ai.cloud.ovh.net/). For more information, including pricing, visit the OVHcloud [AI Endpoints product page](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/). +::: + +## Chat model + +We recommend configuring **Qwen2.5-Coder-32B-Instruct** as your chat model. +Check our [catalog](https://endpoints.ai.cloud.ovh.net/catalog) to see all of our models hsoted on AI Endpoints. + + + + ```yaml title="config.yaml" + models: + - name: Qwen2.5-Coder-32B-Instruct + provider: ovhcloud + model: qwen2.5-coder-32b + apiKey: + ``` + + + ```json title="config.json" + { + "models": [ + { + "title": "Qwen2.5-Coder-32B-Instruct", + "provider": "ovhcloud", + "model": "qwen2.5-coder-32b", + "apiKey": "" + } + ] + } + ``` + + + +## Embeddings model + +We recommend configuring **bge-multilingual-gemma2** as your embeddings model. + + + + ```yaml title="config.yaml" + models: + - name: BGE Multilingual Gemma2 + provider: ovhcloud + model: bge-multilingual-gemma2 + apiKey: + roles: + - embed + ``` + + + ```json title="config.json" + { + "embeddingsProvider": { + "provider": "ovhcloud", + "model": "bge-multilingual-gemma2", + "apiKey": "" + } + } + ``` + + diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index b8ae1d407..5f9ba79d9 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -216,7 +216,8 @@ "siliconflow", "function-network", "scaleway", - "relace" + "relace", + "ovhcloud" ], "markdownEnumDescriptions": [ "### OpenAI\nUse gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.\n\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/openai)", @@ -263,7 +264,8 @@ "### SiliconFlow\nTo get started with SiliconFlow, obtain your API key from [SiliconCloud](https://cloud.siliconflow.cn/account/ak). SiliconCloud provides cost-effective GenAI services based on excellent open source basic models.\n> [Models](https://siliconflow.cn/zh-cn/models)", "### Function Network offers private, affordable user-owned AI\nTo get started with Function Network, obtain your API key from [Function Network](https://www.function.network/join-waitlist). Function Network provides a variety of models for chat, completion, and embeddings.", "### Scaleway\n Generative APIs are serverless endpoints for the most popular AI models.\nHosted in European data centers and priced competitively per million tokens used, models served by Scaleway are ideal for users requiring low latency, full data privacy, and 100% compliance with EU AI Act. To get access to the Scaleway Generative APIs, read the [Quickstart guide](https://www.scaleway.com/en/docs/ai-data/generative-apis/quickstart/) and get a [valid API key](https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/).", - "### Relace\n Relace provides a fast apply model. To get started, obtain an API key from [here](https://app.relace.ai/settings/api-keys)." + "### Relace\n Relace provides a fast apply model. To get started, obtain an API key from [here](https://app.relace.ai/settings/api-keys).", + "### OVHcloud AI Endpoints is a serverless inference API that provides access to a curated selection of models (e.g., Llama, Mistral, Qwen, Deepseek). It is designed with security and data privacy in mind and is compliant with GDPR. To get started, create an API key on the OVHcloud [AI Endpoints website](https://endpoints.ai.cloud.ovh.net/). For more information, including pricing, visit the OVHcloud [AI Endpoints product page](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/)." ], "type": "string" }, @@ -498,7 +500,8 @@ "nebius", "xAI", "kindo", - "scaleway" + "scaleway", + "ovhcloud" ] } }, @@ -1377,6 +1380,42 @@ } } }, + { + "if": { + "properties": { + "provider": { + "enum": ["ovhcloud"] + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "model": { + "anyOf": [ + { + "enum": [ + "llama3.1-8b", + "llama3.1-70b", + "llama3.3-70b", + "qwen2.5-coder-32b", + "codestral-mamba-latest", + "mistral-7b", + "mistral-8x7b", + "mistral-nemo", + "DeepSeek-R1-Distill-Llama-70B" + ] + }, + { + "type": "string" + } + ], + "markdownDescription": "Select a pre-defined option, or find the exact model string from OVHcloud [AI Endpoints catalog](https://endpoints.ai.cloud.ovh.net/catalog).", + "x-intellij-html-description": "Select a pre-defined option, or find the exact model string from OVHcloud AI Endpoints catalog." + } + } + } + }, { "if": { "properties": { @@ -2765,7 +2804,8 @@ "lmstudio", "siliconflow", "function-network", - "scaleway" + "scaleway", + "ovhcloud" ] }, "model": { diff --git a/gui/public/logos/ovhcloud.png b/gui/public/logos/ovhcloud.png new file mode 100644 index 0000000000000000000000000000000000000000..8ba409324b04c960881804d3f0c0d614d66ebc32 GIT binary patch literal 6710 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 literal 0 HcmV?d00001 diff --git a/gui/src/pages/AddNewModel/configs/models.ts b/gui/src/pages/AddNewModel/configs/models.ts index fafdc53b7..0a29f75d6 100644 --- a/gui/src/pages/AddNewModel/configs/models.ts +++ b/gui/src/pages/AddNewModel/configs/models.ts @@ -174,6 +174,7 @@ export const models: { [key: string]: ModelPackage } = { "llama.cpp", "replicate", "cerebras", + "ovhcloud", "nebius", "scaleway", ], @@ -371,6 +372,7 @@ export const models: { [key: string]: ModelPackage } = { "ollama", "lmstudio", "together", + "ovhcloud", "llama.cpp", "replicate", "nebius", @@ -511,7 +513,7 @@ export const models: { [key: string]: ModelPackage } = { contextLength: 65536, }, icon: "meta.png", - providerOptions: [], + providerOptions: ["ovhcloud"], isOpenSource: false, }, llama3170bChat: { @@ -524,7 +526,7 @@ export const models: { [key: string]: ModelPackage } = { contextLength: 8192, }, icon: "meta.png", - providerOptions: ["groq", "scaleway", "nebius"], + providerOptions: ["groq", "ovhcloud", "scaleway", "nebius"], isOpenSource: false, }, llama31405bChat: { @@ -635,6 +637,7 @@ export const models: { [key: string]: ModelPackage } = { "ollama", "lmstudio", "together", + "ovhcloud", "llama.cpp", "replicate", "nebius", @@ -753,7 +756,7 @@ export const models: { [key: string]: ModelPackage } = { contextLength: 256_000, }, icon: "mistral.png", - providerOptions: ["mistral"], + providerOptions: ["ovhcloud", "mistral"], isOpenSource: true, }, mistral7b: { @@ -1400,7 +1403,7 @@ export const models: { [key: string]: ModelPackage } = { contextLength: 32_000, }, icon: "qwen.png", - providerOptions: ["scaleway", "nebius", "ncompass"], + providerOptions: ["scaleway", "nebius", "ovhcloud", "ncompass"], isOpenSource: true, }, grokBeta: { @@ -1688,7 +1691,7 @@ export const models: { [key: string]: ModelPackage } = { contextLength: 32_000, }, icon: "deepseek.png", - providerOptions: ["sambanova"], + providerOptions: ["ovhcloud", "sambanova"], isOpenSource: true, }, deepseekR1: { diff --git a/gui/src/pages/AddNewModel/configs/providers.ts b/gui/src/pages/AddNewModel/configs/providers.ts index 089ba74f9..e49bcfe41 100644 --- a/gui/src/pages/AddNewModel/configs/providers.ts +++ b/gui/src/pages/AddNewModel/configs/providers.ts @@ -161,6 +161,40 @@ export const providers: Partial> = { packages: [models.llama31Chat, models.deepseek], apiKeyUrl: "https://function.network/join-waitlist", }, + ovhcloud: { + title: "OVHcloud", + provider: "ovhcloud", + refPage: "ovhcloud", + description: + "OVHcloud AI Endpoints is a serverless inference API that provides access to a curated selection of models (e.g., Llama, Mistral, Qwen, Deepseek). It is designed with security and data privacy in mind and is compliant with GDPR.", + longDescription: `To get started, create an API key on the OVHcloud [AI Endpoints website](https://endpoints.ai.cloud.ovh.net/). For more information, including pricing, visit the OVHcloud [AI Endpoints product page](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/).`, + params: { + apiKey: "", + }, + collectInputFor: [ + { + inputType: "text", + key: "apiKey", + label: "API key", + placeholder: "Enter your AI Endpoints API key", + required: true, + }, + ...completionParamsInputsConfigs, + ], + icon: "ovhcloud.png", + tags: [ModelProviderTags.RequiresApiKey, ModelProviderTags.OpenSource], + packages: [ + models.llama318bChat, + models.llama3170bChat, + models.llama3370bChat, + models.codestralMamba, + models.mistralOs, + models.mistralNemo, + models.Qwen25Coder32b, + models.deepseekR1DistillLlama70B, + ], + apiKeyUrl: "https://endpoints.ai.cloud.ovh.net/", + }, scaleway: { title: "Scaleway", provider: "scaleway", diff --git a/package-lock.json b/package-lock.json index 6a0a55705..cdfb21273 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,8 @@ "@typescript-eslint/parser": "^7.8.0", "eslint-plugin-import": "^2.29.1", "prettier": "^3.3.3", - "prettier-plugin-tailwindcss": "^0.6.8" + "prettier-plugin-tailwindcss": "^0.6.8", + "typescript": "^5.6.3" } }, "node_modules/@eslint-community/eslint-utils": { @@ -2976,7 +2977,6 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "dev": true, - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/packages/config-types/src/index.ts b/packages/config-types/src/index.ts index e60b8e79b..8bf6bd01e 100644 --- a/packages/config-types/src/index.ts +++ b/packages/config-types/src/index.ts @@ -55,6 +55,7 @@ export const modelDescriptionSchema = z.object({ "sagemaker", "cloudflare", "azure", + "ovhcloud", "continue-proxy", "nebius", "scaleway", @@ -109,6 +110,7 @@ export const embeddingsProviderSchema = z.object({ "cohere", "free-trial", "gemini", + "ovhcloud", "continue-proxy", "nebius", "scaleway", diff --git a/packages/openai-adapters/README.md b/packages/openai-adapters/README.md index b84b198e7..2f29fbf0d 100644 --- a/packages/openai-adapters/README.md +++ b/packages/openai-adapters/README.md @@ -52,6 +52,7 @@ They are concerned with: - [x] OpenRouter - [x] OpenAI - [ ] !Ollama +- [x] OVHCLoud - [ ] Replicate - [ ] SageMaker - [x] SambaNova diff --git a/packages/openai-adapters/src/index.ts b/packages/openai-adapters/src/index.ts index 05e43fc20..58b1c1fba 100644 --- a/packages/openai-adapters/src/index.ts +++ b/packages/openai-adapters/src/index.ts @@ -2,7 +2,6 @@ import dotenv from "dotenv"; import { z } from "zod"; import { AnthropicApi } from "./apis/Anthropic.js"; import { AzureOpenAIApi } from "./apis/AzureOpenAI.js"; -import { BaseLlmApi } from "./apis/base.js"; import { CohereApi } from "./apis/Cohere.js"; import { DeepSeekApi } from "./apis/DeepSeek.js"; import { GeminiApi } from "./apis/Gemini.js"; @@ -11,6 +10,7 @@ import { MockApi } from "./apis/Mock.js"; import { MoonshotApi } from "./apis/Moonshot.js"; import { OpenAIApi } from "./apis/OpenAI.js"; import { RelaceApi } from "./apis/Relace.js"; +import { BaseLlmApi } from "./apis/base.js"; import { LLMConfig, OpenAIConfigSchema } from "./types.js"; dotenv.config(); @@ -71,6 +71,8 @@ export function constructLlmApi(config: LLMConfig): BaseLlmApi | undefined { return openAICompatible("http://localhost:10000", config); case "nvidia": return openAICompatible("https://integrate.api.nvidia.com/v1/", config); + case "ovhcloud": + return openAICompatible("https://oai.endpoints.kepler.ai.cloud.ovh.net/v1/", config); case "scaleway": return openAICompatible("https://api.scaleway.ai/v1/", config); case "fireworks": @@ -106,9 +108,10 @@ export { type Completion, type CompletionCreateParams, type CompletionCreateParamsNonStreaming, - type CompletionCreateParamsStreaming, + type CompletionCreateParamsStreaming } from "openai/resources/index"; // export export type { BaseLlmApi } from "./apis/base.js"; export type { LLMConfig } from "./types.js"; + diff --git a/packages/openai-adapters/src/types.ts b/packages/openai-adapters/src/types.ts index 04f0b0c12..d0d5c3e6f 100644 --- a/packages/openai-adapters/src/types.ts +++ b/packages/openai-adapters/src/types.ts @@ -37,6 +37,7 @@ export const OpenAIConfigSchema = BasePlusConfig.extend({ z.literal("deepinfra"), z.literal("groq"), z.literal("nvidia"), + z.literal("ovhcloud"), z.literal("fireworks"), z.literal("together"), z.literal("novita"), From 790b949cb2b2943b2868f20ccaf68f1f510695e7 Mon Sep 17 00:00:00 2001 From: Fred Bricon Date: Wed, 9 Apr 2025 15:34:46 +0200 Subject: [PATCH 07/30] Mitigate registerCopyBufferSpy failures Signed-off-by: Fred Bricon --- extensions/vscode/src/commands.ts | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index 719c1a5d1..3d47a16a0 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -15,6 +15,7 @@ import { Core } from "core/core"; import { LOCAL_DEV_DATA_VERSION } from "core/data/log"; import { walkDirAsync } from "core/indexing/walkDir"; import { isModelInstaller } from "core/llm"; +import { extractMinimalStackTraceInfo } from "core/util/extractMinimalStackTraceInfo"; import { startLocalOllama } from "core/util/ollamaHelper"; import { getDevDataFilePath } from "core/util/paths"; import { Telemetry } from "core/util/posthog"; @@ -1011,7 +1012,7 @@ const getCommandsMap: ( }; }; -const registerCopyBufferSpy = ( +const registerCopyBufferService = ( context: vscode.ExtensionContext, core: Core, ) => { @@ -1102,8 +1103,6 @@ export function registerAllCommands( core: Core, editDecorationManager: EditDecorationManager, ) { - registerCopyBufferSpy(context, core); - for (const [command, callback] of Object.entries( getCommandsMap( ide, @@ -1123,4 +1122,28 @@ export function registerAllCommands( vscode.commands.registerCommand(command, callback), ); } + + try { + registerCopyBufferService(context, core); + } catch (e: any) { + //Non-critical error, it needs to be intercepted and not prevent the extension from starting + console.log("Error registering CopyBufferService: ", e); + Telemetry.capture( + "vscode_extension_activation_error", + { + stack: extractMinimalStackTraceInfo(e.stack), + message: e.message, + }, + false, + true, + ); + vscode.window.showWarningMessage( + "Failed to override 'editor.action.clipboardCopyAction'. Continue will not have access to the clipboard.", + "View Logs", + ).then((selection) => { + if (selection === "View Logs") { + vscode.commands.executeCommand("continue.viewLogs"); + } + }); + } } From 45eacf4ebbd99a97eef32eef01d780a1f8c57b7a Mon Sep 17 00:00:00 2001 From: liuk Date: Sat, 12 Apr 2025 01:37:19 +0800 Subject: [PATCH 08/30] fix: Resolve type error in env comparison --- core/context/mcp/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/context/mcp/index.ts b/core/context/mcp/index.ts index f1eab0b4d..76be6f0da 100644 --- a/core/context/mcp/index.ts +++ b/core/context/mcp/index.ts @@ -110,12 +110,12 @@ export class MCPManagerSingleton { } private compareEnv(a: StdioOptions, b: StdioOptions): boolean { - if (a.env === undefined && b.env === undefined) return true; - if (a.env === undefined || b.env === undefined) return false; - const aKeys = Object.keys(a.env); - const bKeys = Object.keys(b.env); + const aEnv = a.env ?? {}; + const bEnv = b.env ?? {}; + const aKeys = Object.keys(aEnv); + const bKeys = Object.keys(bEnv); - return aKeys.length === bKeys.length && aKeys.every((key) => b[key] === a[key]); + return aKeys.length === bKeys.length && aKeys.every((key) => aEnv[key] === bEnv[key]); } async refreshConnection(serverId: string) { From 4873f5805f89bc1f443211515dd7afb3fbc2cfff Mon Sep 17 00:00:00 2001 From: Andreas Opferkuch Date: Mon, 14 Apr 2025 11:58:07 +0200 Subject: [PATCH 09/30] feat: Provide workspace path to HttpContextProvider --- core/context/providers/HttpContextProvider.ts | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/core/context/providers/HttpContextProvider.ts b/core/context/providers/HttpContextProvider.ts index 067035806..68b94c918 100644 --- a/core/context/providers/HttpContextProvider.ts +++ b/core/context/providers/HttpContextProvider.ts @@ -2,6 +2,7 @@ import { ContextItem, ContextProviderDescription, ContextProviderExtras, + IDE, } from "../../index.js"; import { BaseContextProvider } from "../index.js"; @@ -14,6 +15,24 @@ class HttpContextProvider extends BaseContextProvider { renderInlineAs: "", }; + private async getWorkspacePath(ide: IDE, url: URL) { + try { + const currentFile = await ide.getCurrentFile(); + const hostname = url.hostname.toLowerCase(); + const isLocalServer= hostname === "localhost" || + hostname === "127.0.0.1" || + hostname.startsWith("192.168.") || + hostname === "[::1]"; + + return isLocalServer ? + (await ide.getWorkspaceDirs()).find(workspaceDirectory => { + return currentFile?.path.startsWith(workspaceDirectory) + }) : undefined + } catch (e) { + return undefined; + } + } + override get description(): ContextProviderDescription { return { title: this.options.title || "http", @@ -32,7 +51,8 @@ class HttpContextProvider extends BaseContextProvider { query: string, extras: ContextProviderExtras, ): Promise { - const response = await extras.fetch(new URL(this.options.url), { + const parsedUrl = new URL(this.options.url) + const response = await extras.fetch(parsedUrl, { method: "POST", headers: { "Content-Type": "application/json", @@ -42,6 +62,7 @@ class HttpContextProvider extends BaseContextProvider { query: query || "", fullInput: extras.fullInput, options: this.options.options, + workspacePath: await this.getWorkspacePath(extras.ide, parsedUrl), }), }); From e73599791048488273bb6db2b905aade63d10c21 Mon Sep 17 00:00:00 2001 From: Andreas Opferkuch Date: Mon, 14 Apr 2025 12:31:31 +0200 Subject: [PATCH 10/30] docs: Add HttpContextProvider request shape docs --- .../tutorials/build-your-own-context-provider.mdx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/docs/customize/tutorials/build-your-own-context-provider.mdx b/docs/docs/customize/tutorials/build-your-own-context-provider.mdx index 1494680c0..d8bdc39be 100644 --- a/docs/docs/customize/tutorials/build-your-own-context-provider.mdx +++ b/docs/docs/customize/tutorials/build-your-own-context-provider.mdx @@ -47,7 +47,17 @@ Continue can retrieve context from a custom HTTP server that you create and serv Then, create a server that responds to requests as are made from [HttpContextProvider.ts](https://github.com/continuedev/continue/blob/main/core/context/providers/HttpContextProvider.ts). See the `hello` endpoint in [context_provider_server.py](https://github.com/continuedev/continue/blob/main/core/context/providers/context_provider_server.py) for an example that uses FastAPI. -The `"options"` property can be used to send additional parameters to your endpoint, which will be included in the request body. +The `"options"` property can be used to send additional parameters to your endpoint. The full request body has the following shape: + +```typescript +{ + query: string; + fullInput: string; + options: Record; + + workspacePath?: string; // Only provided if the server is local. +} +``` :::info The following methods for creating custom context providers are deprecated. We recommend using HTTP context providers, [MCP Servers](../context-providers.mdx#model-context-protocol), and [Prompts](../deep-dives/prompts.md) where possible. From c3b2552ed5e47eef8dc2a691d5f76f30b61ceafd Mon Sep 17 00:00:00 2001 From: Andreas Opferkuch Date: Mon, 14 Apr 2025 18:05:55 +0200 Subject: [PATCH 11/30] fix(HttpContextProvider): support all possible local servers via a library --- core/context/providers/HttpContextProvider.ts | 10 +++------- core/package-lock.json | 10 ++++++++++ core/package.json | 1 + extensions/vscode/package-lock.json | 1 + gui/package-lock.json | 1 + 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/core/context/providers/HttpContextProvider.ts b/core/context/providers/HttpContextProvider.ts index 68b94c918..835fc319a 100644 --- a/core/context/providers/HttpContextProvider.ts +++ b/core/context/providers/HttpContextProvider.ts @@ -1,3 +1,4 @@ +import isLocalhost from "is-localhost-ip"; import { ContextItem, ContextProviderDescription, @@ -18,13 +19,8 @@ class HttpContextProvider extends BaseContextProvider { private async getWorkspacePath(ide: IDE, url: URL) { try { const currentFile = await ide.getCurrentFile(); - const hostname = url.hostname.toLowerCase(); - const isLocalServer= hostname === "localhost" || - hostname === "127.0.0.1" || - hostname.startsWith("192.168.") || - hostname === "[::1]"; - - return isLocalServer ? + // `isLocalhost` actually also returns true for other local addresses, not just localhost + return await isLocalhost(url.hostname) ? (await ide.getWorkspaceDirs()).find(workspaceDirectory => { return currentFile?.path.startsWith(workspaceDirectory) }) : undefined diff --git a/core/package-lock.json b/core/package-lock.json index 24aeb4f18..5e4899d95 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -39,6 +39,7 @@ "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.3", "ignore": "^5.3.1", + "is-localhost-ip": "^2.0.0", "jinja-js": "0.1.8", "js-tiktoken": "^1.0.8", "jsdom": "^24.0.0", @@ -9872,6 +9873,15 @@ "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", "optional": true }, + "node_modules/is-localhost-ip": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-localhost-ip/-/is-localhost-ip-2.0.0.tgz", + "integrity": "sha512-vlgs2cSgMOfnKU8c1ewgKPyum9rVrjjLLW2HBdL5i0iAJjOs8NY55ZBd/hqUTaYR0EO9CKZd3hVSC2HlIbygTQ==", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, "node_modules/is-map": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", diff --git a/core/package.json b/core/package.json index a405bad55..05f3ad9e7 100644 --- a/core/package.json +++ b/core/package.json @@ -73,6 +73,7 @@ "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.3", "ignore": "^5.3.1", + "is-localhost-ip": "^2.0.0", "jinja-js": "0.1.8", "js-tiktoken": "^1.0.8", "jsdom": "^24.0.0", diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 108520e49..d3b78b262 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -132,6 +132,7 @@ "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.3", "ignore": "^5.3.1", + "is-localhost-ip": "^2.0.0", "jinja-js": "0.1.8", "js-tiktoken": "^1.0.8", "jsdom": "^24.0.0", diff --git a/gui/package-lock.json b/gui/package-lock.json index 69c571f84..f15a844ba 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -135,6 +135,7 @@ "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.3", "ignore": "^5.3.1", + "is-localhost-ip": "^2.0.0", "jinja-js": "0.1.8", "js-tiktoken": "^1.0.8", "jsdom": "^24.0.0", From b212c8c0530ecaaf38193b3cf041f71da2721f01 Mon Sep 17 00:00:00 2001 From: Jazzcort Date: Mon, 14 Apr 2025 11:07:25 -0400 Subject: [PATCH 12/30] Standardize tooltip for chat section Before this fix, tooltips were showing for some items and not for the others. The inconsistency fells like a bug. In addidtion, the format of the tooltips doesn't match the standard pattern in VS Code. This fix provide tooltips for all the items in the Continue UI and formalize the text format of each tooltip. https://github.com/continuedev/continue/issues/4819 --- gui/src/components/mainInput/InputToolbar.tsx | 24 +++++++++++++++---- .../Lump/BlockSettingsTopToolbar.tsx | 21 ++++++++++++---- 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/gui/src/components/mainInput/InputToolbar.tsx b/gui/src/components/mainInput/InputToolbar.tsx index 252126425..ba0987bb6 100644 --- a/gui/src/components/mainInput/InputToolbar.tsx +++ b/gui/src/components/mainInput/InputToolbar.tsx @@ -132,8 +132,18 @@ function InputToolbar(props: InputToolbarProps) { }} >
- - + + + + Select Mode + + + + + + Select Model + +
{props.toolbarOptions?.hideImageUpload || (supportsImages && ( @@ -159,7 +169,7 @@ function InputToolbar(props: InputToolbarProps) { }} /> - Attach an image + Attach Image @@ -172,7 +182,7 @@ function InputToolbar(props: InputToolbarProps) { /> - Add context (files, docs, urls, etc.) + Attach Context )} @@ -208,7 +218,7 @@ function InputToolbar(props: InputToolbarProps) { {getMetaKeyLabel()}⏎ @codebase - Submit with the codebase as context ({getMetaKeyLabel()}⏎) + Send With Codebase as Context ({getMetaKeyLabel()}⏎) )} @@ -234,6 +244,7 @@ function InputToolbar(props: InputToolbarProps) { )} { @@ -250,6 +261,9 @@ function InputToolbar(props: InputToolbarProps) { ⏎ {props.toolbarOptions?.enterText ?? "Enter"} ⏎ + + Send (⏎) +
diff --git a/gui/src/components/mainInput/Lump/BlockSettingsTopToolbar.tsx b/gui/src/components/mainInput/Lump/BlockSettingsTopToolbar.tsx index 4ecf299b7..70f144554 100644 --- a/gui/src/components/mainInput/Lump/BlockSettingsTopToolbar.tsx +++ b/gui/src/components/mainInput/Lump/BlockSettingsTopToolbar.tsx @@ -12,6 +12,7 @@ import { import { vscBadgeForeground } from "../.."; import { useAppSelector } from "../../../redux/hooks"; import { fontSize } from "../../../util"; +import { ToolTip } from "../../gui/Tooltip"; import AssistantSelect from "../../modelSelection/platform/AssistantSelect"; import HoverItem from "../InputToolbar/HoverItem"; import { useLump } from "./LumpContext"; @@ -47,7 +48,11 @@ function BlockSettingsToolbarIcon( const isErrorSection = props.sectionId === "error"; return ( - +
+ + {props.tooltip} +
); } @@ -122,9 +130,7 @@ export function BlockSettingsTopToolbar() { @@ -151,7 +157,12 @@ export function BlockSettingsTopToolbar() {
- + + + + Select Assistant + +
); From c7d829edadf495af2a8f3b2155ca8e01236dc6b2 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Fri, 18 Apr 2025 16:04:36 +0530 Subject: [PATCH 13/30] do not allow to toggle config page from command palette --- extensions/vscode/package.json | 10 ++++++++++ extensions/vscode/src/commands.ts | 3 +++ 2 files changed, 13 insertions(+) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index ade2b79fa..fb8bfdfd1 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -220,6 +220,12 @@ "icon": "$(gear)", "group": "Continue" }, + { + "command": "continue.openConfigPageFromPalette", + "category": "Continue", + "title": "Open Settings", + "group": "Continue" + }, { "command": "continue.toggleTabAutocompleteEnabled", "category": "Continue", @@ -439,6 +445,10 @@ }, { "command": "continue.newSession" + }, + { + "command": "continue.openConfigPage", + "when": "false" } ], "editor/context": [ diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index f44e5fed7..3d68a19c3 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -794,6 +794,9 @@ const getCommandsMap: ( vscode.commands.executeCommand("workbench.action.copyEditorToNewWindow"); vscode.commands.executeCommand("workbench.action.closeAuxiliaryBar"); }, + "continue.openConfigPageFromPalette": () => { + vscode.commands.executeCommand("continue.navigateTo", "/config", false); + }, "continue.openConfigPage": () => { vscode.commands.executeCommand("continue.navigateTo", "/config", true); }, From 92bf3ce5a0e6a10b060925fc7aa5337ca7555b7b Mon Sep 17 00:00:00 2001 From: jhpiedrahitao Date: Mon, 21 Apr 2025 10:21:50 -0500 Subject: [PATCH 14/30] update models --- core/llm/autodetect.ts | 1 + core/llm/llms/SambaNova.ts | 11 +- core/llm/toolSupport.ts | 4 +- .../model-providers/more/SambaNova.mdx | 8 +- extensions/vscode/config_schema.json | 13 +- gui/src/pages/AddNewModel/configs/models.ts | 127 ++++++------------ .../pages/AddNewModel/configs/providers.ts | 11 +- 7 files changed, 64 insertions(+), 111 deletions(-) diff --git a/core/llm/autodetect.ts b/core/llm/autodetect.ts index 05c294f9d..b2a7d5a6d 100644 --- a/core/llm/autodetect.ts +++ b/core/llm/autodetect.ts @@ -95,6 +95,7 @@ const MODEL_SUPPORTS_IMAGES: string[] = [ "pixtral", "llama3.2", "llama-3.2", + "llama4" ]; function modelSupportsTools(modelDescription: ModelDescription) { diff --git a/core/llm/llms/SambaNova.ts b/core/llm/llms/SambaNova.ts index 4c2599529..db37c9276 100644 --- a/core/llm/llms/SambaNova.ts +++ b/core/llm/llms/SambaNova.ts @@ -9,20 +9,17 @@ class SambaNova extends OpenAI { }; private static MODEL_IDS: { [name: string]: string } = { - "qwen2.5-coder-32b": "Qwen2.5-Coder-32B-Instruct", + "llama4-scout": "Llama-4-Scout-17B-16E-Instruct", + "llama4-maverick": "Llama-4-Maverick-17B-128E-Instruct", "llama3.3-70b": "Meta-Llama-3.3-70B-Instruct", "llama3.1-8b": "Meta-Llama-3.1-8B-Instruct", - "llama3.1-70b": "Meta-Llama-3.1-70B-Instruct", "llama3.1-405b": "Meta-Llama-3.1-405B-Instruct", - "llama3.1-tulu-405b": "Llama-3.1-Tulu-3-405B", "llama3.2-1b": "Meta-Llama-3.2-1B-Instruct", "llama3.2-3b": "Meta-Llama-3.2-3B-Instruct", - "llama3.2-11b": "Llama-3.2-11B-Vision-Instruct", - "llama3.2-90b": "Llama-3.2-90B-Vision-Instruct", - "qwen2.5-72b": "Qwen2.5-72B-Instruct", - "qwq-32b": "QwQ-32B-Preview", + "qwq-32b": "QwQ-32B", "deepseek-r1-distill-llama-70b": "DeepSeek-R1-Distill-Llama-70B", "deepseek-r1": "DeepSeek-R1", + "deepseek-v3": "DeepSeek-V3-0324", }; protected _convertModelName(model: string) { diff --git a/core/llm/toolSupport.ts b/core/llm/toolSupport.ts index 3d0d72cc8..2b7a150ec 100644 --- a/core/llm/toolSupport.ts +++ b/core/llm/toolSupport.ts @@ -118,7 +118,9 @@ export const PROVIDER_TOOL_SUPPORT: Record< sambanova: (model) => { // https://docs.sambanova.ai/cloud/docs/capabilities/function-calling if ( - model.toLowerCase().startsWith("meta-llama-3") + model.toLowerCase().startsWith("meta-llama-3") || + model.toLowerCase().includes("llama-4") || + model.toLowerCase().includes("deepseek") ) { return true; } diff --git a/docs/docs/customize/model-providers/more/SambaNova.mdx b/docs/docs/customize/model-providers/more/SambaNova.mdx index 3d554006e..58197ae30 100644 --- a/docs/docs/customize/model-providers/more/SambaNova.mdx +++ b/docs/docs/customize/model-providers/more/SambaNova.mdx @@ -9,9 +9,9 @@ The SambaNova Cloud is a cloud platform for running large AI models with the wor ```yaml title="config.yaml" models: - - name: SambaNova Qwen2.5 coder + - name: SambaNova Llama 4 Scout provider: sambanova - model: qwen2.5-coder-32b + model: Llama-4-Scout-17B-16E-Instruct apiKey: ``` @@ -20,9 +20,9 @@ The SambaNova Cloud is a cloud platform for running large AI models with the wor { "models": [ { - "title": "SambaNova Qwen2.5 coder", + "title": "SambaNova Llama 4 Scout", "provider": "sambanova", - "model": "qwen2.5-coder-32b", + "model": "Llama-4-Scout-17B-16E-Instruct", "apiKey": "" } ] diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 48f6e2aaa..462f69983 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -1651,20 +1651,17 @@ "anyOf": [ { "enum": [ - "Qwen2.5-Coder-32B-Instruct", + "Llama-4-Scout-17B-16E-Instruct", + "Llama-4-Maverick-17B-128E-Instruct", "Meta-Llama-3.3-70B-Instruct", "Meta-Llama-3.1-8B-Instruct", - "Meta-Llama-3.1-70B-Instruct", "Meta-Llama-3.1-405B-Instruct", - "Llama-3.1-Tulu-3-405B", "Meta-Llama-3.2-1B-Instruct", "Meta-Llama-3.2-3B-Instruct", - "Llama-3.2-11B-Vision-Instruct", - "Llama-3.2-90B-Vision-Instruct", - "Qwen2.5-72B-Instruct", - "QwQ-32B-Preview", + "QwQ-32B", "DeepSeek-R1-Distill-Llama-70B", - "DeepSeek-R1" + "DeepSeek-R1", + "DeepSeek-V3-0324" ] }, { diff --git a/gui/src/pages/AddNewModel/configs/models.ts b/gui/src/pages/AddNewModel/configs/models.ts index d21a7d66f..f10d7f0a1 100644 --- a/gui/src/pages/AddNewModel/configs/models.ts +++ b/gui/src/pages/AddNewModel/configs/models.ts @@ -1565,13 +1565,37 @@ export const models: { [key: string]: ModelPackage } = { providerOptions: ["siliconflow"], isOpenSource: true, }, + llama4Scout: { + title: "Llama 4 Scout Instruct", + description: "A model from Meta, fine-tuned for chat", + params: { + title: "Llama 4 Scout Instruct", + model: "Llama-4-Scout-17B-16E-Instruct", + contextLength: 16_000, + }, + icon: "meta.png", + providerOptions: ["sambanova"], + isOpenSource: true, + }, + llama4Maverick: { + title: "Llama 4 Maverick Instruct", + description: "A model from Meta, fine-tuned for chat", + params: { + title: "Llama 4 Maverick Instruct", + model: "Llama-4-Maverick-17B-128E-Instruct", + contextLength: 16_000, + }, + icon: "meta.png", + providerOptions: ["sambanova"], + isOpenSource: true, + }, llama3370BInstruct: { title: "Llama 3.3 70B Instruct", description: "A model from Meta, fine-tuned for chat", params: { title: "Llama 3.3 70B instruct", model: "Meta-Llama-3.3-70B-Instruct", - contextLength: 16_000, + contextLength: 128_000, }, icon: "meta.png", providerOptions: ["sambanova"], @@ -1590,19 +1614,6 @@ export const models: { [key: string]: ModelPackage } = { providerOptions: ["sambanova"], isOpenSource: true, }, - llama3170BInstruct: { - title: "Llama3.1 70B", - description: "A model from Meta, fine-tuned for chat", - refUrl: "", - params: { - title: "Llama 3.1 70B Instruct", - model: "Meta-Llama-3.1-70B-Instruct", - contextLength: 128_000, - }, - icon: "meta.png", - providerOptions: ["sambanova"], - isOpenSource: true, - }, llama31405BInstruct: { title: "Llama3.1 405B", description: "A model from Meta, fine-tuned for chat", @@ -1616,19 +1627,6 @@ export const models: { [key: string]: ModelPackage } = { providerOptions: ["sambanova"], isOpenSource: true, }, - llama31Tulu3405B: { - title: "Llama3.1 Tulu 3405B", - description: "A model from Meta, fine-tuned for chat", - refUrl: "", - params: { - title: "Llama 3.1 Tulu 3 405B", - model: "Llama-3.1-Tulu-3-405B", - contextLength: 16_000, - }, - icon: "allenai.png", - providerOptions: ["sambanova"], - isOpenSource: true, - }, llama321BInstruct: { title: "Llama3.2 1B", description: "A model from Meta, fine-tuned for chat", @@ -1655,65 +1653,13 @@ export const models: { [key: string]: ModelPackage } = { providerOptions: ["sambanova"], isOpenSource: true, }, - llama3211BInstruct: { - title: "Llama3.2 11B", - description: "A model from Meta, fine-tuned for multimodal chat with images", - refUrl: "", - params: { - title: "Llama 3.2 11B Vision Instruct", - model: "Llama-3.2-11B-Vision-Instruct", - contextLength: 4096, - }, - icon: "meta.png", - providerOptions: ["sambanova"], - isOpenSource: true, - }, - llama3290BInstruct: { - title: "Llama3.2 90B", - description: "A model from Meta, fine-tuned for multimodal chat with images", - refUrl: "", - params: { - title: "Llama 3.2 90B Vision Instruct", - model: "Llama-3.2-90B-Vision-Instruct", - contextLength: 4096, - }, - icon: "meta.png", - providerOptions: ["sambanova"], - isOpenSource: true, - }, - qwen25Coder32BInstruct: { - title: "Qwen 2.5 Coder 32B", + qwq32B: { + title: "QwQ 32B", description: - "Qwen 2.5 coder is an auto-regressive language model that uses an optimized transformer architecture, fine-tuned for coding tasks.", + "QwQ-32B is Qwen's latest experimental research model, focusing on improving AI reasoning capabilities.", params: { - title: "Qwen2.5 Coder 32B Instruct", - model: "Qwen2.5-Coder-32B-Instruct", - contextLength: 16_000, - }, - icon: "qwen.png", - providerOptions: ["sambanova"], - isOpenSource: true, - }, - qwen2572BInstruct: { - title: "Qwen 2.5 72B", - description: - "Qwen 2.5 is an auto-regressive language model that uses an optimized transformer architecture.", - params: { - title: "Qwen2.5 72B Instruct", - model: "Qwen2.5-72B-Instruct", - contextLength: 16_000, - }, - icon: "qwen.png", - providerOptions: ["sambanova"], - isOpenSource: true, - }, - qwq32BPreview: { - title: "QwQ 32B Preview", - description: - "QwQ-32B-Preview is Qwen's latest experimental research model, focusing on improving AI reasoning capabilities.", - params: { - title: "QwQ 32B Preview", - model: "QwQ-32B-Preview", + title: "QwQ 32B", + model: "QwQ-32B", contextLength: 16_000, }, icon: "qwen.png", @@ -1746,6 +1692,19 @@ export const models: { [key: string]: ModelPackage } = { providerOptions: ["sambanova"], isOpenSource: true, }, + deepseekV3: { + title: "DeepSeek V3", + description: + "DeekSeek V3 reasoning model from DeepSeek", + params: { + title: "DeepSeek V3", + model: "DeepSeek-V3-0324", + contextLength: 8192, + }, + icon: "deepseek.png", + providerOptions: ["sambanova"], + isOpenSource: true, + }, AUTODETECT: { title: "Autodetect", description: diff --git a/gui/src/pages/AddNewModel/configs/providers.ts b/gui/src/pages/AddNewModel/configs/providers.ts index 43a3bbe4c..b6654ea01 100644 --- a/gui/src/pages/AddNewModel/configs/providers.ts +++ b/gui/src/pages/AddNewModel/configs/providers.ts @@ -764,20 +764,17 @@ To get started, [register](https://dataplatform.cloud.ibm.com/registration/stepo ...completionParamsInputsConfigs, ], packages:[ - models.qwen25Coder32BInstruct, + models.llama4Scout, + models.llama4Maverick, models.llama3370BInstruct, models.llama318BInstruct, - models.llama3170BInstruct, models.llama31405BInstruct, - models.llama31Tulu3405B, models.llama321BInstruct, models.llama323BInstruct, - models.llama3211BInstruct, - models.llama3290BInstruct, - models.qwen2572BInstruct, - models.qwq32BPreview, + models.qwq32B, models.deepseekR1DistillLlama70B, models.deepseekR1, + models.deepseekV3 ], apiKeyUrl: "https://cloud.sambanova.ai/apis", }, From 82d8e1e6795e7258880d414c4bb78c6f83b17883 Mon Sep 17 00:00:00 2001 From: "yiliang.zhang" Date: Tue, 22 Apr 2025 17:19:34 +0800 Subject: [PATCH 15/30] feat: supports agent 4 deepseek --- core/llm/toolSupport.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/llm/toolSupport.ts b/core/llm/toolSupport.ts index 3d0d72cc8..cd561885b 100644 --- a/core/llm/toolSupport.ts +++ b/core/llm/toolSupport.ts @@ -123,4 +123,9 @@ export const PROVIDER_TOOL_SUPPORT: Record< return true; } }, + deepseek: (model) => { + if(model !== "deepseek-reasoner") { + return true; + } + } }; From 4de8c191b85d3d7c5a0ab9470046dd1385cad942 Mon Sep 17 00:00:00 2001 From: Damian Kalinowski Date: Tue, 22 Apr 2025 16:46:22 +0200 Subject: [PATCH 16/30] save --- .../more/openvino_model_server.mdx | 30 +++++++++++++++++++ docs/docusaurus.config.js | 5 ++++ 2 files changed, 35 insertions(+) create mode 100644 docs/docs/customize/model-providers/more/openvino_model_server.mdx diff --git a/docs/docs/customize/model-providers/more/openvino_model_server.mdx b/docs/docs/customize/model-providers/more/openvino_model_server.mdx new file mode 100644 index 000000000..8f792f3b3 --- /dev/null +++ b/docs/docs/customize/model-providers/more/openvino_model_server.mdx @@ -0,0 +1,30 @@ +# OpenVINO™ Model Server + +:::info +[**OpenVINO™ Mode Server**](https://github.com/openvinotoolkit/model_server) is scalable inference server for models optimized with OpenVINO™ for Intel CPU, iGPU, GPU and NPU. +::: + +OpenVINO™ Mode Server supports text generation via OpenAI Chat Completions API. Simply select OpenAI provider to point `apiBase` to running OVMS instance. Refer [to this demo](https://docs.openvino.ai/2025/model-server/ovms_demos_code_completion_vsc.html) on official OVMS documentation to easily set up your own local server. + +Example configuration once OVMS is launched: + +```yaml title="config.yaml" +models: + - name: OVMS CodeLlama-7b-Instruct-hf + provider: openai + model: codellama/CodeLlama-7b-Instruct-hf + apiKey: unused + apiBase: http://localhost:5555/v3 + roles: + - chat + - edit + - apply + - name: OVMS Qwen2.5-Coder-1.5B + provider: openai + model: Qwen/Qwen2.5-Coder-1.5B + apiKey: unused + apiBase: http://localhost:5555/v3 + roles: + - autocomplete +``` + diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 06e717ad7..503073028 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -436,6 +436,11 @@ const config = { to: "/customize/model-providers/more/openrouter", from: "/reference/Model Providers/openrouter", }, + , + { + to: "/customize/model-providers/more/openvino_model_server", + from: "/reference/Model Providers/openvino_model_server", + } { to: "/customize/model-providers/more/replicatellm", from: "/reference/Model Providers/replicatellm", From e64cfa6769224e19b1128facc593b4a1c7fa8614 Mon Sep 17 00:00:00 2001 From: jhpiedrahitao Date: Tue, 22 Apr 2025 15:31:31 -0500 Subject: [PATCH 17/30] update cloud url --- docs/docs/customize/tutorials/llama3.1.mdx | 2 +- .../current/customize/model-providers/more/SambaNova.md | 3 +-- .../current/customize/tutorials/llama3.1.md | 2 +- extensions/vscode/config_schema.json | 2 +- gui/src/pages/AddNewModel/configs/providers.ts | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/docs/customize/tutorials/llama3.1.mdx b/docs/docs/customize/tutorials/llama3.1.mdx index bb65be947..23d7d38a9 100644 --- a/docs/docs/customize/tutorials/llama3.1.mdx +++ b/docs/docs/customize/tutorials/llama3.1.mdx @@ -153,7 +153,7 @@ Replicate makes it easy to host and run open-source AI with an API. SambaNova Cloud provides world record Llama3.1 70B/405B serving. -1. Create an account [here](https://cloud.sambanova.ai/) +1. Create an account [here](http://cloud.sambanova.ai?utm_source=continue&utm_medium=external&utm_campaign=cloud_signup ) 2. Copy your API key 3. Update your Continue config file like this: diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/model-providers/more/SambaNova.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/model-providers/more/SambaNova.md index 79e142ca9..d53afe6e7 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/model-providers/more/SambaNova.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/model-providers/more/SambaNova.md @@ -1,7 +1,6 @@ # SambaNova Cloud -SambaNova 云是一个运行大型 AI 模型的云平台,有 Llama 3.1 70B/405B 性能的世界记录。你可以在 [这里](https://cloud.sambanova.ai/) 登录,在最初的欢迎屏幕复制你的 API key ,然后在 [模型列表](https://community.sambanova.ai/t/quick-start-guide/104) 任何模型上点击 play 按钮。 - +SambaNova 云是一个运行大型 AI 模型的云平台,有 Llama 3.1 70B/405B 性能的世界记录。你可以在 [这里](http://cloud.sambanova.ai?utm_source=continue&utm_medium=external&utm_campaign=cloud_signup ) 登录,在最初的欢迎屏幕复制你的 API key ,然后在 [模型列表](https://community.sambanova.ai/t/quick-start-guide/104) 任何模型上点击 play 按钮。 ```json title="config.json" { "models": [ diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/tutorials/llama3.1.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/tutorials/llama3.1.md index 877864a15..674b3dcbe 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/tutorials/llama3.1.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/tutorials/llama3.1.md @@ -95,7 +95,7 @@ Replicate 让使用 API 托管和运行开源 AI 变得简单。 SambaNova Cloud 提供 Llama3.1 70B/405B 服务的世界记录。 -1. 创建账号 [在这里](https://cloud.sambanova.ai/) +1. 创建账号 [在这里](http://cloud.sambanova.ai?utm_source=continue&utm_medium=external&utm_campaign=cloud_signup) 2. 复制你的 API key 3. 更新你的 Continue 配置文件像这样: diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 462f69983..4cfb97381 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -250,7 +250,7 @@ "### Msty\nMsty is the simplest way to get started with online or local LLMs on all desktop platforms - Windows, Mac, and Linux. No fussing around, one-click and you are up and running. To get started, follow these steps:\n1. Download from [Msty.app](https://msty.app/), open the application, and click 'Setup Local AI'.\n2. Go to the Local AI Module page and download a model of your choice.\n3. Once the model has finished downloading, you can start asking questions through Continue.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/Msty)", "### IBM watsonx\nwatsonx, developed by IBM, offers a variety of pre-trained AI foundation models that can be used for natural language processing (NLP), computer vision, and speech recognition tasks.", "### OpenRouter\nOpenRouter offers a single API to access almost any language model. To get started, obtain an API key from [their console](https://openrouter.ai/settings/keys).", - "### SambaNova\n SambaNova provides fast inference of open-source language models with zero data retention. To get started, obtain an API key in [SambaNova Cloud](https://cloud.sambanova.ai/apis).", + "### SambaNova\n SambaNova provides fast inference of open-source language models with zero data retention. To get started, obtain an API key in [SambaNova Cloud](https://cloud.sambanova.ai/apis?utm_source=continue&utm_medium=external&utm_campaign=cloud_signup ).", "### NVIDIA NIMs\nNVIDIA offers a single API to access almost any language model. To find out more, visit the [LLM APIs Documentation](https://docs.api.nvidia.com/nim/reference/llm-apis).\nFor information specific to getting a key, please check out the [docs here](https://docs.nvidia.com/nim/large-language-models/latest/getting-started.html#option-1-from-api-catalog)", "### vLLM\nvLLM is a highly performant way of hosting LLMs for a team. To get started, follow their [quickstart](https://docs.vllm.ai/en/latest/getting_started/quickstart.html) to set up your server.", "### Cerebras\nCerebras Inference uses specialized silicon to provides superfast inference. To get started, get your API keys from [their console](https://cloud.cerebras.ai/).", diff --git a/gui/src/pages/AddNewModel/configs/providers.ts b/gui/src/pages/AddNewModel/configs/providers.ts index b6654ea01..50f23ec73 100644 --- a/gui/src/pages/AddNewModel/configs/providers.ts +++ b/gui/src/pages/AddNewModel/configs/providers.ts @@ -748,7 +748,7 @@ To get started, [register](https://dataplatform.cloud.ibm.com/registration/stepo refPage: "sambanova", description: "Use SambaNova Cloud for fast inference performance", icon: "sambanova.png", - longDescription: `The SambaNova Cloud is a cloud platform for running large open source AI models with the world record performance and zero data retention. You can sign up [here](https://cloud.sambanova.ai/)`, + longDescription: `The SambaNova Cloud is a cloud platform for running large open source AI models with the world record performance and zero data retention. You can sign up [here](http://cloud.sambanova.ai?utm_source=continue&utm_medium=external&utm_campaign=cloud_signup)`, tags: [ModelProviderTags.RequiresApiKey, ModelProviderTags.OpenSource], params: { apiKey: "", From efda8d8c9a03af085296212c975e6a61b9641236 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 23 Apr 2025 14:50:52 -0700 Subject: [PATCH 18/30] make updates to singleton --- core/context/mcp/MCPManagerSingleton.ts | 56 ++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/core/context/mcp/MCPManagerSingleton.ts b/core/context/mcp/MCPManagerSingleton.ts index 2f5031c8c..d0d7c0991 100644 --- a/core/context/mcp/MCPManagerSingleton.ts +++ b/core/context/mcp/MCPManagerSingleton.ts @@ -1,6 +1,11 @@ import { Client } from "@modelcontextprotocol/sdk/client/index.js"; -import { MCPOptions, MCPServerStatus } from "../.."; +import { + MCPOptions, + MCPServerStatus, + StdioOptions, + TransportOptions, +} from "../.."; import MCPConnection from "./MCPConnection"; export class MCPManagerSingleton { @@ -48,7 +53,17 @@ export class MCPManagerSingleton { // Remove any connections that are no longer in config Array.from(this.connections.entries()).forEach(([id, connection]) => { - if (!servers.find((s) => s.id === id)) { + if ( + !servers.find( + // Refresh the connection if TransportOptions changed + (s) => + s.id === id && + this.compareTransportOptions( + connection.options.transport, + s.transport, + ), + ) + ) { refresh = true; connection.abortController.abort(); void connection.client.close(); @@ -61,6 +76,12 @@ export class MCPManagerSingleton { if (!this.connections.has(server.id)) { refresh = true; this.connections.set(server.id, new MCPConnection(server)); + } else { + const conn = this.connections.get(server.id); + if (conn) { + // We need to update it. Some attributes may have changed, such as name, faviconUrl, etc. + conn.options = server; + } } }); @@ -70,6 +91,37 @@ export class MCPManagerSingleton { } } + private compareTransportOptions( + a: TransportOptions, + b: TransportOptions, + ): boolean { + if (a.type !== b.type) { + return false; + } + if (a.type === "stdio" && b.type === "stdio") { + return ( + a.command === b.command && + JSON.stringify(a.args) === JSON.stringify(b.args) && + this.compareEnv(a, b) + ); + } else if (a.type !== "stdio" && b.type !== "stdio") { + return a.url === b.url; + } + return false; + } + + private compareEnv(a: StdioOptions, b: StdioOptions): boolean { + const aEnv = a.env ?? {}; + const bEnv = b.env ?? {}; + const aKeys = Object.keys(aEnv); + const bKeys = Object.keys(bEnv); + + return ( + aKeys.length === bKeys.length && + aKeys.every((key) => aEnv[key] === bEnv[key]) + ); + } + async refreshConnection(serverId: string) { const connection = this.connections.get(serverId); if (!connection) { From e023241635d6aa046309de3e048db028b5a515c0 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 23 Apr 2025 16:45:37 -0700 Subject: [PATCH 19/30] add support for even more languages --- .../StyledMarkdownPreview/index.tsx | 12 ++----- .../rehypeHighlightPlugin.ts | 35 +++++++++++++++++++ 2 files changed, 37 insertions(+), 10 deletions(-) create mode 100644 gui/src/components/StyledMarkdownPreview/rehypeHighlightPlugin.ts diff --git a/gui/src/components/StyledMarkdownPreview/index.tsx b/gui/src/components/StyledMarkdownPreview/index.tsx index e7105931f..4f6e7f7a2 100644 --- a/gui/src/components/StyledMarkdownPreview/index.tsx +++ b/gui/src/components/StyledMarkdownPreview/index.tsx @@ -1,10 +1,6 @@ import { ctxItemToRifWithContents } from "core/commands/util"; -import clojure from "highlight.js/lib/languages/clojure"; -import Delphi from "highlight.js/lib/languages/Delphi"; -import { common } from "lowlight"; import { memo, useEffect, useMemo, useRef } from "react"; import { useRemark } from "react-remark"; -import rehypeHighlight, { Options } from "rehype-highlight"; import rehypeKatex from "rehype-katex"; import remarkMath from "remark-math"; import styled from "styled-components"; @@ -25,6 +21,7 @@ import { ToolTip } from "../gui/Tooltip"; import FilenameLink from "./FilenameLink"; import "./katex.css"; import "./markdown.css"; +import { rehypeHighlightPlugin } from "./rehypeHighlightPlugin"; import { StepContainerPreToolbar } from "./StepContainerPreToolbar"; import SymbolLink from "./SymbolLink"; import { SyntaxHighlightedPre } from "./SyntaxHighlightedPre"; @@ -257,12 +254,7 @@ const StyledMarkdownPreview = memo(function StyledMarkdownPreview( rehypePlugins: [ rehypeKatex as any, {}, - [ - rehypeHighlight, - { - languages: { ...common, clojure, Delphi }, - } as Options, - ], + rehypeHighlightPlugin(), // Note: An empty obj is the default behavior, but leaving this here for scaffolding to // add unsupported languages in the future. We will need to install the `lowlight` package // to use the `common` language set in addition to unsupported languages. diff --git a/gui/src/components/StyledMarkdownPreview/rehypeHighlightPlugin.ts b/gui/src/components/StyledMarkdownPreview/rehypeHighlightPlugin.ts new file mode 100644 index 000000000..0c959d488 --- /dev/null +++ b/gui/src/components/StyledMarkdownPreview/rehypeHighlightPlugin.ts @@ -0,0 +1,35 @@ +// Feel free to add more! +// See gui/node_modules/highlight.js/lib/languages for the full available list +import clojure from "highlight.js/lib/languages/clojure"; +import Delphi from "highlight.js/lib/languages/Delphi"; +import elixir from "highlight.js/lib/languages/elixir"; +import julia from "highlight.js/lib/languages/julia"; +import lisp from "highlight.js/lib/languages/lisp"; +import matlab from "highlight.js/lib/languages/matlab"; +import ocaml from "highlight.js/lib/languages/ocaml"; +import powershell from "highlight.js/lib/languages/powershell"; +import protobuf from "highlight.js/lib/languages/protobuf"; +import verilog from "highlight.js/lib/languages/verilog"; +import { common } from "lowlight"; +import rehypeHighlight, { Options } from "rehype-highlight"; + +export function rehypeHighlightPlugin() { + return [ + rehypeHighlight, + { + languages: { + ...common, + clojure, + Delphi, + elixir, + julia, + protobuf, + verilog, + powershell, + ocaml, + matlab, + lisp, + }, + } as Options, + ]; +} From b55c7b308c3781925f5e55655ed6b26c657c9847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Dywicki?= Date: Wed, 23 Apr 2025 16:45:37 -0700 Subject: [PATCH 20/30] delphi didn't exist according to tests --- .../StyledMarkdownPreview/index.tsx | 12 ++----- .../rehypeHighlightPlugin.ts | 33 +++++++++++++++++++ 2 files changed, 35 insertions(+), 10 deletions(-) create mode 100644 gui/src/components/StyledMarkdownPreview/rehypeHighlightPlugin.ts diff --git a/gui/src/components/StyledMarkdownPreview/index.tsx b/gui/src/components/StyledMarkdownPreview/index.tsx index e7105931f..4f6e7f7a2 100644 --- a/gui/src/components/StyledMarkdownPreview/index.tsx +++ b/gui/src/components/StyledMarkdownPreview/index.tsx @@ -1,10 +1,6 @@ import { ctxItemToRifWithContents } from "core/commands/util"; -import clojure from "highlight.js/lib/languages/clojure"; -import Delphi from "highlight.js/lib/languages/Delphi"; -import { common } from "lowlight"; import { memo, useEffect, useMemo, useRef } from "react"; import { useRemark } from "react-remark"; -import rehypeHighlight, { Options } from "rehype-highlight"; import rehypeKatex from "rehype-katex"; import remarkMath from "remark-math"; import styled from "styled-components"; @@ -25,6 +21,7 @@ import { ToolTip } from "../gui/Tooltip"; import FilenameLink from "./FilenameLink"; import "./katex.css"; import "./markdown.css"; +import { rehypeHighlightPlugin } from "./rehypeHighlightPlugin"; import { StepContainerPreToolbar } from "./StepContainerPreToolbar"; import SymbolLink from "./SymbolLink"; import { SyntaxHighlightedPre } from "./SyntaxHighlightedPre"; @@ -257,12 +254,7 @@ const StyledMarkdownPreview = memo(function StyledMarkdownPreview( rehypePlugins: [ rehypeKatex as any, {}, - [ - rehypeHighlight, - { - languages: { ...common, clojure, Delphi }, - } as Options, - ], + rehypeHighlightPlugin(), // Note: An empty obj is the default behavior, but leaving this here for scaffolding to // add unsupported languages in the future. We will need to install the `lowlight` package // to use the `common` language set in addition to unsupported languages. diff --git a/gui/src/components/StyledMarkdownPreview/rehypeHighlightPlugin.ts b/gui/src/components/StyledMarkdownPreview/rehypeHighlightPlugin.ts new file mode 100644 index 000000000..227b77d1f --- /dev/null +++ b/gui/src/components/StyledMarkdownPreview/rehypeHighlightPlugin.ts @@ -0,0 +1,33 @@ +// Feel free to add more! +// See gui/node_modules/highlight.js/lib/languages for the full available list +import clojure from "highlight.js/lib/languages/clojure"; +import elixir from "highlight.js/lib/languages/elixir"; +import julia from "highlight.js/lib/languages/julia"; +import lisp from "highlight.js/lib/languages/lisp"; +import matlab from "highlight.js/lib/languages/matlab"; +import ocaml from "highlight.js/lib/languages/ocaml"; +import powershell from "highlight.js/lib/languages/powershell"; +import protobuf from "highlight.js/lib/languages/protobuf"; +import verilog from "highlight.js/lib/languages/verilog"; +import { common } from "lowlight"; +import rehypeHighlight, { Options } from "rehype-highlight"; + +export function rehypeHighlightPlugin() { + return [ + rehypeHighlight, + { + languages: { + ...common, + clojure, + elixir, + julia, + protobuf, + verilog, + powershell, + ocaml, + matlab, + lisp, + }, + } as Options, + ]; +} From 08d1b5de3a7af64ea279172d597946341cc24eda Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Fri, 25 Apr 2025 09:47:07 +0530 Subject: [PATCH 21/30] load new session for initialized new chat session --- .../components/modelSelection/ModeSelect.tsx | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/gui/src/components/modelSelection/ModeSelect.tsx b/gui/src/components/modelSelection/ModeSelect.tsx index 92395f545..3bb1c6f9b 100644 --- a/gui/src/components/modelSelection/ModeSelect.tsx +++ b/gui/src/components/modelSelection/ModeSelect.tsx @@ -8,9 +8,10 @@ import { } from "@heroicons/react/24/outline"; import { MessageModes } from "core"; import { modelSupportsTools } from "core/llm/autodetect"; -import { useEffect, useMemo } from "react"; +import { useEffect, useMemo, useState } from "react"; import styled from "styled-components"; import { lightGray } from ".."; +import { useWebviewListener } from "../../hooks/useWebviewListener"; import { useAppDispatch, useAppSelector } from "../../redux/hooks"; import { selectSelectedChatModel } from "../../redux/slices/configSlice"; import { @@ -41,6 +42,8 @@ function ModeSelect() { const dispatch = useAppDispatch(); const mode = useAppSelector(selectCurrentMode); const selectedModel = useAppSelector(selectSelectedChatModel); + const currentSession = useAppSelector((state) => state.session); + const [newChatSessionInitialized, setNewChatSessionInitialized] = useState(false); const agentModeSupported = selectedModel && modelSupportsTools(selectedModel); const jetbrains = useMemo(() => { @@ -83,6 +86,16 @@ function ModeSelect() { return () => document.removeEventListener("keydown", handleKeyDown); }, [dispatch, mode, jetbrains]); + useWebviewListener("newSession", async () => { + setNewChatSessionInitialized(true); + }); + + useEffect(() => { + if (currentSession.history.length > 0) { + setNewChatSessionInitialized(false); + } + }, [currentSession.history]); + return ( Date: Fri, 25 Apr 2025 09:52:37 +0530 Subject: [PATCH 22/30] rename variables --- gui/src/components/modelSelection/ModeSelect.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gui/src/components/modelSelection/ModeSelect.tsx b/gui/src/components/modelSelection/ModeSelect.tsx index 3bb1c6f9b..b4cb94545 100644 --- a/gui/src/components/modelSelection/ModeSelect.tsx +++ b/gui/src/components/modelSelection/ModeSelect.tsx @@ -43,7 +43,7 @@ function ModeSelect() { const mode = useAppSelector(selectCurrentMode); const selectedModel = useAppSelector(selectSelectedChatModel); const currentSession = useAppSelector((state) => state.session); - const [newChatSessionInitialized, setNewChatSessionInitialized] = useState(false); + const [newSessionInitialized, setNewSessionInitialized] = useState(false); const agentModeSupported = selectedModel && modelSupportsTools(selectedModel); const jetbrains = useMemo(() => { @@ -87,12 +87,12 @@ function ModeSelect() { }, [dispatch, mode, jetbrains]); useWebviewListener("newSession", async () => { - setNewChatSessionInitialized(true); + setNewSessionInitialized(true); }); useEffect(() => { if (currentSession.history.length > 0) { - setNewChatSessionInitialized(false); + setNewSessionInitialized(false); } }, [currentSession.history]); @@ -104,8 +104,8 @@ function ModeSelect() { return; } dispatch(setMode(newMode)); - if (newMode === "edit" || newChatSessionInitialized) { - // generate a new session for edit mode and if user opened a new chat explicitly + if (newMode === "edit" || newSessionInitialized) { + // generate a new session for edit mode and if user opened a new session explicitly await dispatch( saveCurrentSession({ generateTitle: false, From 9c80006a5013db49e5b69c54fc702fe967ecb9a1 Mon Sep 17 00:00:00 2001 From: Amgad Hasan <109704569+AmgadHasan@users.noreply.github.com> Date: Mon, 28 Apr 2025 15:10:00 +0300 Subject: [PATCH 23/30] Update azure.mdx --- docs/docs/customize/model-providers/top-level/azure.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/customize/model-providers/top-level/azure.mdx b/docs/docs/customize/model-providers/top-level/azure.mdx index 2c201d938..8202d5608 100644 --- a/docs/docs/customize/model-providers/top-level/azure.mdx +++ b/docs/docs/customize/model-providers/top-level/azure.mdx @@ -143,7 +143,7 @@ For example, a Target URI of `https://just-an-example.openai.azure.com/openai/de models: - name: GPT-4o Azure model: gpt-4o - provider: openai + provider: azure apiBase: https://just-an-example.openai.azure.com apiKey: env: @@ -157,7 +157,7 @@ For example, a Target URI of `https://just-an-example.openai.azure.com/openai/de { "title": "GPT-4o Azure", "model": "gpt-4o", - "provider": "openai", + "provider": "azure", "apiBase": "https://just-an-example.openai.azure.com", "deployment": "gpt-4o-july", "apiVersion": "2023-03-15-preview", From aaf4a2b7cbc9914158ae9347090779c0c1821110 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Tue, 29 Apr 2025 11:33:55 +0530 Subject: [PATCH 24/30] do not allow to toggle settings page --- extensions/vscode/package.json | 10 ---------- extensions/vscode/src/commands.ts | 5 +---- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 815eedcfa..079e05660 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -220,12 +220,6 @@ "icon": "$(gear)", "group": "Continue" }, - { - "command": "continue.openConfigPageFromPalette", - "category": "Continue", - "title": "Open Settings", - "group": "Continue" - }, { "command": "continue.toggleTabAutocompleteEnabled", "category": "Continue", @@ -445,10 +439,6 @@ }, { "command": "continue.newSession" - }, - { - "command": "continue.openConfigPage", - "when": "false" } ], "editor/context": [ diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index eb841a744..8a5a4ae99 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -794,11 +794,8 @@ const getCommandsMap: ( vscode.commands.executeCommand("workbench.action.copyEditorToNewWindow"); vscode.commands.executeCommand("workbench.action.closeAuxiliaryBar"); }, - "continue.openConfigPageFromPalette": () => { - vscode.commands.executeCommand("continue.navigateTo", "/config", false); - }, "continue.openConfigPage": () => { - vscode.commands.executeCommand("continue.navigateTo", "/config", true); + vscode.commands.executeCommand("continue.navigateTo", "/config", false); }, "continue.selectFilesAsContext": async ( firstUri: vscode.Uri, From 56a74ad4d46c1692da98a23cc7c138004bebcacc Mon Sep 17 00:00:00 2001 From: Jazzcort Date: Tue, 29 Apr 2025 08:51:40 -0400 Subject: [PATCH 25/30] Fix conflicts Resolved the type error by changing "top-middle" to "top" for place attribute in ToolTip. --- gui/src/components/mainInput/InputToolbar.tsx | 6 +++--- .../components/mainInput/Lump/BlockSettingsTopToolbar.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gui/src/components/mainInput/InputToolbar.tsx b/gui/src/components/mainInput/InputToolbar.tsx index a5469a03a..4690f683d 100644 --- a/gui/src/components/mainInput/InputToolbar.tsx +++ b/gui/src/components/mainInput/InputToolbar.tsx @@ -93,13 +93,13 @@ function InputToolbar(props: InputToolbarProps) {
- + Select Mode - + Select Model @@ -224,7 +224,7 @@ function InputToolbar(props: InputToolbarProps) { ⏎ {props.toolbarOptions?.enterText ?? "Enter"} ⏎ - + Send (⏎) diff --git a/gui/src/components/mainInput/Lump/BlockSettingsTopToolbar.tsx b/gui/src/components/mainInput/Lump/BlockSettingsTopToolbar.tsx index 5a651034b..b9b27aa92 100644 --- a/gui/src/components/mainInput/Lump/BlockSettingsTopToolbar.tsx +++ b/gui/src/components/mainInput/Lump/BlockSettingsTopToolbar.tsx @@ -193,7 +193,7 @@ export function BlockSettingsTopToolbar() {
- + Select Assistant From e72f891de55a71a45290b8393cb5bb7ca68dd586 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 29 Apr 2025 08:45:28 -0700 Subject: [PATCH 26/30] adjustments --- .../customize/model-providers/more/morph.mdx | 37 +++++++++++++++++++ docs/docs/customize/model-roles/apply.mdx | 4 +- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 docs/docs/customize/model-providers/more/morph.mdx diff --git a/docs/docs/customize/model-providers/more/morph.mdx b/docs/docs/customize/model-providers/more/morph.mdx new file mode 100644 index 000000000..707ea5d45 --- /dev/null +++ b/docs/docs/customize/model-providers/more/morph.mdx @@ -0,0 +1,37 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# Morph + +Morph provides a fast apply model that helps you quickly and accurately apply code changes from chat suggestions to your files. It's optimized for speed and precision when integrating generated code into your existing codebase. You can sign up for Morph's generous free tier [here](https://morphllm.com/dashboard). Then, update your configuration file as follows: + + + + ```yaml title="config.yaml" + models: + - uses: morphllm/morph-v0 + with: + MORPH_API_KEY: ${{ secrets.MORPH_API_KEY }} + ``` + + + ```json title="config.json" + { + "models": [ + { + "title": "Morph Fast Apply", + "provider": "openai", + "model": "morph-v0", + "apiKey": "", + "apiBase": "https://api.morphllm.com/v1/", + "roles": ["apply", "chat"], + "promptTemplates": { + "apply": "{{{ original_code }}}\n{{{ new_code }}}" + } + } + ] + } + ``` + + + diff --git a/docs/docs/customize/model-roles/apply.mdx b/docs/docs/customize/model-roles/apply.mdx index 040cdaa2e..ee64859fd 100644 --- a/docs/docs/customize/model-roles/apply.mdx +++ b/docs/docs/customize/model-roles/apply.mdx @@ -12,7 +12,7 @@ When editing code, Chat and Edit model output often doesn't clearly align with e ## Recommended Apply models -We recommend [Relace's Instant Apply model](https://hub.continue.dev/relace/instant-apply) for the fastest Apply experience. You can get an API key [here](https://app.relace.ai/settings/api-keys). +We recommend [Morph Fast Apply](https://morphllm.com) or [Relace's Instant Apply model](https://hub.continue.dev/relace/instant-apply) for the fastest Apply experience. You can sign up for Morph's free tier [here](https://morphllm.com/dashboard) or get a Relace API key [here](https://app.relace.ai/settings/api-keys). However, most Chat models can also be used for applying code changes. We recommend smaller/cheaper models for the task, such as Claude 3.5 Haiku. @@ -42,4 +42,4 @@ models: New: {{{new_code}}} Please generate the final code without any markers or explanations. -``` +``` \ No newline at end of file From 2a41f95a93572eb0e63e7eea53c2e7b63eb003d2 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 29 Apr 2025 09:28:18 -0700 Subject: [PATCH 27/30] more inception fixes --- core/llm/llms/Inception.ts | 4 +- packages/openai-adapters/package-lock.json | 4 +- packages/openai-adapters/package.json | 2 +- .../openai-adapters/src/apis/Inception.ts | 58 +++++++++++++++++++ packages/openai-adapters/src/index.ts | 3 + packages/openai-adapters/src/types.ts | 6 ++ 6 files changed, 72 insertions(+), 5 deletions(-) create mode 100644 packages/openai-adapters/src/apis/Inception.ts diff --git a/core/llm/llms/Inception.ts b/core/llm/llms/Inception.ts index 21e43130e..2d75ca86b 100644 --- a/core/llm/llms/Inception.ts +++ b/core/llm/llms/Inception.ts @@ -23,7 +23,7 @@ class Inception extends OpenAI { completionOptions: { temperature: 0.0, presencePenalty: 1.5, - stop: ["\n\n", "\n \n", "<|endoftext|>"], + stop: ["<|endoftext|>"], model: "mercury-editor-small-experimental", // Added model to fix TypeScript error }, }; @@ -50,7 +50,7 @@ class Inception extends OpenAI { top_p: options.topP, frequency_penalty: options.frequencyPenalty, presence_penalty: options.presencePenalty, - stop: options.stop, + stop: [...(options.stop ?? []), "\n\n", "\n \n"], stream: true, }), headers: { diff --git a/packages/openai-adapters/package-lock.json b/packages/openai-adapters/package-lock.json index 1105fc178..c069bf45e 100644 --- a/packages/openai-adapters/package-lock.json +++ b/packages/openai-adapters/package-lock.json @@ -1,12 +1,12 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.20", + "version": "1.0.21", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@continuedev/openai-adapters", - "version": "1.0.20", + "version": "1.0.21", "license": "Apache-2.0", "dependencies": { "@azure/openai": "^1.0.0-beta.12", diff --git a/packages/openai-adapters/package.json b/packages/openai-adapters/package.json index b20aca1d0..766b93eb5 100644 --- a/packages/openai-adapters/package.json +++ b/packages/openai-adapters/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.20", + "version": "1.0.21", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/openai-adapters/src/apis/Inception.ts b/packages/openai-adapters/src/apis/Inception.ts new file mode 100644 index 000000000..35d585bb8 --- /dev/null +++ b/packages/openai-adapters/src/apis/Inception.ts @@ -0,0 +1,58 @@ +import { streamSse } from "@continuedev/fetch"; +import { ChatCompletionChunk, Model } from "openai/resources/index"; +import { InceptionConfig } from "../types.js"; +import { chatChunk, customFetch } from "../util.js"; +import { OpenAIApi } from "./OpenAI.js"; +import { FimCreateParamsStreaming } from "./base.js"; + +export class InceptionApi extends OpenAIApi { + apiBase: string = "https://api.inceptionlabs.ai/v1/"; + constructor(config: InceptionConfig) { + super({ + ...config, + provider: "openai", + }); + } + + async *fimStream( + body: FimCreateParamsStreaming, + signal: AbortSignal, + ): AsyncGenerator { + const endpoint = new URL("completions", this.apiBase); + const resp = await customFetch(this.config.requestOptions)(endpoint, { + method: "POST", + body: JSON.stringify({ + model: body.model, + prompt: body.prompt, + suffix: body.suffix.trim() === "" ? "<|endoftext|>" : body.suffix, + max_tokens: body.max_tokens ?? 150, // Only want this for /fim, not chat + temperature: body.temperature, + top_p: body.top_p, + frequency_penalty: body.frequency_penalty, + presence_penalty: body.presence_penalty, + stop: [...(body.stop ?? []), "\n\n", "\n \n"], + stream: true, + }), + headers: { + "Content-Type": "application/json", + Accept: "application/json", + Authorization: `Bearer ${this.config.apiKey}`, + }, + signal, + }); + for await (const chunk of streamSse(resp as any)) { + if (!chunk.choices[0]) { + continue; + } + yield chatChunk({ + content: chunk.choices[0].text, + finish_reason: null, + model: body.model, + }); + } + } + + list(): Promise { + throw new Error("Method not implemented."); + } +} diff --git a/packages/openai-adapters/src/index.ts b/packages/openai-adapters/src/index.ts index 05e43fc20..8cda78931 100644 --- a/packages/openai-adapters/src/index.ts +++ b/packages/openai-adapters/src/index.ts @@ -6,6 +6,7 @@ import { BaseLlmApi } from "./apis/base.js"; import { CohereApi } from "./apis/Cohere.js"; import { DeepSeekApi } from "./apis/DeepSeek.js"; import { GeminiApi } from "./apis/Gemini.js"; +import { InceptionApi } from "./apis/Inception.js"; import { JinaApi } from "./apis/Jina.js"; import { MockApi } from "./apis/Mock.js"; import { MoonshotApi } from "./apis/Moonshot.js"; @@ -45,6 +46,8 @@ export function constructLlmApi(config: LLMConfig): BaseLlmApi | undefined { return new MoonshotApi(config); case "relace": return new RelaceApi(config); + case "inception": + return new InceptionApi(config); case "x-ai": return openAICompatible("https://api.x.ai/v1/", config); case "voyage": diff --git a/packages/openai-adapters/src/types.ts b/packages/openai-adapters/src/types.ts index 04f0b0c12..93edcc99b 100644 --- a/packages/openai-adapters/src/types.ts +++ b/packages/openai-adapters/src/types.ts @@ -103,6 +103,11 @@ export const JinaConfigSchema = OpenAIConfigSchema.extend({ }); export type JinaConfig = z.infer; +export const InceptionConfigSchema = OpenAIConfigSchema.extend({ + provider: z.literal("inception"), +}); +export type InceptionConfig = z.infer; + // Discriminated union export const LLMConfigSchema = z.discriminatedUnion("provider", [ OpenAIConfigSchema, @@ -114,5 +119,6 @@ export const LLMConfigSchema = z.discriminatedUnion("provider", [ AnthropicConfigSchema, JinaConfigSchema, MockConfigSchema, + InceptionConfigSchema, ]); export type LLMConfig = z.infer; From dc05bf949cb2e03df9e98cb7924e89d0f1412889 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 29 Apr 2025 09:58:31 -0700 Subject: [PATCH 28/30] don't show warning message if copy buffer service fails to register (it's not critical enough to bring to the user's attention) --- extensions/vscode/src/commands.ts | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index 3d47a16a0..10bddead5 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -382,6 +382,7 @@ const getCommandsMap: ( range, ); } + return { "continue.acceptDiff": async (newFileUri?: string, streamId?: string) => processDiff( @@ -950,7 +951,7 @@ const getCommandsMap: ( if (core.configHandler.currentProfile?.profileDescription.id) { core.invoke("config/updateSelectedModel", { profileId: - core.configHandler.currentProfile?.profileDescription.id, + core.configHandler.currentProfile?.profileDescription.id, role: "autocomplete", title: selectedOption, }); @@ -1129,7 +1130,7 @@ export function registerAllCommands( //Non-critical error, it needs to be intercepted and not prevent the extension from starting console.log("Error registering CopyBufferService: ", e); Telemetry.capture( - "vscode_extension_activation_error", + "vscode_extension_copy_buffer_failure", { stack: extractMinimalStackTraceInfo(e.stack), message: e.message, @@ -1137,13 +1138,5 @@ export function registerAllCommands( false, true, ); - vscode.window.showWarningMessage( - "Failed to override 'editor.action.clipboardCopyAction'. Continue will not have access to the clipboard.", - "View Logs", - ).then((selection) => { - if (selection === "View Logs") { - vscode.commands.executeCommand("continue.viewLogs"); - } - }); } } From a1e89f6a56c5aba2bb0a34aded2eba8d8900240d Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 29 Apr 2025 10:57:07 -0700 Subject: [PATCH 29/30] fix docusaurus.config.js --- docs/docusaurus.config.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 503073028..c12f063da 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -5,7 +5,7 @@ const { themes } = require("prism-react-renderer"); const lightCodeTheme = themes.github; const darkCodeTheme = themes.dracula; -/** @type {import('@docusaurus/types').Config} */ +/** @type {import("@docusaurus/types").Config} */ const config = { // Docusaurus V3.6 experimental faster compile features // https://docusaurus.io/blog/releases/3.6#adoption-strategy @@ -48,7 +48,7 @@ const config = { presets: [ [ "classic", - /** @type {import('@docusaurus/preset-classic').Options} */ + /** @type {import("@docusaurus/preset-classic").Options} */ ({ docs: { routeBasePath: "/", @@ -66,7 +66,7 @@ const config = { ], themeConfig: - /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ + /** @type {import("@docusaurus/preset-classic").ThemeConfig} */ ({ metadata: [ { @@ -436,11 +436,6 @@ const config = { to: "/customize/model-providers/more/openrouter", from: "/reference/Model Providers/openrouter", }, - , - { - to: "/customize/model-providers/more/openvino_model_server", - from: "/reference/Model Providers/openvino_model_server", - } { to: "/customize/model-providers/more/replicatellm", from: "/reference/Model Providers/replicatellm", From dba288748d850c7fa8047efb75e954384410a497 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Tue, 29 Apr 2025 11:45:55 -0700 Subject: [PATCH 30/30] feat: hover brightness on tool call div --- extensions/vscode/package-lock.json | 4 ++-- gui/src/pages/gui/ToolCallDiv/SimpleToolCallUI.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index e4d639766..11ba33c30 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "1.1.26", + "version": "1.1.28", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "1.1.26", + "version": "1.1.28", "license": "Apache-2.0", "dependencies": { "@continuedev/fetch": "^1.0.3", diff --git a/gui/src/pages/gui/ToolCallDiv/SimpleToolCallUI.tsx b/gui/src/pages/gui/ToolCallDiv/SimpleToolCallUI.tsx index f88b6fdac..d041943b5 100644 --- a/gui/src/pages/gui/ToolCallDiv/SimpleToolCallUI.tsx +++ b/gui/src/pages/gui/ToolCallDiv/SimpleToolCallUI.tsx @@ -32,7 +32,7 @@ export function SimpleToolCallUI({ }, [toolCallState.parsedArgs]); return ( -
+