Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit c267950

Browse files
Dennesssyclaude
andcommitted
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 <noreply@anthropic.com>
1 parent 9faa894 commit c267950

6 files changed

Lines changed: 26 additions & 3 deletions

File tree

packages/types/src/providers/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import { geminiDefaultModelId } from "./gemini.js"
3535
import { litellmDefaultModelId } from "./lite-llm.js"
3636
import { mistralDefaultModelId } from "./mistral.js"
3737
import { moonshotDefaultModelId } from "./moonshot.js"
38+
import { inceptionDefaultModelId } from "./inception.js"
3839
import { openAiCodexDefaultModelId } from "./openai-codex.js"
3940
import { openRouterDefaultModelId } from "./openrouter.js"
4041
import { qwenCodeDefaultModelId } from "./qwen-code.js"
@@ -82,6 +83,8 @@ export function getProviderDefaultModelId(
8283
return deepSeekDefaultModelId
8384
case "moonshot":
8485
return moonshotDefaultModelId
86+
case "inception":
87+
return inceptionDefaultModelId
8588
case "minimax":
8689
return minimaxDefaultModelId
8790
case "zai":

src/api/providers/__tests__/inception.spec.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ describe("InceptionHandler", () => {
120120
})
121121

122122
describe("createMessage", () => {
123-
it("should create a non-streaming message", async () => {
123+
it("should create a message and yield text chunks", async () => {
124124
const systemPrompt = "You are a helpful assistant"
125125
const messages: Anthropic.MessageParam[] = [
126126
{
@@ -129,10 +129,17 @@ describe("InceptionHandler", () => {
129129
},
130130
]
131131

132-
const result = await handler.createMessage(systemPrompt, messages)
132+
const stream = handler.createMessage(systemPrompt, messages)
133+
const chunks: string[] = []
134+
135+
for await (const chunk of stream) {
136+
if (chunk.type === "text") {
137+
chunks.push(chunk.text)
138+
}
139+
}
133140

134141
expect(mockCreate).toHaveBeenCalled()
135-
expect(result.text).toBe("Test response")
142+
expect(chunks.join("")).toContain("Test response")
136143
})
137144

138145
it("should handle streaming messages", async () => {

src/shared/__tests__/checkExistApiConfig.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ describe("checkExistKey", () => {
5252
openAiNativeApiKey: undefined,
5353
deepSeekApiKey: undefined,
5454
moonshotApiKey: undefined,
55+
inceptionApiKey: undefined,
5556
mistralApiKey: undefined,
5657
vsCodeLmModelSelector: undefined,
5758
requestyApiKey: undefined,

webview-ui/src/components/settings/constants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
bedrockModels,
66
deepSeekModels,
77
moonshotModels,
8+
inceptionModels,
89
geminiModels,
910
mistralModels,
1011
openAiNativeModels,
@@ -24,6 +25,7 @@ export const MODELS_BY_PROVIDER: Partial<Record<ProviderName, Record<string, Mod
2425
bedrock: bedrockModels,
2526
deepseek: deepSeekModels,
2627
moonshot: moonshotModels,
28+
inception: inceptionModels,
2729
gemini: geminiModels,
2830
mistral: mistralModels,
2931
"openai-native": openAiNativeModels,
@@ -44,6 +46,7 @@ export const PROVIDERS = [
4446
{ value: "gemini", label: "Google Gemini", proxy: false },
4547
{ value: "deepseek", label: "DeepSeek", proxy: false },
4648
{ value: "moonshot", label: "Moonshot", proxy: false },
49+
{ value: "inception", label: "Inception", proxy: false },
4750
{ value: "openai-native", label: "OpenAI", proxy: false },
4851
{ value: "openai-codex", label: "OpenAI - ChatGPT Plus/Pro", proxy: false },
4952
{ value: "openai", label: "OpenAI Compatible", proxy: true },

webview-ui/src/components/settings/utils/providerModelConfig.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
bedrockDefaultModelId,
55
deepSeekDefaultModelId,
66
moonshotDefaultModelId,
7+
inceptionDefaultModelId,
78
geminiDefaultModelId,
89
mistralDefaultModelId,
910
openAiNativeDefaultModelId,
@@ -30,6 +31,7 @@ export const PROVIDER_SERVICE_CONFIG: Partial<Record<ProviderName, ProviderServi
3031
bedrock: { serviceName: "Amazon Bedrock", serviceUrl: "https://aws.amazon.com/bedrock" },
3132
deepseek: { serviceName: "DeepSeek", serviceUrl: "https://platform.deepseek.com" },
3233
moonshot: { serviceName: "Moonshot", serviceUrl: "https://platform.moonshot.cn" },
34+
inception: { serviceName: "Inception", serviceUrl: "https://app.inceptionlabs.ai" },
3335
gemini: { serviceName: "Google Gemini", serviceUrl: "https://ai.google.dev" },
3436
mistral: { serviceName: "Mistral", serviceUrl: "https://console.mistral.ai" },
3537
"openai-native": { serviceName: "OpenAI", serviceUrl: "https://platform.openai.com" },
@@ -54,6 +56,7 @@ export const PROVIDER_DEFAULT_MODEL_IDS: Partial<Record<ProviderName, string>> =
5456
bedrock: bedrockDefaultModelId,
5557
deepseek: deepSeekDefaultModelId,
5658
moonshot: moonshotDefaultModelId,
59+
inception: inceptionDefaultModelId,
5760
gemini: geminiDefaultModelId,
5861
mistral: mistralDefaultModelId,
5962
"openai-native": openAiNativeDefaultModelId,

webview-ui/src/components/ui/hooks/useSelectedModel.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
bedrockModels,
99
deepSeekModels,
1010
moonshotModels,
11+
inceptionModels,
1112
minimaxModels,
1213
geminiModels,
1314
mistralModels,
@@ -241,6 +242,11 @@ function getSelectedModel({
241242
const info = moonshotModels[id as keyof typeof moonshotModels]
242243
return { id, info }
243244
}
245+
case "inception": {
246+
const id = apiConfiguration.apiModelId ?? defaultModelId
247+
const info = inceptionModels[id as keyof typeof inceptionModels]
248+
return { id, info }
249+
}
244250
case "minimax": {
245251
const id = apiConfiguration.apiModelId ?? defaultModelId
246252
const info = minimaxModels[id as keyof typeof minimaxModels]

0 commit comments

Comments
 (0)