diff --git a/core/llm/llms/Inception.ts b/core/llm/llms/Inception.ts index 3d9f992ad..ef204fec1 100644 --- a/core/llm/llms/Inception.ts +++ b/core/llm/llms/Inception.ts @@ -3,9 +3,31 @@ import { streamSse } from "../stream.js"; import OpenAI from "./OpenAI.js"; +/** + * Inception Labs provider + * + * Integrates with Inception Labs' OpenAI-compatible API endpoints. + * Provides access to Mercury models for autocomplete and other tasks. + * + * Different models use different API endpoints: + * - mercury-editor-mini-experimental: zaragoza.api.inceptionlabs.ai + * - mercury-editor-small-experimental: copenhagen.api.inceptionlabs.ai + * + * More information at: https://docs.inceptionlabs.ai/ + */ class Inception extends OpenAI { static providerName = "inception"; - static defaultOptions: Partial = {}; + static defaultOptions: Partial = { + apiBase: "https://copenhagen.api.inceptionlabs.ai/v1/", + model: "mercury-editor-small-experimental", + completionOptions: { + temperature: 0.0, + maxTokens: 150, + presencePenalty: 1.5, + stop: ["\n\n", "\n \n", "<|endoftext|>"], + model: "mercury-editor-small-experimental", // Added model to fix TypeScript error + }, + }; supportsFim(): boolean { return true; diff --git a/core/llm/llms/InceptionLabs.ts b/core/llm/llms/InceptionLabs.ts deleted file mode 100644 index b8545ed87..000000000 --- a/core/llm/llms/InceptionLabs.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { LLMOptions } from "../../index.js"; -import OpenAI from "./OpenAI.js"; - -/** - * Inception Labs provider - * - * Integrates with Inception Labs' OpenAI-compatible API endpoints. - * Provides access to Mercury models for autocomplete and other tasks. - * - * Different models use different API endpoints: - * - mercury-editor-mini-experimental: zaragoza.api.inceptionlabs.ai - * - mercury-editor-small-experimental: copenhagen.api.inceptionlabs.ai - * - * More information at: https://docs.inceptionlabs.ai/ - */ -class InceptionLabs extends OpenAI { - static providerName = "inceptionlabs"; - static defaultOptions: Partial = { - apiBase: "https://copenhagen.api.inceptionlabs.ai/v1/", - model: "mercury-editor-small-experimental", - completionOptions: { - temperature: 0.0, - maxTokens: 150, - presencePenalty: 1.5, - stop: ["\n\n", "\n \n", "<|endoftext|>"], - model: "mercury-editor-small-experimental" // Added model to fix TypeScript error - } - }; - - // Model information including the appropriate API endpoint - private modelInfo: Record = { - // Maps friendly names to model info - "mercury-mini": { - name: "mercury-editor-mini-experimental", - apiBase: "https://zaragoza.api.inceptionlabs.ai/v1/" - }, - "mercury-small": { - name: "mercury-editor-small-experimental", - apiBase: "https://copenhagen.api.inceptionlabs.ai/v1/" - }, - }; - - constructor(options: LLMOptions) { - super(options); - - // Handle model name mapping and set appropriate API base - const friendlyName = Object.keys(this.modelInfo).find( - key => options.model === key || options.model === this.modelInfo[key].name - ); - - if (friendlyName) { - // If we found a match in our model info - const info = this.modelInfo[friendlyName]; - this.model = info.name; - - // Only override apiBase if not explicitly provided in options - if (!options.apiBase) { - this.apiBase = info.apiBase; - } - } else if (options.model === "mercury-editor-mini-experimental") { - // Handle direct model names not mapped through friendly names - if (!options.apiBase) { - this.apiBase = "https://zaragoza.api.inceptionlabs.ai/v1/"; - } - } else if (options.model === "mercury-editor-small-experimental") { - if (!options.apiBase) { - this.apiBase = "https://copenhagen.api.inceptionlabs.ai/v1/"; - } - } - } - - async listModels(): Promise { - // For Inception Labs, we'll just return the models we know about - // since each endpoint only returns its own models - return Object.values(this.modelInfo).map(info => info.name); - } - - /** - * Override the headers to make sure we're using the correct API key format - */ - protected _getHeaders() { - return { - "Content-Type": "application/json", - "Authorization": `Bearer ${this.apiKey}`, - "api-key": this.apiKey ?? "", // Added to match the parent class signature - }; - } -} - -export default InceptionLabs; \ No newline at end of file diff --git a/extensions/intellij/gradle.properties b/extensions/intellij/gradle.properties index 957c112f3..b9c409a6d 100644 --- a/extensions/intellij/gradle.properties +++ b/extensions/intellij/gradle.properties @@ -3,7 +3,7 @@ pluginGroup=com.github.continuedev.continueintellijextension pluginName=continue-intellij-extension pluginRepositoryUrl=https://github.com/continuedev/continue # SemVer format -> https://semver.org -pluginVersion=1.0.9 +pluginVersion=1.0.10 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild=223 # IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 5dec30f35..769ed476b 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -2,7 +2,7 @@ "name": "continue", "icon": "media/icon.png", "author": "Continue Dev, Inc", - "version": "1.1.18", + "version": "1.1.19", "repository": { "type": "git", "url": "https://github.com/continuedev/continue"