From 23a4678a4a9842f8a8ad984746b9f009412fe1a8 Mon Sep 17 00:00:00 2001 From: Dennesssy <139027232+Dennesssy@users.noreply.github.com> Date: Thu, 5 Mar 2026 05:43:11 -0700 Subject: [PATCH 01/12] feat: add packages/types/src/providers/inception.ts --- packages/types/src/providers/inception.ts | 42 +++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 packages/types/src/providers/inception.ts diff --git a/packages/types/src/providers/inception.ts b/packages/types/src/providers/inception.ts new file mode 100644 index 00000000000..43d929e527f --- /dev/null +++ b/packages/types/src/providers/inception.ts @@ -0,0 +1,42 @@ +import type { ModelInfo } from "../model.js" + +// https://docs.inceptionlabs.ai/get-started/models +export type InceptionModelId = keyof typeof inceptionModels + +export const inceptionDefaultModelId: InceptionModelId = "mercury-2" + +export const inceptionModels = { + "mercury-2": { + maxTokens: 10_000, + contextWindow: 128_000, + supportsImages: false, + supportsPromptCache: true, + inputPrice: 0.25, + outputPrice: 0.75, + cacheReadsPrice: 0.025, + supportsTemperature: true, + description: "Mercury 2: The fastest reasoning LLM and most powerful model for chat completions", + }, + "mercury-edit": { + maxTokens: 1_000, + contextWindow: 32_000, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0.25, + outputPrice: 0.75, + cacheReadsPrice: 0.025, + supportsTemperature: true, + description: "Mercury Edit: A code editing LLM for autocomplete (FIM), apply edit, and next edit suggestions", + }, +} as const satisfies Record + +export const inceptionModelInfoSaneDefaults: ModelInfo = { + maxTokens: 10_000, + contextWindow: 128_000, + supportsImages: false, + supportsPromptCache: true, + inputPrice: 0.25, + outputPrice: 0.75, +} + +export const INCEPTION_DEFAULT_TEMPERATURE = 0.7 From 62ea6b3b113ed92474bfb345c483b35f31bcc7a7 Mon Sep 17 00:00:00 2001 From: Dennesssy <139027232+Dennesssy@users.noreply.github.com> Date: Thu, 5 Mar 2026 05:43:12 -0700 Subject: [PATCH 02/12] feat: add src/api/providers/inception.ts --- src/api/providers/inception.ts | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/api/providers/inception.ts diff --git a/src/api/providers/inception.ts b/src/api/providers/inception.ts new file mode 100644 index 00000000000..abfbce1f22c --- /dev/null +++ b/src/api/providers/inception.ts @@ -0,0 +1,38 @@ +import { inceptionModels, inceptionDefaultModelId, type ModelInfo } from "@roo-code/types" +import type { ApiHandlerOptions } from "../../shared/api" +import { getModelParams } from "../transform/model-params" +import { OpenAICompatibleHandler, OpenAICompatibleConfig } from "./openai-compatible" + +export class InceptionHandler extends OpenAICompatibleHandler { + constructor(options: ApiHandlerOptions) { + const modelId = options.apiModelId ?? inceptionDefaultModelId + const modelInfo = inceptionModels[modelId as keyof typeof inceptionModels] || inceptionModels[inceptionDefaultModelId] + + const config: OpenAICompatibleConfig = { + providerName: "inception", + baseURL: options.inceptionBaseUrl || "https://api.inceptionlabs.ai/v1", + apiKey: options.inceptionApiKey ?? "not-provided", + modelId, + modelInfo, + modelMaxTokens: options.modelMaxTokens ?? undefined, + temperature: options.modelTemperature ?? undefined, + } + + super(options, config) + } + + override getModel() { + const id = this.options.apiModelId ?? inceptionDefaultModelId + const info = inceptionModels[id as keyof typeof inceptionModels] || inceptionModels[inceptionDefaultModelId] + + const params = getModelParams({ + format: "openai", + modelId: id, + model: info, + settings: this.options, + defaultTemperature: 0.7, + }) + + return { id, info, ...params } + } +} From a448f117e239c09d1dbf9801702368aebf2aac60 Mon Sep 17 00:00:00 2001 From: Dennesssy <139027232+Dennesssy@users.noreply.github.com> Date: Thu, 5 Mar 2026 05:43:13 -0700 Subject: [PATCH 03/12] feat: add src/api/providers/__tests__/inception.spec.ts --- src/api/providers/__tests__/inception.spec.ts | 159 ++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 src/api/providers/__tests__/inception.spec.ts diff --git a/src/api/providers/__tests__/inception.spec.ts b/src/api/providers/__tests__/inception.spec.ts new file mode 100644 index 00000000000..1e5e8673681 --- /dev/null +++ b/src/api/providers/__tests__/inception.spec.ts @@ -0,0 +1,159 @@ +// Mocks must come first, before imports +const mockCreate = vi.fn() +vi.mock("openai", () => { + return { + __esModule: true, + default: vi.fn().mockImplementation(() => ({ + chat: { + completions: { + create: mockCreate.mockImplementation(async (options) => { + if (!options.stream) { + return { + id: "test-completion", + choices: [ + { + message: { role: "assistant", content: "Test response", refusal: null }, + finish_reason: "stop", + index: 0, + }, + ], + usage: { + prompt_tokens: 10, + completion_tokens: 5, + total_tokens: 15, + cached_tokens: 2, + }, + } + } + + // Return async iterator for streaming + return { + [Symbol.asyncIterator]: async function* () { + yield { + choices: [ + { + delta: { content: "Test response" }, + index: 0, + }, + ], + usage: null, + } + yield { + choices: [ + { + delta: {}, + index: 0, + }, + ], + usage: { + prompt_tokens: 10, + completion_tokens: 5, + total_tokens: 15, + cached_tokens: 2, + }, + } + }, + } + }), + }, + }, + })), + } +}) + +import OpenAI from "openai" +import type { Anthropic } from "@anthropic-ai/sdk" + +import { inceptionDefaultModelId } from "@roo-code/types" + +import type { ApiHandlerOptions } from "../../../shared/api" +import { InceptionHandler } from "../inception" + +describe("InceptionHandler", () => { + let handler: InceptionHandler + let options: ApiHandlerOptions + + beforeEach(() => { + vi.clearAllMocks() + options = { + inceptionApiKey: "test-api-key", + apiModelId: inceptionDefaultModelId, + } + handler = new InceptionHandler(options) + }) + + describe("constructor", () => { + it("should initialize with default model", () => { + const model = handler.getModel() + expect(model.id).toBe(inceptionDefaultModelId) + }) + + it("should use custom base URL if provided", () => { + const customOptions = { + ...options, + inceptionBaseUrl: "https://custom.api.url/v1", + } + const customHandler = new InceptionHandler(customOptions) + expect(customHandler).toBeDefined() + }) + }) + + describe("getModel", () => { + it("should return model info for mercury-2", () => { + const model = handler.getModel() + expect(model.id).toBe("mercury-2") + expect(model.info.maxTokens).toBe(10_000) + expect(model.info.contextWindow).toBe(128_000) + }) + + it("should return model info for mercury-edit", () => { + const editOptions = { + ...options, + apiModelId: "mercury-edit", + } + const editHandler = new InceptionHandler(editOptions) + const model = editHandler.getModel() + expect(model.id).toBe("mercury-edit") + expect(model.info.maxTokens).toBe(1_000) + expect(model.info.contextWindow).toBe(32_000) + }) + }) + + describe("createMessage", () => { + it("should create a non-streaming message", async () => { + const systemPrompt = "You are a helpful assistant" + const messages: Anthropic.MessageParam[] = [ + { + role: "user", + content: "Hello", + }, + ] + + const result = await handler.createMessage(systemPrompt, messages) + + expect(mockCreate).toHaveBeenCalled() + expect(result.text).toBe("Test response") + }) + + it("should handle streaming messages", async () => { + const systemPrompt = "You are a helpful assistant" + const messages: Anthropic.MessageParam[] = [ + { + role: "user", + content: "Hello", + }, + ] + + const stream = handler.createMessage(systemPrompt, messages) + const chunks: string[] = [] + + for await (const chunk of stream) { + if (chunk.type === "text") { + chunks.push(chunk.text) + } + } + + expect(chunks).toContain("Test response") + }) + }) +}) From 99f38fbc1eb1a1b0017324ac0bb4eadbdd7d6b89 Mon Sep 17 00:00:00 2001 From: Dennesssy <139027232+Dennesssy@users.noreply.github.com> Date: Thu, 5 Mar 2026 05:46:32 -0700 Subject: [PATCH 04/12] feat: register inception provider in packages/types/src/global-settings.ts --- packages/types/src/global-settings.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/types/src/global-settings.ts b/packages/types/src/global-settings.ts index 288f6c2118c..f9802d9502b 100644 --- a/packages/types/src/global-settings.ts +++ b/packages/types/src/global-settings.ts @@ -262,6 +262,7 @@ export const SECRET_STATE_KEYS = [ "openAiNativeApiKey", "deepSeekApiKey", "moonshotApiKey", + "inceptionApiKey", "mistralApiKey", "minimaxApiKey", "requestyApiKey", From 278b3a967d13478412d6b4e5ef549d654e57de32 Mon Sep 17 00:00:00 2001 From: Dennesssy <139027232+Dennesssy@users.noreply.github.com> Date: Thu, 5 Mar 2026 05:46:34 -0700 Subject: [PATCH 05/12] feat: register inception provider in packages/types/src/provider-settings.ts --- packages/types/src/provider-settings.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/types/src/provider-settings.ts b/packages/types/src/provider-settings.ts index 859792d7c36..74597b04b91 100644 --- a/packages/types/src/provider-settings.ts +++ b/packages/types/src/provider-settings.ts @@ -111,6 +111,7 @@ export const providerNames = [ "gemini-cli", "mistral", "moonshot", + "inception", "minimax", "openai-codex", "openai-native", From cdd37ed907ee5ef946c2ffb7a8e72028fe7ac55f Mon Sep 17 00:00:00 2001 From: Dennesssy <139027232+Dennesssy@users.noreply.github.com> Date: Thu, 5 Mar 2026 05:46:53 -0700 Subject: [PATCH 06/12] feat: add inception schema to provider-settings.ts --- packages/types/src/provider-settings.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/types/src/provider-settings.ts b/packages/types/src/provider-settings.ts index 74597b04b91..7229fba6ce2 100644 --- a/packages/types/src/provider-settings.ts +++ b/packages/types/src/provider-settings.ts @@ -314,6 +314,11 @@ const moonshotSchema = apiModelIdProviderModelSchema.extend({ moonshotApiKey: z.string().optional(), }) +const inceptionSchema = apiModelIdProviderModelSchema.extend({ + inceptionBaseUrl: z.string().optional(), + inceptionApiKey: z.string().optional(), +}) + const minimaxSchema = apiModelIdProviderModelSchema.extend({ minimaxBaseUrl: z .union([z.literal("https://api.minimax.io/v1"), z.literal("https://api.minimaxi.com/v1")]) @@ -402,6 +407,7 @@ export const providerSettingsSchemaDiscriminated = z.discriminatedUnion("apiProv mistralSchema.merge(z.object({ apiProvider: z.literal("mistral") })), deepSeekSchema.merge(z.object({ apiProvider: z.literal("deepseek") })), moonshotSchema.merge(z.object({ apiProvider: z.literal("moonshot") })), + inceptionSchema.merge(z.object({ apiProvider: z.literal("inception") })), minimaxSchema.merge(z.object({ apiProvider: z.literal("minimax") })), requestySchema.merge(z.object({ apiProvider: z.literal("requesty") })), unboundSchema.merge(z.object({ apiProvider: z.literal("unbound") })), @@ -435,6 +441,7 @@ export const providerSettingsSchema = z.object({ ...mistralSchema.shape, ...deepSeekSchema.shape, ...moonshotSchema.shape, + ...inceptionSchema.shape, ...minimaxSchema.shape, ...requestySchema.shape, ...unboundSchema.shape, From c886012e40a25effd56d5e81479eef29b471c4e1 Mon Sep 17 00:00:00 2001 From: Dennesssy <139027232+Dennesssy@users.noreply.github.com> Date: Thu, 5 Mar 2026 05:47:08 -0700 Subject: [PATCH 07/12] feat: export inception from providers/index.ts --- packages/types/src/providers/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/types/src/providers/index.ts b/packages/types/src/providers/index.ts index 6bb959c7056..bd14c5e5756 100644 --- a/packages/types/src/providers/index.ts +++ b/packages/types/src/providers/index.ts @@ -8,6 +8,7 @@ export * from "./lite-llm.js" export * from "./lm-studio.js" export * from "./mistral.js" export * from "./moonshot.js" +export * from "./inception.js" export * from "./ollama.js" export * from "./openai.js" export * from "./openai-codex.js" From 52e9aa28fd1c096ec525fc0d1e1a7e0042b3aea4 Mon Sep 17 00:00:00 2001 From: Dennesssy <139027232+Dennesssy@users.noreply.github.com> Date: Thu, 5 Mar 2026 05:47:09 -0700 Subject: [PATCH 08/12] feat: register InceptionHandler in src/api/index.ts --- src/api/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/api/index.ts b/src/api/index.ts index ebc2682a1a8..4690d470f32 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -18,6 +18,7 @@ import { OpenAiNativeHandler, DeepSeekHandler, MoonshotHandler, + InceptionHandler, MistralHandler, VsCodeLmHandler, RequestyHandler, @@ -146,6 +147,8 @@ export function buildApiHandler(configuration: ProviderSettings): ApiHandler { return new QwenCodeHandler(options) case "moonshot": return new MoonshotHandler(options) + case "inception": + return new InceptionHandler(options) case "vscode-lm": return new VsCodeLmHandler(options) case "mistral": From b801017309e54a70cc32f46793965ab223f33e6a Mon Sep 17 00:00:00 2001 From: Dennesssy <139027232+Dennesssy@users.noreply.github.com> Date: Thu, 5 Mar 2026 05:47:10 -0700 Subject: [PATCH 09/12] feat: export InceptionHandler from providers/index.ts --- src/api/providers/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/providers/index.ts b/src/api/providers/index.ts index b6de7952104..aa030decef5 100644 --- a/src/api/providers/index.ts +++ b/src/api/providers/index.ts @@ -3,6 +3,7 @@ export { AnthropicHandler } from "./anthropic" export { AwsBedrockHandler } from "./bedrock" export { DeepSeekHandler } from "./deepseek" export { MoonshotHandler } from "./moonshot" +export { InceptionHandler } from "./inception" export { FakeAIHandler } from "./fake-ai" export { GeminiHandler } from "./gemini" export { LiteLLMHandler } from "./lite-llm" From 994996a9b4f7493b84c98a49a193ab49640f200b Mon Sep 17 00:00:00 2001 From: Dennesssy <139027232+Dennesssy@users.noreply.github.com> Date: Thu, 5 Mar 2026 06:20:27 -0700 Subject: [PATCH 10/12] fix: add missing UI, i18n, and code quality fixes for inception provider - Add Inception.tsx settings UI component for API key/base URL input - Register Inception in providers/index.ts and ApiOptions.tsx - Add inceptionDefaultModelId to model picker config in ApiOptions.tsx - Add inception i18n translation keys to all 18 locales - Remove cacheReadsPrice from mercury-edit (supportsPromptCache is false) - Use INCEPTION_DEFAULT_TEMPERATURE constant in handler (was hardcoded) - Use inceptionModelInfoSaneDefaults as fallback in handler Co-Authored-By: Claude Sonnet 4.6 --- packages/types/src/providers/inception.ts | 1 - src/api/providers/inception.ts | 8 +-- .../src/components/settings/ApiOptions.tsx | 11 ++++ .../settings/providers/Inception.tsx | 62 +++++++++++++++++++ .../components/settings/providers/index.ts | 1 + webview-ui/src/i18n/locales/ca/settings.json | 3 + webview-ui/src/i18n/locales/de/settings.json | 3 + webview-ui/src/i18n/locales/en/settings.json | 3 + webview-ui/src/i18n/locales/es/settings.json | 3 + webview-ui/src/i18n/locales/fr/settings.json | 3 + webview-ui/src/i18n/locales/hi/settings.json | 3 + webview-ui/src/i18n/locales/id/settings.json | 3 + webview-ui/src/i18n/locales/it/settings.json | 3 + webview-ui/src/i18n/locales/ja/settings.json | 3 + webview-ui/src/i18n/locales/ko/settings.json | 3 + webview-ui/src/i18n/locales/nl/settings.json | 3 + webview-ui/src/i18n/locales/pl/settings.json | 3 + .../src/i18n/locales/pt-BR/settings.json | 3 + webview-ui/src/i18n/locales/ru/settings.json | 3 + webview-ui/src/i18n/locales/tr/settings.json | 3 + webview-ui/src/i18n/locales/vi/settings.json | 3 + .../src/i18n/locales/zh-CN/settings.json | 3 + .../src/i18n/locales/zh-TW/settings.json | 3 + 23 files changed, 132 insertions(+), 5 deletions(-) create mode 100644 webview-ui/src/components/settings/providers/Inception.tsx diff --git a/packages/types/src/providers/inception.ts b/packages/types/src/providers/inception.ts index 43d929e527f..4ecabb4cad6 100644 --- a/packages/types/src/providers/inception.ts +++ b/packages/types/src/providers/inception.ts @@ -24,7 +24,6 @@ export const inceptionModels = { supportsPromptCache: false, inputPrice: 0.25, outputPrice: 0.75, - cacheReadsPrice: 0.025, supportsTemperature: true, description: "Mercury Edit: A code editing LLM for autocomplete (FIM), apply edit, and next edit suggestions", }, diff --git a/src/api/providers/inception.ts b/src/api/providers/inception.ts index abfbce1f22c..9d67b6b48c8 100644 --- a/src/api/providers/inception.ts +++ b/src/api/providers/inception.ts @@ -1,4 +1,4 @@ -import { inceptionModels, inceptionDefaultModelId, type ModelInfo } from "@roo-code/types" +import { inceptionModels, inceptionDefaultModelId, inceptionModelInfoSaneDefaults, INCEPTION_DEFAULT_TEMPERATURE, type ModelInfo } from "@roo-code/types" import type { ApiHandlerOptions } from "../../shared/api" import { getModelParams } from "../transform/model-params" import { OpenAICompatibleHandler, OpenAICompatibleConfig } from "./openai-compatible" @@ -6,7 +6,7 @@ import { OpenAICompatibleHandler, OpenAICompatibleConfig } from "./openai-compat export class InceptionHandler extends OpenAICompatibleHandler { constructor(options: ApiHandlerOptions) { const modelId = options.apiModelId ?? inceptionDefaultModelId - const modelInfo = inceptionModels[modelId as keyof typeof inceptionModels] || inceptionModels[inceptionDefaultModelId] + const modelInfo = inceptionModels[modelId as keyof typeof inceptionModels] || inceptionModelInfoSaneDefaults const config: OpenAICompatibleConfig = { providerName: "inception", @@ -23,14 +23,14 @@ export class InceptionHandler extends OpenAICompatibleHandler { override getModel() { const id = this.options.apiModelId ?? inceptionDefaultModelId - const info = inceptionModels[id as keyof typeof inceptionModels] || inceptionModels[inceptionDefaultModelId] + const info = inceptionModels[id as keyof typeof inceptionModels] || inceptionModelInfoSaneDefaults const params = getModelParams({ format: "openai", modelId: id, model: info, settings: this.options, - defaultTemperature: 0.7, + defaultTemperature: INCEPTION_DEFAULT_TEMPERATURE, }) return { id, info, ...params } diff --git a/webview-ui/src/components/settings/ApiOptions.tsx b/webview-ui/src/components/settings/ApiOptions.tsx index 4d914a4833a..615dec85d90 100644 --- a/webview-ui/src/components/settings/ApiOptions.tsx +++ b/webview-ui/src/components/settings/ApiOptions.tsx @@ -19,6 +19,7 @@ import { geminiDefaultModelId, deepSeekDefaultModelId, moonshotDefaultModelId, + inceptionDefaultModelId, mistralDefaultModelId, xaiDefaultModelId, basetenDefaultModelId, @@ -75,6 +76,7 @@ import { LiteLLM, Mistral, Moonshot, + Inception, Ollama, OpenAI, OpenAICompatible, @@ -341,6 +343,7 @@ const ApiOptions = ({ gemini: { field: "apiModelId", default: geminiDefaultModelId }, deepseek: { field: "apiModelId", default: deepSeekDefaultModelId }, moonshot: { field: "apiModelId", default: moonshotDefaultModelId }, + inception: { field: "apiModelId", default: inceptionDefaultModelId }, minimax: { field: "apiModelId", default: minimaxDefaultModelId }, mistral: { field: "apiModelId", default: mistralDefaultModelId }, xai: { field: "apiModelId", default: xaiDefaultModelId }, @@ -639,6 +642,14 @@ const ApiOptions = ({ /> )} + {selectedProvider === "inception" && ( + + )} + {selectedProvider === "minimax" && ( void + simplifySettings?: boolean +} + +export const Inception = ({ apiConfiguration, setApiConfigurationField }: InceptionProps) => { + const { t } = useAppTranslation() + + const handleInputChange = useCallback( + ( + field: K, + transform: (event: E) => ProviderSettings[K] = inputEventTransform, + ) => + (event: E | Event) => { + setApiConfigurationField(field, transform(event as E)) + }, + [setApiConfigurationField], + ) + + return ( + <> +
+ + + +
+
+ + + +
+ {t("settings:providers.apiKeyStorageNotice")} +
+ {!apiConfiguration?.inceptionApiKey && ( + + {t("settings:providers.getInceptionApiKey")} + + )} +
+ + ) +} diff --git a/webview-ui/src/components/settings/providers/index.ts b/webview-ui/src/components/settings/providers/index.ts index 597caffd1d7..cc36007d09b 100644 --- a/webview-ui/src/components/settings/providers/index.ts +++ b/webview-ui/src/components/settings/providers/index.ts @@ -5,6 +5,7 @@ export { Gemini } from "./Gemini" export { LMStudio } from "./LMStudio" export { Mistral } from "./Mistral" export { Moonshot } from "./Moonshot" +export { Inception } from "./Inception" export { Ollama } from "./Ollama" export { OpenAI } from "./OpenAI" export { OpenAICodex } from "./OpenAICodex" diff --git a/webview-ui/src/i18n/locales/ca/settings.json b/webview-ui/src/i18n/locales/ca/settings.json index 2c83cabbbcb..930cffc7ce4 100644 --- a/webview-ui/src/i18n/locales/ca/settings.json +++ b/webview-ui/src/i18n/locales/ca/settings.json @@ -387,6 +387,9 @@ "moonshotApiKey": "Clau API de Moonshot", "getMoonshotApiKey": "Obtenir clau API de Moonshot", "moonshotBaseUrl": "Punt d'entrada de Moonshot", + "inceptionApiKey": "Inception API Key", + "getInceptionApiKey": "Get Inception API Key", + "inceptionBaseUrl": "Inception Base URL", "zaiApiKey": "Clau API de Z AI", "getZaiApiKey": "Obtenir clau API de Z AI", "zaiEntrypoint": "Punt d'entrada de Z AI", diff --git a/webview-ui/src/i18n/locales/de/settings.json b/webview-ui/src/i18n/locales/de/settings.json index c31d29147d4..81218f880a0 100644 --- a/webview-ui/src/i18n/locales/de/settings.json +++ b/webview-ui/src/i18n/locales/de/settings.json @@ -387,6 +387,9 @@ "moonshotApiKey": "Moonshot API-Schlüssel", "getMoonshotApiKey": "Moonshot API-Schlüssel erhalten", "moonshotBaseUrl": "Moonshot-Einstiegspunkt", + "inceptionApiKey": "Inception API Key", + "getInceptionApiKey": "Get Inception API Key", + "inceptionBaseUrl": "Inception Base URL", "zaiApiKey": "Z AI API-Schlüssel", "getZaiApiKey": "Z AI API-Schlüssel erhalten", "zaiEntrypoint": "Z AI Einstiegspunkt", diff --git a/webview-ui/src/i18n/locales/en/settings.json b/webview-ui/src/i18n/locales/en/settings.json index 3b2497aaee7..80269d5bf52 100644 --- a/webview-ui/src/i18n/locales/en/settings.json +++ b/webview-ui/src/i18n/locales/en/settings.json @@ -450,6 +450,9 @@ "moonshotApiKey": "Moonshot API Key", "getMoonshotApiKey": "Get Moonshot API Key", "moonshotBaseUrl": "Moonshot Entrypoint", + "inceptionApiKey": "Inception API Key", + "getInceptionApiKey": "Get Inception API Key", + "inceptionBaseUrl": "Inception Base URL", "minimaxApiKey": "MiniMax API Key", "getMiniMaxApiKey": "Get MiniMax API Key", "minimaxBaseUrl": "MiniMax Entrypoint", diff --git a/webview-ui/src/i18n/locales/es/settings.json b/webview-ui/src/i18n/locales/es/settings.json index 6595c4f9079..c3beb93c64d 100644 --- a/webview-ui/src/i18n/locales/es/settings.json +++ b/webview-ui/src/i18n/locales/es/settings.json @@ -387,6 +387,9 @@ "moonshotApiKey": "Clave API de Moonshot", "getMoonshotApiKey": "Obtener clave API de Moonshot", "moonshotBaseUrl": "Punto de entrada de Moonshot", + "inceptionApiKey": "Inception API Key", + "getInceptionApiKey": "Get Inception API Key", + "inceptionBaseUrl": "Inception Base URL", "zaiApiKey": "Clave API de Z AI", "getZaiApiKey": "Obtener clave API de Z AI", "zaiEntrypoint": "Punto de entrada de Z AI", diff --git a/webview-ui/src/i18n/locales/fr/settings.json b/webview-ui/src/i18n/locales/fr/settings.json index 56337bda14c..2cad724ce8a 100644 --- a/webview-ui/src/i18n/locales/fr/settings.json +++ b/webview-ui/src/i18n/locales/fr/settings.json @@ -387,6 +387,9 @@ "moonshotApiKey": "Clé API Moonshot", "getMoonshotApiKey": "Obtenir la clé API Moonshot", "moonshotBaseUrl": "Point d'entrée Moonshot", + "inceptionApiKey": "Inception API Key", + "getInceptionApiKey": "Get Inception API Key", + "inceptionBaseUrl": "Inception Base URL", "zaiApiKey": "Clé API Z AI", "getZaiApiKey": "Obtenir la clé API Z AI", "zaiEntrypoint": "Point d'entrée Z AI", diff --git a/webview-ui/src/i18n/locales/hi/settings.json b/webview-ui/src/i18n/locales/hi/settings.json index abd334bec09..79fc5c341e1 100644 --- a/webview-ui/src/i18n/locales/hi/settings.json +++ b/webview-ui/src/i18n/locales/hi/settings.json @@ -387,6 +387,9 @@ "moonshotApiKey": "Moonshot API कुंजी", "getMoonshotApiKey": "Moonshot API कुंजी प्राप्त करें", "moonshotBaseUrl": "Moonshot प्रवेश बिंदु", + "inceptionApiKey": "Inception API Key", + "getInceptionApiKey": "Get Inception API Key", + "inceptionBaseUrl": "Inception Base URL", "zaiApiKey": "Z AI API कुंजी", "getZaiApiKey": "Z AI API कुंजी प्राप्त करें", "zaiEntrypoint": "Z AI प्रवेश बिंदु", diff --git a/webview-ui/src/i18n/locales/id/settings.json b/webview-ui/src/i18n/locales/id/settings.json index 1ebcf2073b6..48815fc7784 100644 --- a/webview-ui/src/i18n/locales/id/settings.json +++ b/webview-ui/src/i18n/locales/id/settings.json @@ -387,6 +387,9 @@ "moonshotApiKey": "Kunci API Moonshot", "getMoonshotApiKey": "Dapatkan Kunci API Moonshot", "moonshotBaseUrl": "Titik Masuk Moonshot", + "inceptionApiKey": "Inception API Key", + "getInceptionApiKey": "Get Inception API Key", + "inceptionBaseUrl": "Inception Base URL", "zaiApiKey": "Kunci API Z AI", "getZaiApiKey": "Dapatkan Kunci API Z AI", "zaiEntrypoint": "Titik Masuk Z AI", diff --git a/webview-ui/src/i18n/locales/it/settings.json b/webview-ui/src/i18n/locales/it/settings.json index 4a0c7161654..1f940960855 100644 --- a/webview-ui/src/i18n/locales/it/settings.json +++ b/webview-ui/src/i18n/locales/it/settings.json @@ -387,6 +387,9 @@ "moonshotApiKey": "Chiave API Moonshot", "getMoonshotApiKey": "Ottieni chiave API Moonshot", "moonshotBaseUrl": "Punto di ingresso Moonshot", + "inceptionApiKey": "Inception API Key", + "getInceptionApiKey": "Get Inception API Key", + "inceptionBaseUrl": "Inception Base URL", "zaiApiKey": "Chiave API Z AI", "getZaiApiKey": "Ottieni chiave API Z AI", "zaiEntrypoint": "Punto di ingresso Z AI", diff --git a/webview-ui/src/i18n/locales/ja/settings.json b/webview-ui/src/i18n/locales/ja/settings.json index b0d921571af..630d22e0a36 100644 --- a/webview-ui/src/i18n/locales/ja/settings.json +++ b/webview-ui/src/i18n/locales/ja/settings.json @@ -387,6 +387,9 @@ "moonshotApiKey": "Moonshot APIキー", "getMoonshotApiKey": "Moonshot APIキーを取得", "moonshotBaseUrl": "Moonshot エントリーポイント", + "inceptionApiKey": "Inception API Key", + "getInceptionApiKey": "Get Inception API Key", + "inceptionBaseUrl": "Inception Base URL", "zaiApiKey": "Z AI APIキー", "getZaiApiKey": "Z AI APIキーを取得", "zaiEntrypoint": "Z AI エントリーポイント", diff --git a/webview-ui/src/i18n/locales/ko/settings.json b/webview-ui/src/i18n/locales/ko/settings.json index 88fc8e6d79e..e3ad32a91e6 100644 --- a/webview-ui/src/i18n/locales/ko/settings.json +++ b/webview-ui/src/i18n/locales/ko/settings.json @@ -387,6 +387,9 @@ "moonshotApiKey": "Moonshot API 키", "getMoonshotApiKey": "Moonshot API 키 받기", "moonshotBaseUrl": "Moonshot 엔트리포인트", + "inceptionApiKey": "Inception API Key", + "getInceptionApiKey": "Get Inception API Key", + "inceptionBaseUrl": "Inception Base URL", "zaiApiKey": "Z AI API 키", "getZaiApiKey": "Z AI API 키 받기", "zaiEntrypoint": "Z AI 엔트리포인트", diff --git a/webview-ui/src/i18n/locales/nl/settings.json b/webview-ui/src/i18n/locales/nl/settings.json index fcfad37d376..1d5b888c2a2 100644 --- a/webview-ui/src/i18n/locales/nl/settings.json +++ b/webview-ui/src/i18n/locales/nl/settings.json @@ -387,6 +387,9 @@ "moonshotApiKey": "Moonshot API-sleutel", "getMoonshotApiKey": "Moonshot API-sleutel ophalen", "moonshotBaseUrl": "Moonshot-ingangspunt", + "inceptionApiKey": "Inception API Key", + "getInceptionApiKey": "Get Inception API Key", + "inceptionBaseUrl": "Inception Base URL", "zaiApiKey": "Z AI API-sleutel", "getZaiApiKey": "Z AI API-sleutel ophalen", "zaiEntrypoint": "Z AI-ingangspunt", diff --git a/webview-ui/src/i18n/locales/pl/settings.json b/webview-ui/src/i18n/locales/pl/settings.json index fa48bc6b212..d3eed58b3aa 100644 --- a/webview-ui/src/i18n/locales/pl/settings.json +++ b/webview-ui/src/i18n/locales/pl/settings.json @@ -387,6 +387,9 @@ "moonshotApiKey": "Klucz API Moonshot", "getMoonshotApiKey": "Uzyskaj klucz API Moonshot", "moonshotBaseUrl": "Punkt wejścia Moonshot", + "inceptionApiKey": "Inception API Key", + "getInceptionApiKey": "Get Inception API Key", + "inceptionBaseUrl": "Inception Base URL", "zaiApiKey": "Klucz API Z AI", "getZaiApiKey": "Uzyskaj klucz API Z AI", "zaiEntrypoint": "Punkt wejścia Z AI", diff --git a/webview-ui/src/i18n/locales/pt-BR/settings.json b/webview-ui/src/i18n/locales/pt-BR/settings.json index a8387e05121..c92f642970d 100644 --- a/webview-ui/src/i18n/locales/pt-BR/settings.json +++ b/webview-ui/src/i18n/locales/pt-BR/settings.json @@ -387,6 +387,9 @@ "moonshotApiKey": "Chave de API Moonshot", "getMoonshotApiKey": "Obter chave de API Moonshot", "moonshotBaseUrl": "Ponto de entrada Moonshot", + "inceptionApiKey": "Inception API Key", + "getInceptionApiKey": "Get Inception API Key", + "inceptionBaseUrl": "Inception Base URL", "zaiApiKey": "Chave de API Z AI", "getZaiApiKey": "Obter chave de API Z AI", "zaiEntrypoint": "Ponto de entrada Z AI", diff --git a/webview-ui/src/i18n/locales/ru/settings.json b/webview-ui/src/i18n/locales/ru/settings.json index fe24ebee299..c9e0ccd8b0d 100644 --- a/webview-ui/src/i18n/locales/ru/settings.json +++ b/webview-ui/src/i18n/locales/ru/settings.json @@ -387,6 +387,9 @@ "moonshotApiKey": "Moonshot API-ключ", "getMoonshotApiKey": "Получить Moonshot API-ключ", "moonshotBaseUrl": "Точка входа Moonshot", + "inceptionApiKey": "Inception API Key", + "getInceptionApiKey": "Get Inception API Key", + "inceptionBaseUrl": "Inception Base URL", "zaiApiKey": "Z AI API-ключ", "getZaiApiKey": "Получить Z AI API-ключ", "zaiEntrypoint": "Точка входа Z AI", diff --git a/webview-ui/src/i18n/locales/tr/settings.json b/webview-ui/src/i18n/locales/tr/settings.json index 7171718f1c5..265aa539ebd 100644 --- a/webview-ui/src/i18n/locales/tr/settings.json +++ b/webview-ui/src/i18n/locales/tr/settings.json @@ -387,6 +387,9 @@ "moonshotApiKey": "Moonshot API Anahtarı", "getMoonshotApiKey": "Moonshot API Anahtarı Al", "moonshotBaseUrl": "Moonshot Giriş Noktası", + "inceptionApiKey": "Inception API Key", + "getInceptionApiKey": "Get Inception API Key", + "inceptionBaseUrl": "Inception Base URL", "zaiApiKey": "Z AI API Anahtarı", "getZaiApiKey": "Z AI API Anahtarı Al", "zaiEntrypoint": "Z AI Giriş Noktası", diff --git a/webview-ui/src/i18n/locales/vi/settings.json b/webview-ui/src/i18n/locales/vi/settings.json index 95b4f2d6863..fa083d22dea 100644 --- a/webview-ui/src/i18n/locales/vi/settings.json +++ b/webview-ui/src/i18n/locales/vi/settings.json @@ -387,6 +387,9 @@ "moonshotApiKey": "Khóa API Moonshot", "getMoonshotApiKey": "Lấy khóa API Moonshot", "moonshotBaseUrl": "Điểm vào Moonshot", + "inceptionApiKey": "Inception API Key", + "getInceptionApiKey": "Get Inception API Key", + "inceptionBaseUrl": "Inception Base URL", "zaiApiKey": "Khóa API Z AI", "getZaiApiKey": "Lấy khóa API Z AI", "zaiEntrypoint": "Điểm vào Z AI", diff --git a/webview-ui/src/i18n/locales/zh-CN/settings.json b/webview-ui/src/i18n/locales/zh-CN/settings.json index eeba6bb079d..3d92708fe96 100644 --- a/webview-ui/src/i18n/locales/zh-CN/settings.json +++ b/webview-ui/src/i18n/locales/zh-CN/settings.json @@ -387,6 +387,9 @@ "moonshotApiKey": "Moonshot API 密钥", "getMoonshotApiKey": "获取 Moonshot API 密钥", "moonshotBaseUrl": "Moonshot 服务站点", + "inceptionApiKey": "Inception API Key", + "getInceptionApiKey": "Get Inception API Key", + "inceptionBaseUrl": "Inception Base URL", "minimaxApiKey": "MiniMax API 密钥", "getMiniMaxApiKey": "获取 MiniMax API 密钥", "minimaxBaseUrl": "MiniMax 服务站点", diff --git a/webview-ui/src/i18n/locales/zh-TW/settings.json b/webview-ui/src/i18n/locales/zh-TW/settings.json index 9f4241c3dd9..86be581c3fb 100644 --- a/webview-ui/src/i18n/locales/zh-TW/settings.json +++ b/webview-ui/src/i18n/locales/zh-TW/settings.json @@ -397,6 +397,9 @@ "moonshotApiKey": "Moonshot API 金鑰", "getMoonshotApiKey": "取得 Moonshot API 金鑰", "moonshotBaseUrl": "Moonshot 服務端點", + "inceptionApiKey": "Inception API Key", + "getInceptionApiKey": "Get Inception API Key", + "inceptionBaseUrl": "Inception Base URL", "minimaxApiKey": "MiniMax API 金鑰", "getMiniMaxApiKey": "取得 MiniMax API 金鑰", "minimaxBaseUrl": "MiniMax 服務端點", From 9faa89426c8247fca2e11fb854f932140d80056b Mon Sep 17 00:00:00 2001 From: Dennesssy <139027232+Dennesssy@users.noreply.github.com> Date: Thu, 5 Mar 2026 07:05:58 -0700 Subject: [PATCH 11/12] fix: add inception to modelIdKeysByProvider and MODELS_BY_PROVIDER Fixes TypeScript type errors in @roo-code/ipc check-types: - Import inceptionModels in provider-settings.ts - Add inception entry to modelIdKeysByProvider Record - Add inception entry to MODELS_BY_PROVIDER Record Co-Authored-By: Claude Sonnet 4.6 --- packages/types/src/provider-settings.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/types/src/provider-settings.ts b/packages/types/src/provider-settings.ts index 7229fba6ce2..2e80ff012e8 100644 --- a/packages/types/src/provider-settings.ts +++ b/packages/types/src/provider-settings.ts @@ -11,6 +11,7 @@ import { geminiModels, mistralModels, moonshotModels, + inceptionModels, openAiCodexModels, openAiNativeModels, qwenCodeModels, @@ -516,6 +517,7 @@ export const modelIdKeysByProvider: Record = { "gemini-cli": "apiModelId", mistral: "apiModelId", moonshot: "apiModelId", + inception: "apiModelId", minimax: "apiModelId", deepseek: "apiModelId", "qwen-code": "apiModelId", @@ -603,6 +605,11 @@ export const MODELS_BY_PROVIDER: Record< label: "Moonshot", models: Object.keys(moonshotModels), }, + inception: { + id: "inception", + label: "Inception", + models: Object.keys(inceptionModels), + }, minimax: { id: "minimax", label: "MiniMax", From c26795027bfc1fd9fdafbc5576c1188f19219009 Mon Sep 17 00:00:00 2001 From: Dennesssy <139027232+Dennesssy@users.noreply.github.com> Date: Thu, 5 Mar 2026 07:51:08 -0700 Subject: [PATCH 12/12] fix: add missing inception entries across all provider registration files - providers/index.ts: import inceptionDefaultModelId, add case "inception" to getProviderDefaultModelId switch - constants.ts: import inceptionModels, add to MODELS_BY_PROVIDER and PROVIDERS - providerModelConfig.ts: import inceptionDefaultModelId, add to PROVIDER_SERVICE_CONFIG and PROVIDER_DEFAULT_MODEL_IDS - useSelectedModel.ts: import inceptionModels, add case "inception" to switch (fixes TS exhaustive type check error) - checkExistApiConfig.spec.ts: add inceptionApiKey to "all keys undefined" test - inception.spec.ts: fix createMessage test to iterate ApiStream instead of awaiting .text (ApiStream is AsyncGenerator, not a plain object) Co-Authored-By: Claude Sonnet 4.6 --- packages/types/src/providers/index.ts | 3 +++ src/api/providers/__tests__/inception.spec.ts | 13 ++++++++++--- src/shared/__tests__/checkExistApiConfig.spec.ts | 1 + webview-ui/src/components/settings/constants.ts | 3 +++ .../settings/utils/providerModelConfig.ts | 3 +++ .../src/components/ui/hooks/useSelectedModel.ts | 6 ++++++ 6 files changed, 26 insertions(+), 3 deletions(-) diff --git a/packages/types/src/providers/index.ts b/packages/types/src/providers/index.ts index bd14c5e5756..977719f9dfe 100644 --- a/packages/types/src/providers/index.ts +++ b/packages/types/src/providers/index.ts @@ -35,6 +35,7 @@ import { geminiDefaultModelId } from "./gemini.js" import { litellmDefaultModelId } from "./lite-llm.js" import { mistralDefaultModelId } from "./mistral.js" import { moonshotDefaultModelId } from "./moonshot.js" +import { inceptionDefaultModelId } from "./inception.js" import { openAiCodexDefaultModelId } from "./openai-codex.js" import { openRouterDefaultModelId } from "./openrouter.js" import { qwenCodeDefaultModelId } from "./qwen-code.js" @@ -82,6 +83,8 @@ export function getProviderDefaultModelId( return deepSeekDefaultModelId case "moonshot": return moonshotDefaultModelId + case "inception": + return inceptionDefaultModelId case "minimax": return minimaxDefaultModelId case "zai": diff --git a/src/api/providers/__tests__/inception.spec.ts b/src/api/providers/__tests__/inception.spec.ts index 1e5e8673681..cb72c322a4a 100644 --- a/src/api/providers/__tests__/inception.spec.ts +++ b/src/api/providers/__tests__/inception.spec.ts @@ -120,7 +120,7 @@ describe("InceptionHandler", () => { }) describe("createMessage", () => { - it("should create a non-streaming message", async () => { + it("should create a message and yield text chunks", async () => { const systemPrompt = "You are a helpful assistant" const messages: Anthropic.MessageParam[] = [ { @@ -129,10 +129,17 @@ describe("InceptionHandler", () => { }, ] - const result = await handler.createMessage(systemPrompt, messages) + const stream = handler.createMessage(systemPrompt, messages) + const chunks: string[] = [] + + for await (const chunk of stream) { + if (chunk.type === "text") { + chunks.push(chunk.text) + } + } expect(mockCreate).toHaveBeenCalled() - expect(result.text).toBe("Test response") + expect(chunks.join("")).toContain("Test response") }) it("should handle streaming messages", async () => { diff --git a/src/shared/__tests__/checkExistApiConfig.spec.ts b/src/shared/__tests__/checkExistApiConfig.spec.ts index d6dd1db24f3..85956e7a8f6 100644 --- a/src/shared/__tests__/checkExistApiConfig.spec.ts +++ b/src/shared/__tests__/checkExistApiConfig.spec.ts @@ -52,6 +52,7 @@ describe("checkExistKey", () => { openAiNativeApiKey: undefined, deepSeekApiKey: undefined, moonshotApiKey: undefined, + inceptionApiKey: undefined, mistralApiKey: undefined, vsCodeLmModelSelector: undefined, requestyApiKey: undefined, diff --git a/webview-ui/src/components/settings/constants.ts b/webview-ui/src/components/settings/constants.ts index 46789cb67a6..340d07f5673 100644 --- a/webview-ui/src/components/settings/constants.ts +++ b/webview-ui/src/components/settings/constants.ts @@ -5,6 +5,7 @@ import { bedrockModels, deepSeekModels, moonshotModels, + inceptionModels, geminiModels, mistralModels, openAiNativeModels, @@ -24,6 +25,7 @@ export const MODELS_BY_PROVIDER: Partial> = bedrock: bedrockDefaultModelId, deepseek: deepSeekDefaultModelId, moonshot: moonshotDefaultModelId, + inception: inceptionDefaultModelId, gemini: geminiDefaultModelId, mistral: mistralDefaultModelId, "openai-native": openAiNativeDefaultModelId, diff --git a/webview-ui/src/components/ui/hooks/useSelectedModel.ts b/webview-ui/src/components/ui/hooks/useSelectedModel.ts index c32a08990c8..eca195c3cb7 100644 --- a/webview-ui/src/components/ui/hooks/useSelectedModel.ts +++ b/webview-ui/src/components/ui/hooks/useSelectedModel.ts @@ -8,6 +8,7 @@ import { bedrockModels, deepSeekModels, moonshotModels, + inceptionModels, minimaxModels, geminiModels, mistralModels, @@ -241,6 +242,11 @@ function getSelectedModel({ const info = moonshotModels[id as keyof typeof moonshotModels] return { id, info } } + case "inception": { + const id = apiConfiguration.apiModelId ?? defaultModelId + const info = inceptionModels[id as keyof typeof inceptionModels] + return { id, info } + } case "minimax": { const id = apiConfiguration.apiModelId ?? defaultModelId const info = minimaxModels[id as keyof typeof minimaxModels]