@openclaw/kilocode-provider 2026.8.1-beta.3 → 2026.8.1
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/provider-models.js +5 -6
- package/package.json +4 -4
package/dist/provider-models.js
CHANGED
|
@@ -22,11 +22,9 @@ const KILOCODE_DEFAULT_COST = {
|
|
|
22
22
|
};
|
|
23
23
|
const KILOCODE_MODELS_URL = `${KILOCODE_BASE_URL}models`;
|
|
24
24
|
const DISCOVERY_TIMEOUT_MS = 5e3;
|
|
25
|
-
function toPricePerMillion(perToken) {
|
|
26
|
-
if (!perToken) return 0;
|
|
25
|
+
function toPricePerMillion(perToken, fallback = 0) {
|
|
27
26
|
const num = Number(perToken);
|
|
28
|
-
|
|
29
|
-
return num * 1e6;
|
|
27
|
+
return Number.isFinite(num) && num >= 0 ? num * 1e6 : fallback;
|
|
30
28
|
}
|
|
31
29
|
function parseModality(entry) {
|
|
32
30
|
const modalities = entry.architecture?.input_modalities;
|
|
@@ -39,14 +37,15 @@ function parseReasoning(entry) {
|
|
|
39
37
|
return params.includes("reasoning") || params.includes("include_reasoning");
|
|
40
38
|
}
|
|
41
39
|
function toModelDefinition(entry) {
|
|
40
|
+
const fallbackCost = entry.id === "kilo-auto/balanced" ? KILOCODE_DEFAULT_COST : void 0;
|
|
42
41
|
return {
|
|
43
42
|
id: entry.id,
|
|
44
43
|
name: entry.name || entry.id,
|
|
45
44
|
reasoning: parseReasoning(entry),
|
|
46
45
|
input: parseModality(entry),
|
|
47
46
|
cost: {
|
|
48
|
-
input: toPricePerMillion(entry.pricing.prompt),
|
|
49
|
-
output: toPricePerMillion(entry.pricing.completion),
|
|
47
|
+
input: toPricePerMillion(entry.pricing.prompt, fallbackCost?.input),
|
|
48
|
+
output: toPricePerMillion(entry.pricing.completion, fallbackCost?.output),
|
|
50
49
|
cacheRead: toPricePerMillion(entry.pricing.input_cache_read),
|
|
51
50
|
cacheWrite: toPricePerMillion(entry.pricing.input_cache_write)
|
|
52
51
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/kilocode-provider",
|
|
3
|
-
"version": "2026.8.1
|
|
3
|
+
"version": "2026.8.1",
|
|
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.8.1
|
|
21
|
+
"pluginApi": ">=2026.8.1"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.8.1
|
|
24
|
+
"openclawVersion": "2026.8.1",
|
|
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.8.1
|
|
41
|
+
"openclaw": ">=2026.8.1"
|
|
42
42
|
},
|
|
43
43
|
"peerDependenciesMeta": {
|
|
44
44
|
"openclaw": {
|