@openclaw/kilocode-provider 2026.7.2-beta.5 → 2026.7.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +12 -63
- package/dist/onboard.js +1 -1
- package/dist/provider-catalog.js +3 -2
- package/dist/provider-models.js +10 -11
- package/dist/stream.js +1 -1
- package/openclaw.plugin.json +7 -7
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -4,78 +4,27 @@ import { applyKilocodeConfig } from "./onboard.js";
|
|
|
4
4
|
import { wrapKilocodeProviderStream } from "./stream.js";
|
|
5
5
|
import { readConfiguredProviderCatalogEntries } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
6
6
|
import { defineSingleProviderPluginEntry } from "openclaw/plugin-sdk/provider-entry";
|
|
7
|
-
import {
|
|
8
|
-
//#region extensions/kilocode/openclaw.plugin.json
|
|
9
|
-
var openclaw_plugin_default = {
|
|
10
|
-
id: "kilocode",
|
|
11
|
-
activation: { "onStartup": false },
|
|
12
|
-
enabledByDefault: true,
|
|
13
|
-
providers: ["kilocode"],
|
|
14
|
-
modelPricing: { "providers": { "kilocode": {
|
|
15
|
-
"openRouter": { "passthroughProviderModel": true },
|
|
16
|
-
"liteLLM": { "passthroughProviderModel": true }
|
|
17
|
-
} } },
|
|
18
|
-
setup: { "providers": [{
|
|
19
|
-
"id": "kilocode",
|
|
20
|
-
"envVars": ["KILOCODE_API_KEY"]
|
|
21
|
-
}] },
|
|
22
|
-
providerAuthChoices: [{
|
|
23
|
-
"provider": "kilocode",
|
|
24
|
-
"method": "api-key",
|
|
25
|
-
"choiceId": "kilocode-api-key",
|
|
26
|
-
"appGuidedSecret": true,
|
|
27
|
-
"choiceLabel": "Kilo Gateway API key",
|
|
28
|
-
"choiceHint": "API key (OpenRouter-compatible)",
|
|
29
|
-
"groupId": "kilocode",
|
|
30
|
-
"groupLabel": "Kilo Gateway",
|
|
31
|
-
"groupHint": "API key (OpenRouter-compatible)",
|
|
32
|
-
"optionKey": "kilocodeApiKey",
|
|
33
|
-
"cliFlag": "--kilocode-api-key",
|
|
34
|
-
"cliOption": "--kilocode-api-key <key>",
|
|
35
|
-
"cliDescription": "Kilo Gateway API key"
|
|
36
|
-
}],
|
|
37
|
-
configSchema: {
|
|
38
|
-
"type": "object",
|
|
39
|
-
"additionalProperties": false,
|
|
40
|
-
"properties": {}
|
|
41
|
-
},
|
|
42
|
-
modelCatalog: {
|
|
43
|
-
"providers": { "kilocode": {
|
|
44
|
-
"baseUrl": "https://api.kilo.ai/api/gateway/",
|
|
45
|
-
"api": "openai-completions",
|
|
46
|
-
"models": [{
|
|
47
|
-
"id": "kilo-auto/balanced",
|
|
48
|
-
"name": "Auto Balanced",
|
|
49
|
-
"reasoning": true,
|
|
50
|
-
"input": ["text", "image"],
|
|
51
|
-
"cost": {
|
|
52
|
-
"input": .325,
|
|
53
|
-
"output": 1.95,
|
|
54
|
-
"cacheRead": .0325,
|
|
55
|
-
"cacheWrite": .40625
|
|
56
|
-
},
|
|
57
|
-
"contextWindow": 1e6,
|
|
58
|
-
"maxTokens": 65536
|
|
59
|
-
}]
|
|
60
|
-
} },
|
|
61
|
-
"discovery": { "kilocode": "refreshable" }
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
//#endregion
|
|
7
|
+
import { PASSTHROUGH_GEMINI_REPLAY_HOOKS } from "openclaw/plugin-sdk/provider-model-shared";
|
|
65
8
|
//#region extensions/kilocode/index.ts
|
|
66
9
|
const PROVIDER_ID = "kilocode";
|
|
67
10
|
var kilocode_default = defineSingleProviderPluginEntry({
|
|
68
11
|
id: PROVIDER_ID,
|
|
69
12
|
name: "Kilo Gateway Provider",
|
|
70
13
|
description: "Bundled Kilo Gateway provider plugin",
|
|
71
|
-
manifest: openclaw_plugin_default,
|
|
72
14
|
provider: {
|
|
73
15
|
label: "Kilo Gateway",
|
|
74
16
|
docsPath: "/providers/kilocode",
|
|
75
|
-
|
|
17
|
+
auth: [{
|
|
18
|
+
methodId: "api-key",
|
|
19
|
+
label: "Kilo Gateway API key",
|
|
20
|
+
hint: "API key (OpenRouter-compatible)",
|
|
21
|
+
optionKey: "kilocodeApiKey",
|
|
22
|
+
flagName: "--kilocode-api-key",
|
|
23
|
+
envVar: "KILOCODE_API_KEY",
|
|
24
|
+
promptMessage: "Enter Kilo Gateway API key",
|
|
76
25
|
defaultModel: KILOCODE_DEFAULT_MODEL_REF,
|
|
77
|
-
applyConfig: applyKilocodeConfig
|
|
78
|
-
},
|
|
26
|
+
applyConfig: (cfg) => applyKilocodeConfig(cfg)
|
|
27
|
+
}],
|
|
79
28
|
catalog: {
|
|
80
29
|
buildProvider: buildKilocodeProviderWithDiscovery,
|
|
81
30
|
buildStaticProvider: buildKilocodeProvider
|
|
@@ -84,7 +33,7 @@ var kilocode_default = defineSingleProviderPluginEntry({
|
|
|
84
33
|
config,
|
|
85
34
|
providerId: PROVIDER_ID
|
|
86
35
|
}),
|
|
87
|
-
...
|
|
36
|
+
...PASSTHROUGH_GEMINI_REPLAY_HOOKS,
|
|
88
37
|
wrapStreamFn: wrapKilocodeProviderStream,
|
|
89
38
|
isCacheTtlEligible: (ctx) => ctx.modelId.startsWith("anthropic/")
|
|
90
39
|
}
|
package/dist/onboard.js
CHANGED
package/dist/provider-catalog.js
CHANGED
|
@@ -11,15 +11,16 @@ function buildKilocodeProvider() {
|
|
|
11
11
|
input: model.input,
|
|
12
12
|
cost: KILOCODE_DEFAULT_COST,
|
|
13
13
|
contextWindow: model.contextWindow ?? 1e6,
|
|
14
|
-
maxTokens: model.maxTokens ??
|
|
14
|
+
maxTokens: model.maxTokens ?? 128e3
|
|
15
15
|
}))
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
async function buildKilocodeProviderWithDiscovery() {
|
|
19
|
+
const models = await discoverKilocodeModels();
|
|
19
20
|
return {
|
|
20
21
|
baseUrl: KILOCODE_BASE_URL,
|
|
21
22
|
api: "openai-completions",
|
|
22
|
-
models
|
|
23
|
+
models
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
26
|
//#endregion
|
package/dist/provider-models.js
CHANGED
|
@@ -5,9 +5,9 @@ import { asPositiveSafeInteger, normalizeLowercaseStringOrEmpty } from "openclaw
|
|
|
5
5
|
//#region extensions/kilocode/provider-models.ts
|
|
6
6
|
const log = createSubsystemLogger("kilocode-models");
|
|
7
7
|
const KILOCODE_BASE_URL = "https://api.kilo.ai/api/gateway/";
|
|
8
|
-
const KILOCODE_DEFAULT_MODEL_ID = "kilo
|
|
8
|
+
const KILOCODE_DEFAULT_MODEL_ID = "kilo/auto";
|
|
9
9
|
const KILOCODE_DEFAULT_MODEL_REF = `kilocode/${KILOCODE_DEFAULT_MODEL_ID}`;
|
|
10
|
-
const KILOCODE_DEFAULT_MODEL_NAME = "Auto
|
|
10
|
+
const KILOCODE_DEFAULT_MODEL_NAME = "Kilo Auto";
|
|
11
11
|
const KILOCODE_MODEL_CATALOG = [{
|
|
12
12
|
id: KILOCODE_DEFAULT_MODEL_ID,
|
|
13
13
|
name: KILOCODE_DEFAULT_MODEL_NAME,
|
|
@@ -15,12 +15,12 @@ const KILOCODE_MODEL_CATALOG = [{
|
|
|
15
15
|
reasoning: true
|
|
16
16
|
}];
|
|
17
17
|
const KILOCODE_DEFAULT_CONTEXT_WINDOW = 1e6;
|
|
18
|
-
const KILOCODE_DEFAULT_MAX_TOKENS =
|
|
18
|
+
const KILOCODE_DEFAULT_MAX_TOKENS = 128e3;
|
|
19
19
|
const KILOCODE_DEFAULT_COST = {
|
|
20
|
-
input:
|
|
21
|
-
output:
|
|
22
|
-
cacheRead:
|
|
23
|
-
cacheWrite:
|
|
20
|
+
input: 0,
|
|
21
|
+
output: 0,
|
|
22
|
+
cacheRead: 0,
|
|
23
|
+
cacheWrite: 0
|
|
24
24
|
};
|
|
25
25
|
const KILOCODE_MODELS_URL = `${KILOCODE_BASE_URL}models`;
|
|
26
26
|
const DISCOVERY_TIMEOUT_MS = 5e3;
|
|
@@ -53,7 +53,7 @@ function toModelDefinition(entry) {
|
|
|
53
53
|
cacheWrite: toPricePerMillion(entry.pricing.input_cache_write)
|
|
54
54
|
},
|
|
55
55
|
contextWindow: asPositiveSafeInteger(entry.context_length) ?? 1e6,
|
|
56
|
-
maxTokens: asPositiveSafeInteger(entry.top_provider?.max_completion_tokens) ??
|
|
56
|
+
maxTokens: asPositiveSafeInteger(entry.top_provider?.max_completion_tokens) ?? 128e3
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
function buildStaticCatalog() {
|
|
@@ -64,7 +64,7 @@ function buildStaticCatalog() {
|
|
|
64
64
|
input: model.input,
|
|
65
65
|
cost: KILOCODE_DEFAULT_COST,
|
|
66
66
|
contextWindow: model.contextWindow ?? 1e6,
|
|
67
|
-
maxTokens: model.maxTokens ??
|
|
67
|
+
maxTokens: model.maxTokens ?? 128e3
|
|
68
68
|
}));
|
|
69
69
|
}
|
|
70
70
|
function asGatewayModelEntry(value) {
|
|
@@ -90,7 +90,6 @@ async function discoverKilocodeModels() {
|
|
|
90
90
|
});
|
|
91
91
|
try {
|
|
92
92
|
if (!response.ok) {
|
|
93
|
-
await response.body?.cancel().catch(() => void 0);
|
|
94
93
|
log.warn(`Failed to discover models: HTTP ${response.status}, using static catalog`);
|
|
95
94
|
return buildStaticCatalog();
|
|
96
95
|
}
|
|
@@ -105,7 +104,7 @@ async function discoverKilocodeModels() {
|
|
|
105
104
|
const id = readGatewayModelId(rawEntry);
|
|
106
105
|
try {
|
|
107
106
|
const entry = asGatewayModelEntry(rawEntry);
|
|
108
|
-
if (!id || discoveredIds.has(id)
|
|
107
|
+
if (!id || discoveredIds.has(id)) continue;
|
|
109
108
|
models.push(toModelDefinition(entry));
|
|
110
109
|
discoveredIds.add(id);
|
|
111
110
|
} catch (e) {
|
package/dist/stream.js
CHANGED
|
@@ -30,7 +30,7 @@ function isProxyReasoningUnsupported(modelId) {
|
|
|
30
30
|
return slashIndex > 0 && trimmed?.slice(0, slashIndex) === "x-ai";
|
|
31
31
|
}
|
|
32
32
|
function resolveKilocodeThinkingLevel(ctx) {
|
|
33
|
-
if (ctx.modelId === "kilo
|
|
33
|
+
if (ctx.modelId === "kilo/auto" || isProxyReasoningUnsupported(ctx.modelId)) return;
|
|
34
34
|
return ctx.thinkingLevel;
|
|
35
35
|
}
|
|
36
36
|
function createKilocodeStreamWrapper(baseStreamFn, thinkingLevel) {
|
package/openclaw.plugin.json
CHANGED
|
@@ -54,18 +54,18 @@
|
|
|
54
54
|
"api": "openai-completions",
|
|
55
55
|
"models": [
|
|
56
56
|
{
|
|
57
|
-
"id": "kilo
|
|
58
|
-
"name": "Auto
|
|
57
|
+
"id": "kilo/auto",
|
|
58
|
+
"name": "Kilo Auto",
|
|
59
59
|
"reasoning": true,
|
|
60
60
|
"input": ["text", "image"],
|
|
61
61
|
"cost": {
|
|
62
|
-
"input": 0
|
|
63
|
-
"output":
|
|
64
|
-
"cacheRead": 0
|
|
65
|
-
"cacheWrite": 0
|
|
62
|
+
"input": 0,
|
|
63
|
+
"output": 0,
|
|
64
|
+
"cacheRead": 0,
|
|
65
|
+
"cacheWrite": 0
|
|
66
66
|
},
|
|
67
67
|
"contextWindow": 1000000,
|
|
68
|
-
"maxTokens":
|
|
68
|
+
"maxTokens": 128000
|
|
69
69
|
}
|
|
70
70
|
]
|
|
71
71
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/kilocode-provider",
|
|
3
|
-
"version": "2026.7.
|
|
3
|
+
"version": "2026.7.33",
|
|
4
4
|
"description": "OpenClaw Kilo Gateway provider plugin.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"minHostVersion": ">=2026.6.8"
|
|
19
19
|
},
|
|
20
20
|
"compat": {
|
|
21
|
-
"pluginApi": ">=2026.7.
|
|
21
|
+
"pluginApi": ">=2026.7.33"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.7.
|
|
24
|
+
"openclawVersion": "2026.7.33",
|
|
25
25
|
"bundledDist": false
|
|
26
26
|
},
|
|
27
27
|
"release": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"README.md"
|
|
39
39
|
],
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"openclaw": ">=2026.7.
|
|
41
|
+
"openclaw": ">=2026.7.33"
|
|
42
42
|
},
|
|
43
43
|
"peerDependenciesMeta": {
|
|
44
44
|
"openclaw": {
|