Merge branch 'main' into nate/fixes-145
This commit is contained in:
commit
2891d1a3e8
51 changed files with 711 additions and 262 deletions
|
|
@ -203,6 +203,24 @@ async function serializedToIntermediateConfig(
|
|||
return config;
|
||||
}
|
||||
|
||||
// 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 {
|
||||
|
|
@ -311,14 +329,12 @@ 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)
|
||||
|
|
@ -372,6 +388,8 @@ 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
|
||||
|
||||
|
|
|
|||
|
|
@ -931,6 +931,7 @@ declare global {
|
|||
numThreads?: number;
|
||||
useMmap?: boolean;
|
||||
keepAlive?: number;
|
||||
numGpu?: number;
|
||||
raw?: boolean;
|
||||
stream?: boolean;
|
||||
prediction?: Prediction;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import {
|
|||
MCPTool,
|
||||
} from "../..";
|
||||
|
||||
const DEFAULT_MCP_TIMEOUT = 20_000; // 10 seconds
|
||||
export const DEFAULT_MCP_TIMEOUT = 20_000; // 10 seconds
|
||||
|
||||
class MCPConnection {
|
||||
public client: Client;
|
||||
|
|
@ -30,7 +30,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(
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
import isLocalhost from "is-localhost-ip";
|
||||
import {
|
||||
ContextItem,
|
||||
ContextProviderDescription,
|
||||
ContextProviderExtras,
|
||||
IDE,
|
||||
} from "../../index.js";
|
||||
import { BaseContextProvider } from "../index.js";
|
||||
|
||||
|
|
@ -14,6 +16,19 @@ class HttpContextProvider extends BaseContextProvider {
|
|||
renderInlineAs: "",
|
||||
};
|
||||
|
||||
private async getWorkspacePath(ide: IDE, url: URL) {
|
||||
try {
|
||||
const currentFile = await ide.getCurrentFile();
|
||||
// `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
|
||||
} catch (e) {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
override get description(): ContextProviderDescription {
|
||||
return {
|
||||
title: this.options.title || HttpContextProvider.description.title,
|
||||
|
|
@ -34,7 +49,8 @@ class HttpContextProvider extends BaseContextProvider {
|
|||
query: string,
|
||||
extras: ContextProviderExtras,
|
||||
): Promise<ContextItem[]> {
|
||||
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",
|
||||
|
|
@ -44,6 +60,7 @@ class HttpContextProvider extends BaseContextProvider {
|
|||
query: query || "",
|
||||
fullInput: extras.fullInput,
|
||||
options: this.options.options,
|
||||
workspacePath: await this.getWorkspacePath(extras.ide, parsedUrl),
|
||||
}),
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ const modelDescriptionSchema = z.object({
|
|||
"sagemaker",
|
||||
"cloudflare",
|
||||
"azure",
|
||||
"ovhcloud",
|
||||
"nebius",
|
||||
"siliconflow",
|
||||
"scaleway",
|
||||
|
|
@ -59,6 +60,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(),
|
||||
})
|
||||
|
|
@ -86,6 +88,7 @@ const embeddingsProviderSchema = z.object({
|
|||
"cohere",
|
||||
"free-trial",
|
||||
"gemini",
|
||||
"ovhcloud",
|
||||
"nebius",
|
||||
"siliconflow",
|
||||
"scaleway",
|
||||
|
|
|
|||
1
core/index.d.ts
vendored
1
core/index.d.ts
vendored
|
|
@ -1021,6 +1021,7 @@ export interface BaseCompletionOptions {
|
|||
numThreads?: number;
|
||||
useMmap?: boolean;
|
||||
keepAlive?: number;
|
||||
numGpu?: number;
|
||||
raw?: boolean;
|
||||
stream?: boolean;
|
||||
prediction?: Prediction;
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ const PROVIDER_SUPPORTS_IMAGES: string[] = [
|
|||
"azure",
|
||||
"scaleway",
|
||||
"nebius",
|
||||
"ovhcloud"
|
||||
];
|
||||
|
||||
const MODEL_SUPPORTS_IMAGES: string[] = [
|
||||
|
|
@ -95,6 +96,7 @@ const MODEL_SUPPORTS_IMAGES: string[] = [
|
|||
"pixtral",
|
||||
"llama3.2",
|
||||
"llama-3.2",
|
||||
"llama4"
|
||||
];
|
||||
|
||||
function modelSupportsTools(modelDescription: ModelDescription) {
|
||||
|
|
@ -147,6 +149,7 @@ const PARALLEL_PROVIDERS: string[] = [
|
|||
"together",
|
||||
"novita",
|
||||
"sambanova",
|
||||
"ovhcloud",
|
||||
"nebius",
|
||||
"vertexai",
|
||||
"function-network",
|
||||
|
|
@ -381,5 +384,6 @@ export {
|
|||
autodetectTemplateType,
|
||||
llmCanGenerateInParallel,
|
||||
modelSupportsImages,
|
||||
modelSupportsTools,
|
||||
modelSupportsTools
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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: {
|
||||
|
|
|
|||
39
core/llm/llms/OVHcloud.ts
Normal file
39
core/llm/llms/OVHcloud.ts
Normal file
|
|
@ -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<LLMOptions> = {
|
||||
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;
|
||||
|
|
@ -41,12 +41,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;
|
||||
|
|
@ -280,6 +280,7 @@ class Ollama extends BaseLLM implements ModelInstaller {
|
|||
num_thread: options.numThreads,
|
||||
use_mmap: options.useMmap,
|
||||
min_p: options.minP,
|
||||
num_gpu: options.numGpu,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -46,6 +46,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";
|
||||
|
|
@ -81,6 +82,7 @@ export const LLMClasses = [
|
|||
Kindo,
|
||||
LlamaCpp,
|
||||
OpenAI,
|
||||
OVHcloud,
|
||||
LMStudio,
|
||||
Mistral,
|
||||
Bedrock,
|
||||
|
|
|
|||
|
|
@ -137,9 +137,16 @@ 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;
|
||||
}
|
||||
},
|
||||
deepseek: (model) => {
|
||||
if(model !== "deepseek-reasoner") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
10
core/package-lock.json
generated
10
core/package-lock.json
generated
|
|
@ -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",
|
||||
|
|
@ -9533,6 +9534,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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ The SambaNova Cloud is a cloud platform for running large AI models with the wor
|
|||
<TabItem value="yaml" label="YAML">
|
||||
```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: <YOUR_SAMBANOVA_API_KEY>
|
||||
```
|
||||
</TabItem>
|
||||
|
|
@ -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": "<YOUR_SAMBANOVA_API_KEY>"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -9,16 +9,9 @@ Morph provides a fast apply model that helps you quickly and accurately apply co
|
|||
<TabItem value="yaml" label="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Morph Fast Apply
|
||||
provider: openai
|
||||
model: morph-v0
|
||||
apiKey: <YOUR_MORPH_API_KEY>
|
||||
apiBase: https://api.morphllm.com/v1/
|
||||
roles:
|
||||
- apply
|
||||
- chat
|
||||
promptTemplates:
|
||||
apply: "<code>{{{ original_code }}}</code>\n<update>{{{ new_code }}}</update>"
|
||||
- uses: morphllm/morph-v0
|
||||
with:
|
||||
MORPH_API_KEY: ${{ secrets.MORPH_API_KEY }}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
|
|
@ -41,4 +34,3 @@ Morph provides a fast apply model that helps you quickly and accurately apply co
|
|||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
```
|
||||
|
||||
72
docs/docs/customize/model-providers/more/ovhcloud.mdx
Normal file
72
docs/docs/customize/model-providers/more/ovhcloud.mdx
Normal file
|
|
@ -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.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Qwen2.5-Coder-32B-Instruct
|
||||
provider: ovhcloud
|
||||
model: qwen2.5-coder-32b
|
||||
apiKey: <YOUR_AIENDPOINTS_API_KEY>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
"title": "Qwen2.5-Coder-32B-Instruct",
|
||||
"provider": "ovhcloud",
|
||||
"model": "qwen2.5-coder-32b",
|
||||
"apiKey": "<YOUR_AIENDPOINTS_API_KEY>"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Embeddings model
|
||||
|
||||
We recommend configuring **bge-multilingual-gemma2** as your embeddings model.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: BGE Multilingual Gemma2
|
||||
provider: ovhcloud
|
||||
model: bge-multilingual-gemma2
|
||||
apiKey: <YOUR_AIENDPOINTS_API_KEY>
|
||||
roles:
|
||||
- embed
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
"provider": "ovhcloud",
|
||||
"model": "bge-multilingual-gemma2",
|
||||
"apiKey": "<YOUR_AIENDPOINTS_API_KEY>"
|
||||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
|
@ -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: <YOUR_AZURE_API_KEY>
|
||||
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",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ When editing code, Chat and Edit model output often doesn't clearly align with e
|
|||
|
||||
## Recommended Apply models
|
||||
|
||||
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 generous free tier [here](https://morphllm.com/dashboard) or get a Relace 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.
|
||||
|
||||
|
|
@ -33,19 +33,3 @@ models:
|
|||
|
||||
Please generate the final code without any markers or explanations.
|
||||
```
|
||||
|
||||
### Morph Fast Apply Configuration
|
||||
|
||||
```yaml
|
||||
models:
|
||||
- name: Morph Fast Apply
|
||||
provider: openai
|
||||
model: morph-v0
|
||||
apiKey: sk-test-123
|
||||
apiBase: https://api.morphllm.com/v1/
|
||||
roles:
|
||||
- apply
|
||||
- chat
|
||||
promptTemplates:
|
||||
apply: "<code>{{{ original_code }}}</code>\n<update>{{{ new_code }}}</update>"
|
||||
```
|
||||
|
|
|
|||
|
|
@ -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<string, JsonValue>;
|
||||
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
||||
|
|
|
|||
|
|
@ -158,7 +158,10 @@ 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.
|
||||
- `reasoning`: Enables thinking/reasoning for Anthropic Claude 3.7+ models.
|
||||
- `reasoningBudgetTokens`: Sets budget tokens for thinking/reasoning in Anthropic Claude 3.7+ models.
|
||||
|
||||
Example
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Config YAML Reference
|
||||
description: Reference for the Continue configuration YAML file
|
||||
keywords: [ config, yaml, configuration, customize, customization ]
|
||||
keywords: [config, yaml, configuration, customize, customization]
|
||||
---
|
||||
|
||||
# config.yaml Reference
|
||||
|
|
@ -14,13 +14,12 @@ from [the Hub](https://hub.continue.dev/explore/assistants) or locally
|
|||
- [Continue Hub](https://hub.continue.dev/explore/assistants) - YAML is stored on the hub and automatically synced to
|
||||
the extension
|
||||
- Locally
|
||||
- in your global `.continue` folder (`~/.continue` on Mac, `%USERPROFILE%\.continue`) within `.continue/assistants`.
|
||||
The name of the file will be used as the display name of the assistant, e.g. `My Assistant.yaml`
|
||||
- in your workspace in a `/.continue/assistants` folder, with the same naming convention
|
||||
- in your global `.continue` folder (`~/.continue` on Mac, `%USERPROFILE%\.continue`) within `.continue/assistants`.
|
||||
The name of the file will be used as the display name of the assistant, e.g. `My Assistant.yaml`
|
||||
- in your workspace in a `/.continue/assistants` folder, with the same naming convention
|
||||
|
||||
:::info
|
||||
Config YAML replaces [`config.json`](./json-reference.md), which is deprecated. View the *
|
||||
*[Migration Guide](./yaml-migration.md)**.
|
||||
Config YAML replaces [`config.json`](./json-reference.md), which is deprecated. View the \* \*[Migration Guide](./yaml-migration.md)\*\*.
|
||||
:::
|
||||
|
||||
An assistant is made up of:
|
||||
|
|
@ -193,31 +192,32 @@ chat, editing, and summarizing.
|
|||
`autocomplete`](./customize/model-roles/autocomplete.md#prompt-templating). The `chatTemplate` property must be a
|
||||
valid template name, such as `llama3` or `anthropic`.
|
||||
- `chatOptions`: If the model includes role `chat`, these settings apply for Chat and Agent mode:
|
||||
- `baseSystemMessage`: Can be used to override the default system prompt.
|
||||
- `baseSystemMessage`: Can be used to override the default system prompt.
|
||||
- `embedOptions`: If the model includes role `embed`, these settings apply for embeddings:
|
||||
- `maxChunkSize`: Maximum tokens per document chunk. Minimum is 128 tokens.
|
||||
- `maxBatchSize`: Maximum number of chunks per request. Minimum is 1 chunk.
|
||||
- `maxChunkSize`: Maximum tokens per document chunk. Minimum is 128 tokens.
|
||||
- `maxBatchSize`: Maximum number of chunks per request. Minimum is 1 chunk.
|
||||
- `defaultCompletionOptions`: Default completion options for model settings.
|
||||
- `contextLength`: Maximum context length of the model, typically in tokens.
|
||||
- `maxTokens`: Maximum number of tokens to generate in a completion.
|
||||
- `temperature`: Controls the randomness of the completion. Values range from `0.0` (deterministic) to `1.0` (
|
||||
random).
|
||||
- `topP`: The cumulative probability for nucleus sampling.
|
||||
- `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.
|
||||
- `contextLength`: Maximum context length of the model, typically in tokens.
|
||||
- `maxTokens`: Maximum number of tokens to generate in a completion.
|
||||
- `temperature`: Controls the randomness of the completion. Values range from `0.0` (deterministic) to `1.0` (random).
|
||||
- `topP`: The cumulative probability for nucleus sampling.
|
||||
- `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.
|
||||
- `timeout`: Timeout for each request to the language model.
|
||||
- `verifySsl`: Whether to verify SSL certificates for requests.
|
||||
- `caBundlePath`: Path to a custom CA bundle for HTTP requests.
|
||||
- `proxy`: Proxy URL for HTTP requests.
|
||||
- `headers`: Custom headers for HTTP requests.
|
||||
- `extraBodyProperties`: Additional properties to merge with the HTTP request body.
|
||||
- `noProxy`: List of hostnames that should bypass the specified proxy.
|
||||
- `clientCertificate`: Client certificate for HTTP requests.
|
||||
- `cert`: Path to the client certificate file.
|
||||
- `key`: Path to the client certificate key file.
|
||||
- `passphrase`: Optional passphrase for the client certificate key file.
|
||||
- `timeout`: Timeout for each request to the language model.
|
||||
- `verifySsl`: Whether to verify SSL certificates for requests.
|
||||
- `caBundlePath`: Path to a custom CA bundle for HTTP requests.
|
||||
- `proxy`: Proxy URL for HTTP requests.
|
||||
- `headers`: Custom headers for HTTP requests.
|
||||
- `extraBodyProperties`: Additional properties to merge with the HTTP request body.
|
||||
- `noProxy`: List of hostnames that should bypass the specified proxy.
|
||||
- `clientCertificate`: Client certificate for HTTP requests.
|
||||
- `cert`: Path to the client certificate file.
|
||||
- `key`: Path to the client certificate key file.
|
||||
- `passphrase`: Optional passphrase for the client certificate key file.
|
||||
|
||||
#### Example
|
||||
|
||||
|
|
@ -401,8 +401,8 @@ Destinations to which [development data](./customize/deep-dives/development-data
|
|||
|
||||
- `name` (**required**): The display name of the data destination
|
||||
- `destination` (**required**): The destination/endpoint that will receive the data. Can be:
|
||||
- an HTTP endpoint that will receive a POST request with a JSON blob
|
||||
- a file URL to a directory in which events will be dumpted to `.jsonl` files
|
||||
- an HTTP endpoint that will receive a POST request with a JSON blob
|
||||
- a file URL to a directory in which events will be dumpted to `.jsonl` files
|
||||
- `schema` (**required**): the schema version of the JSON blobs to be sent
|
||||
- `events`: an array of event names to include. Defaults to all events if not specified.
|
||||
- `level`: a pre-defined filter for event fields. Options include `all` and `noCode`; the latter excludes data like file
|
||||
|
|
|
|||
|
|
@ -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: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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": [
|
||||
|
|
|
|||
|
|
@ -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 配置文件像这样:
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -71,6 +71,20 @@
|
|||
"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"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -217,6 +231,7 @@
|
|||
"function-network",
|
||||
"scaleway",
|
||||
"relace",
|
||||
"ovhcloud",
|
||||
"morph"
|
||||
],
|
||||
"markdownEnumDescriptions": [
|
||||
|
|
@ -251,7 +266,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/).",
|
||||
|
|
@ -265,6 +280,7 @@
|
|||
"### 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).",
|
||||
"### 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/).",
|
||||
"### Morph\nMorph provides a fast apply model. To get started, obtain an API key from [here](https://morphllm.com/dashboard)."
|
||||
],
|
||||
"type": "string"
|
||||
|
|
@ -500,7 +516,8 @@
|
|||
"nebius",
|
||||
"xAI",
|
||||
"kindo",
|
||||
"scaleway"
|
||||
"scaleway",
|
||||
"ovhcloud"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
|
@ -1383,6 +1400,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 <a href='https://endpoints.ai.cloud.ovh.net/catalog'>AI Endpoints catalog</a>."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
|
|
@ -1655,20 +1708,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"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -2772,7 +2822,8 @@
|
|||
"lmstudio",
|
||||
"siliconflow",
|
||||
"function-network",
|
||||
"scaleway"
|
||||
"scaleway",
|
||||
"ovhcloud"
|
||||
]
|
||||
},
|
||||
"model": {
|
||||
|
|
|
|||
5
extensions/vscode/package-lock.json
generated
5
extensions/vscode/package-lock.json
generated
|
|
@ -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",
|
||||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
@ -381,6 +382,7 @@ const getCommandsMap: (
|
|||
rules: config.rules,
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
"continue.acceptDiff": async (newFileUri?: string, streamId?: string) =>
|
||||
processDiff(
|
||||
|
|
@ -795,7 +797,7 @@ const getCommandsMap: (
|
|||
vscode.commands.executeCommand("workbench.action.closeAuxiliaryBar");
|
||||
},
|
||||
"continue.openConfigPage": () => {
|
||||
vscode.commands.executeCommand("continue.navigateTo", "/config", true);
|
||||
vscode.commands.executeCommand("continue.navigateTo", "/config", false);
|
||||
},
|
||||
"continue.selectFilesAsContext": async (
|
||||
firstUri: vscode.Uri,
|
||||
|
|
@ -949,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,
|
||||
});
|
||||
|
|
@ -1014,7 +1016,7 @@ const getCommandsMap: (
|
|||
};
|
||||
};
|
||||
|
||||
const registerCopyBufferSpy = (
|
||||
const registerCopyBufferService = (
|
||||
context: vscode.ExtensionContext,
|
||||
core: Core,
|
||||
) => {
|
||||
|
|
@ -1105,8 +1107,6 @@ export function registerAllCommands(
|
|||
core: Core,
|
||||
editDecorationManager: EditDecorationManager,
|
||||
) {
|
||||
registerCopyBufferSpy(context, core);
|
||||
|
||||
for (const [command, callback] of Object.entries(
|
||||
getCommandsMap(
|
||||
ide,
|
||||
|
|
@ -1126,4 +1126,20 @@ 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_copy_buffer_failure",
|
||||
{
|
||||
stack: extractMinimalStackTraceInfo(e.stack),
|
||||
message: e.message,
|
||||
},
|
||||
false,
|
||||
true,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
57
gui/package-lock.json
generated
57
gui/package-lock.json
generated
|
|
@ -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",
|
||||
|
|
@ -135,6 +136,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",
|
||||
|
|
@ -7882,18 +7884,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",
|
||||
|
|
@ -10281,6 +10293,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",
|
||||
|
|
@ -10565,28 +10590,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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
BIN
gui/public/logos/ovhcloud.png
Normal file
BIN
gui/public/logos/ovhcloud.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.6 KiB |
|
|
@ -1,7 +1,6 @@
|
|||
import { ctxItemToRifWithContents } from "core/commands/util";
|
||||
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";
|
||||
|
|
@ -22,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";
|
||||
|
|
@ -243,14 +243,11 @@ const StyledMarkdownPreview = memo(function StyledMarkdownPreview(
|
|||
rehypePlugins: [
|
||||
rehypeKatex as any,
|
||||
{},
|
||||
rehypeHighlight as any,
|
||||
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.
|
||||
// https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md
|
||||
{
|
||||
// languages: {},
|
||||
} as Options,
|
||||
() => {
|
||||
let codeBlockIndex = 0;
|
||||
return (tree) => {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
];
|
||||
}
|
||||
|
|
@ -91,8 +91,18 @@ function InputToolbar(props: InputToolbarProps) {
|
|||
}}
|
||||
>
|
||||
<div className="xs:gap-1.5 flex flex-row items-center gap-1">
|
||||
<ModeSelect />
|
||||
<ModelSelect />
|
||||
<HoverItem data-tooltip-id="mode-select-tooltip">
|
||||
<ModeSelect />
|
||||
<ToolTip id="mode-select-tooltip" place="top">
|
||||
Select Mode
|
||||
</ToolTip>
|
||||
</HoverItem>
|
||||
<HoverItem data-tooltip-id="model-select-tooltip">
|
||||
<ModelSelect />
|
||||
<ToolTip id="model-select-tooltip" place="top">
|
||||
Select Model
|
||||
</ToolTip>
|
||||
</HoverItem>
|
||||
<div className="xs:flex -mb-1 hidden items-center text-gray-400 transition-colors duration-200">
|
||||
{props.toolbarOptions?.hideImageUpload ||
|
||||
(supportsImages && (
|
||||
|
|
@ -120,8 +130,9 @@ function InputToolbar(props: InputToolbarProps) {
|
|||
fileInputRef.current?.click();
|
||||
}}
|
||||
/>
|
||||
|
||||
<ToolTip id="image-tooltip" place="top">
|
||||
Attach an image
|
||||
Attach Image
|
||||
</ToolTip>
|
||||
</HoverItem>
|
||||
</>
|
||||
|
|
@ -134,7 +145,7 @@ function InputToolbar(props: InputToolbarProps) {
|
|||
/>
|
||||
|
||||
<ToolTip id="add-context-item-tooltip" place="top">
|
||||
Add context (files, docs, urls, etc.)
|
||||
Attach Context
|
||||
</ToolTip>
|
||||
</HoverItem>
|
||||
)}
|
||||
|
|
@ -170,7 +181,7 @@ function InputToolbar(props: InputToolbarProps) {
|
|||
{getMetaKeyLabel()}⏎ @codebase
|
||||
</span>
|
||||
<ToolTip id="add-codebase-context-tooltip" place="top-end">
|
||||
Submit with the codebase as context ({getMetaKeyLabel()}⏎)
|
||||
Send With Codebase as Context ({getMetaKeyLabel()}⏎)
|
||||
</ToolTip>
|
||||
</HoverItem>
|
||||
)}
|
||||
|
|
@ -196,6 +207,7 @@ function InputToolbar(props: InputToolbarProps) {
|
|||
)}
|
||||
|
||||
<EnterButton
|
||||
data-tooltip-id="enter-tooltip"
|
||||
isPrimary={props.isMainInput}
|
||||
data-testid="submit-input-button"
|
||||
onClick={async (e) => {
|
||||
|
|
@ -212,6 +224,9 @@ function InputToolbar(props: InputToolbarProps) {
|
|||
⏎ {props.toolbarOptions?.enterText ?? "Enter"}
|
||||
</span>
|
||||
<span className="md:hidden">⏎</span>
|
||||
<ToolTip id="enter-tooltip" place="top">
|
||||
Send (⏎)
|
||||
</ToolTip>
|
||||
</EnterButton>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ function BlockSettingsToolbarIcon(
|
|||
|
||||
const id = `block-settings-toolbar-icon-${props.sectionId}`;
|
||||
return (
|
||||
|
||||
<>
|
||||
<HoverItem
|
||||
px={0}
|
||||
|
|
@ -122,6 +123,7 @@ function BlockSettingsToolbarIcon(
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</HoverItem>
|
||||
<ToolTip delayShow={700} id={id}>
|
||||
{props.tooltip}
|
||||
|
|
@ -160,9 +162,7 @@ export function BlockSettingsTopToolbar() {
|
|||
<BlockSettingsToolbarIcon
|
||||
className="-ml-1.5"
|
||||
icon={isToolbarExpanded ? ChevronLeftIcon : EllipsisHorizontalIcon}
|
||||
tooltip={
|
||||
isToolbarExpanded ? "Collapse sections" : "Expand sections"
|
||||
}
|
||||
tooltip={isToolbarExpanded ? "Collapse Toolbar" : "Expand Toolbar"}
|
||||
title=""
|
||||
isSelected={false}
|
||||
onClick={handleEllipsisClick}
|
||||
|
|
@ -190,8 +190,13 @@ export function BlockSettingsTopToolbar() {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex">
|
||||
<AssistantSelect />
|
||||
<div className="flex gap-0.5">
|
||||
<HoverItem data-tooltip-id="assistant-select-tooltip">
|
||||
<AssistantSelect />
|
||||
<ToolTip id="assistant-select-tooltip" place="top">
|
||||
Select Assistant
|
||||
</ToolTip>
|
||||
</HoverItem>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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 [newSessionInitialized, setNewSessionInitialized] = 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 () => {
|
||||
setNewSessionInitialized(true);
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (currentSession.history.length > 0) {
|
||||
setNewSessionInitialized(false);
|
||||
}
|
||||
}, [currentSession.history]);
|
||||
|
||||
return (
|
||||
<Listbox
|
||||
value={mode}
|
||||
|
|
@ -91,7 +104,8 @@ function ModeSelect() {
|
|||
return;
|
||||
}
|
||||
dispatch(setMode(newMode));
|
||||
if (newMode === "edit") {
|
||||
if (newMode === "edit" || newSessionInitialized) {
|
||||
// generate a new session for edit mode and if user opened a new session explicitly
|
||||
await dispatch(
|
||||
saveCurrentSession({
|
||||
generateTitle: false,
|
||||
|
|
@ -99,6 +113,7 @@ function ModeSelect() {
|
|||
}),
|
||||
);
|
||||
} else if (mode === "edit") {
|
||||
// load last session if the previous mode was edit
|
||||
await dispatch(
|
||||
loadLastSession({
|
||||
saveCurrentSession: false,
|
||||
|
|
|
|||
|
|
@ -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: {
|
||||
|
|
@ -1456,7 +1459,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: {
|
||||
|
|
@ -1579,13 +1582,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"],
|
||||
|
|
@ -1604,19 +1631,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",
|
||||
|
|
@ -1630,19 +1644,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",
|
||||
|
|
@ -1669,65 +1670,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",
|
||||
|
|
@ -1744,7 +1693,7 @@ export const models: { [key: string]: ModelPackage } = {
|
|||
contextLength: 32_000,
|
||||
},
|
||||
icon: "deepseek.png",
|
||||
providerOptions: ["sambanova"],
|
||||
providerOptions: ["ovhcloud", "sambanova"],
|
||||
isOpenSource: true,
|
||||
},
|
||||
deepseekR1: {
|
||||
|
|
@ -1760,6 +1709,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:
|
||||
|
|
|
|||
|
|
@ -161,6 +161,40 @@ export const providers: Partial<Record<string, ProviderInfo>> = {
|
|||
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",
|
||||
|
|
@ -748,7 +782,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: "",
|
||||
|
|
@ -764,20 +798,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",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export function SimpleToolCallUI({
|
|||
}, [toolCallState.parsedArgs]);
|
||||
|
||||
return (
|
||||
<div className={`flex flex-1 flex-col px-2 pt-2`}>
|
||||
<div className="flex flex-1 flex-col px-2 pt-2 hover:brightness-125">
|
||||
<div className="flex flex-row justify-between">
|
||||
<div
|
||||
className="flex cursor-pointer items-center justify-start text-xs text-gray-300"
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
});
|
||||
|
|
@ -55,6 +56,7 @@ export const modelDescriptionSchema = z.object({
|
|||
"sagemaker",
|
||||
"cloudflare",
|
||||
"azure",
|
||||
"ovhcloud",
|
||||
"continue-proxy",
|
||||
"nebius",
|
||||
"scaleway",
|
||||
|
|
@ -109,6 +111,7 @@ export const embeddingsProviderSchema = z.object({
|
|||
"cohere",
|
||||
"free-trial",
|
||||
"gemini",
|
||||
"ovhcloud",
|
||||
"continue-proxy",
|
||||
"nebius",
|
||||
"scaleway",
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ They are concerned with:
|
|||
- [x] OpenRouter
|
||||
- [x] OpenAI
|
||||
- [ ] !Ollama
|
||||
- [x] OVHCLoud
|
||||
- [ ] Replicate
|
||||
- [ ] SageMaker
|
||||
- [x] SambaNova
|
||||
|
|
|
|||
4
packages/openai-adapters/package-lock.json
generated
4
packages/openai-adapters/package-lock.json
generated
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
58
packages/openai-adapters/src/apis/Inception.ts
Normal file
58
packages/openai-adapters/src/apis/Inception.ts
Normal file
|
|
@ -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<ChatCompletionChunk, any, unknown> {
|
||||
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<Model[]> {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
}
|
||||
|
|
@ -2,15 +2,16 @@ 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";
|
||||
import { InceptionApi } from "./apis/Inception.js";
|
||||
import { JinaApi } from "./apis/Jina.js";
|
||||
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();
|
||||
|
|
@ -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":
|
||||
|
|
@ -71,6 +74,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 +111,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";
|
||||
|
||||
|
|
|
|||
|
|
@ -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"),
|
||||
|
|
@ -103,6 +104,11 @@ export const JinaConfigSchema = OpenAIConfigSchema.extend({
|
|||
});
|
||||
export type JinaConfig = z.infer<typeof JinaConfigSchema>;
|
||||
|
||||
export const InceptionConfigSchema = OpenAIConfigSchema.extend({
|
||||
provider: z.literal("inception"),
|
||||
});
|
||||
export type InceptionConfig = z.infer<typeof InceptionConfigSchema>;
|
||||
|
||||
// Discriminated union
|
||||
export const LLMConfigSchema = z.discriminatedUnion("provider", [
|
||||
OpenAIConfigSchema,
|
||||
|
|
@ -114,5 +120,6 @@ export const LLMConfigSchema = z.discriminatedUnion("provider", [
|
|||
AnthropicConfigSchema,
|
||||
JinaConfigSchema,
|
||||
MockConfigSchema,
|
||||
InceptionConfigSchema,
|
||||
]);
|
||||
export type LLMConfig = z.infer<typeof LLMConfigSchema>;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue