@openclaw/fireworks-provider 2026.10.5-beta.4 → 2026.10.10-beta.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.
|
@@ -34,51 +34,20 @@ var openclaw_plugin_default = {
|
|
|
34
34
|
"baseUrl": "https://api.fireworks.ai/inference/v1",
|
|
35
35
|
"api": "openai-completions",
|
|
36
36
|
"defaultModel": "accounts/fireworks/routers/glm-5p3-fast",
|
|
37
|
-
"models": [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"cacheWrite": 0
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"id": "accounts/fireworks/models/kimi-k2p6",
|
|
54
|
-
"name": "Kimi K2.6",
|
|
55
|
-
"reasoning": false,
|
|
56
|
-
"input": ["text", "image"],
|
|
57
|
-
"contextWindow": 262144,
|
|
58
|
-
"maxTokens": 262144,
|
|
59
|
-
"cost": {
|
|
60
|
-
"input": .95,
|
|
61
|
-
"output": 4,
|
|
62
|
-
"cacheRead": .16,
|
|
63
|
-
"cacheWrite": 0
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"id": "accounts/fireworks/routers/kimi-k2p6-turbo",
|
|
68
|
-
"name": "Kimi K2.6 Fast",
|
|
69
|
-
"reasoning": false,
|
|
70
|
-
"input": ["text", "image"],
|
|
71
|
-
"contextWindow": 262144,
|
|
72
|
-
"maxTokens": 256e3,
|
|
73
|
-
"compat": { "unsupportedToolSchemaKeywords": ["not"] },
|
|
74
|
-
"cost": {
|
|
75
|
-
"input": 2,
|
|
76
|
-
"output": 8,
|
|
77
|
-
"cacheRead": .3,
|
|
78
|
-
"cacheWrite": 0
|
|
79
|
-
}
|
|
37
|
+
"models": [{
|
|
38
|
+
"id": "accounts/fireworks/routers/glm-5p3-fast",
|
|
39
|
+
"name": "GLM 5.3 Fast",
|
|
40
|
+
"reasoning": true,
|
|
41
|
+
"input": ["text"],
|
|
42
|
+
"contextWindow": 256e3,
|
|
43
|
+
"maxTokens": 256e3,
|
|
44
|
+
"cost": {
|
|
45
|
+
"input": 2.1,
|
|
46
|
+
"output": 6.6,
|
|
47
|
+
"cacheRead": .39,
|
|
48
|
+
"cacheWrite": 0
|
|
80
49
|
}
|
|
81
|
-
]
|
|
50
|
+
}]
|
|
82
51
|
} },
|
|
83
52
|
"discovery": { "fireworks": "refreshable" }
|
|
84
53
|
},
|
|
@@ -97,6 +66,9 @@ const FIREWORKS_MANIFEST_PROVIDER = buildManifestModelProviderConfig({
|
|
|
97
66
|
const FIREWORKS_DEFAULT_MODEL_REF = readManifestProviderDefaultModelRef(openclaw_plugin_default, "fireworks");
|
|
98
67
|
const FIREWORKS_BASE_URL = FIREWORKS_MANIFEST_PROVIDER.baseUrl;
|
|
99
68
|
const FIREWORKS_DEFAULT_MODEL_ID = FIREWORKS_DEFAULT_MODEL_REF.slice(10);
|
|
69
|
+
function isFireworksNativeModel(model, sourceApi = model?.api) {
|
|
70
|
+
return sourceApi === "openai-completions" && model?.baseUrl?.replace(/\/+$/, "") === FIREWORKS_BASE_URL;
|
|
71
|
+
}
|
|
100
72
|
const FIREWORKS_DEFAULT_MODEL = FIREWORKS_MANIFEST_PROVIDER.models.find((model) => model.id === FIREWORKS_DEFAULT_MODEL_ID);
|
|
101
73
|
if (!FIREWORKS_DEFAULT_MODEL) throw new Error(`Missing Fireworks modelCatalog row ${FIREWORKS_DEFAULT_MODEL_ID}`);
|
|
102
74
|
const FIREWORKS_DEFAULT_CONTEXT_WINDOW = FIREWORKS_DEFAULT_MODEL.contextWindow;
|
|
@@ -114,4 +86,4 @@ function buildFireworksProvider() {
|
|
|
114
86
|
});
|
|
115
87
|
}
|
|
116
88
|
//#endregion
|
|
117
|
-
export { FIREWORKS_DEFAULT_MODEL_REF as a, isFireworksCatalogModelId as c, FIREWORKS_DEFAULT_MODEL_ID as i,
|
|
89
|
+
export { FIREWORKS_DEFAULT_MODEL_REF as a, isFireworksCatalogModelId as c, FIREWORKS_DEFAULT_MODEL_ID as i, isFireworksNativeModel as l, FIREWORKS_DEFAULT_CONTEXT_WINDOW as n, buildFireworksCatalogModels as o, FIREWORKS_DEFAULT_MAX_TOKENS as r, buildFireworksProvider as s, FIREWORKS_BASE_URL as t, openclaw_plugin_default as u };
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { isFireworksKimiModelId } from "./model-id.js";
|
|
2
|
-
import { c as isFireworksCatalogModelId, i as FIREWORKS_DEFAULT_MODEL_ID, l as
|
|
2
|
+
import { c as isFireworksCatalogModelId, i as FIREWORKS_DEFAULT_MODEL_ID, l as isFireworksNativeModel, n as FIREWORKS_DEFAULT_CONTEXT_WINDOW, r as FIREWORKS_DEFAULT_MAX_TOKENS, t as FIREWORKS_BASE_URL, u as openclaw_plugin_default } from "./.setup/provider-catalog-D1IIkEc_.mjs";
|
|
3
3
|
import { applyFireworksConfig } from "./onboard.js";
|
|
4
4
|
import { wrapFireworksProviderStream } from "./stream.js";
|
|
5
5
|
import { resolveFireworksThinkingProfile } from "./thinking-policy.js";
|
|
6
6
|
import { defineSingleProviderPluginEntry } from "openclaw/plugin-sdk/provider-entry";
|
|
7
|
-
import { buildProviderReplayFamilyHooks, resolveFamilyForwardCompatModel } from "openclaw/plugin-sdk/provider-model-shared";
|
|
7
|
+
import { applyModelCompatPatch, buildProviderReplayFamilyHooks, resolveFamilyForwardCompatModel } from "openclaw/plugin-sdk/provider-model-shared";
|
|
8
8
|
//#region extensions/fireworks/index.ts
|
|
9
9
|
const PROVIDER_ID = "fireworks";
|
|
10
10
|
function isFireworksGlmModelId(modelId) {
|
|
@@ -53,6 +53,10 @@ var fireworks_default = defineSingleProviderPluginEntry({
|
|
|
53
53
|
liveModelDiscovery: true
|
|
54
54
|
},
|
|
55
55
|
...buildProviderReplayFamilyHooks({ family: "openai-compatible" }),
|
|
56
|
+
normalizeResolvedModel: ({ model }) => isFireworksNativeModel(model) ? applyModelCompatPatch(model, {
|
|
57
|
+
supportsPromptCacheKey: model.compat?.supportsPromptCacheKey ?? true,
|
|
58
|
+
supportsLongCacheRetention: model.compat?.supportsLongCacheRetention ?? false
|
|
59
|
+
}) : model,
|
|
56
60
|
wrapStreamFn: wrapFireworksProviderStream,
|
|
57
61
|
resolveThinkingProfile: ({ modelId }) => resolveFireworksThinkingProfile(modelId),
|
|
58
62
|
resolveDynamicModel: resolveFireworksDynamicModel,
|
package/dist/onboard.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as FIREWORKS_DEFAULT_MODEL_REF, i as FIREWORKS_DEFAULT_MODEL_ID, o as buildFireworksCatalogModels, s as buildFireworksProvider } from "./.setup/provider-catalog-
|
|
1
|
+
import { a as FIREWORKS_DEFAULT_MODEL_REF, i as FIREWORKS_DEFAULT_MODEL_ID, o as buildFireworksCatalogModels, s as buildFireworksProvider } from "./.setup/provider-catalog-D1IIkEc_.mjs";
|
|
2
2
|
import { createDefaultModelsConnectionPresetAppliers } from "openclaw/plugin-sdk/provider-onboard";
|
|
3
3
|
//#region extensions/fireworks/onboard.ts
|
|
4
4
|
const { applyConfig: applyFireworksConfig } = createDefaultModelsConnectionPresetAppliers({
|
package/dist/provider-catalog.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { FIREWORKS_BASE_URL, FIREWORKS_DEFAULT_CONTEXT_WINDOW, FIREWORKS_DEFAULT_MAX_TOKENS, FIREWORKS_DEFAULT_MODEL_ID, FIREWORKS_DEFAULT_MODEL_REF, buildFireworksCatalogModels, buildFireworksProvider, isFireworksCatalogModelId };
|
|
1
|
+
export { t as FIREWORKS_BASE_URL, n as FIREWORKS_DEFAULT_CONTEXT_WINDOW, r as FIREWORKS_DEFAULT_MAX_TOKENS, i as FIREWORKS_DEFAULT_MODEL_ID, a as FIREWORKS_DEFAULT_MODEL_REF, o as buildFireworksCatalogModels, s as buildFireworksProvider, c as isFireworksCatalogModelId, l as isFireworksNativeModel } from "./.setup/provider-catalog-D1IIkEc_.mjs";
|
package/dist/stream.js
CHANGED
|
@@ -1,19 +1,50 @@
|
|
|
1
1
|
import { isFireworksKimiModelId } from "./model-id.js";
|
|
2
|
+
import { l as isFireworksNativeModel } from "./.setup/provider-catalog-D1IIkEc_.mjs";
|
|
2
3
|
import { normalizeProviderId } from "openclaw/plugin-sdk/provider-model-shared";
|
|
3
|
-
import {
|
|
4
|
+
import { calculateCost, streamSimple } from "openclaw/plugin-sdk/llm";
|
|
5
|
+
import { createPayloadPatchStreamWrapper, transformProviderStreamMessages } from "openclaw/plugin-sdk/provider-stream-shared";
|
|
4
6
|
//#region extensions/fireworks/stream.ts
|
|
5
7
|
function isFireworksProviderId(providerId) {
|
|
6
8
|
const normalized = normalizeProviderId(providerId);
|
|
7
9
|
return normalized === "fireworks" || normalized === "fireworks-ai";
|
|
8
10
|
}
|
|
9
11
|
function wrapFireworksProviderStream(ctx) {
|
|
10
|
-
if (!isFireworksProviderId(ctx.provider) || ctx.model?.api !== "openai-completions"
|
|
11
|
-
|
|
12
|
+
if (!isFireworksProviderId(ctx.provider) || (ctx.sourceApi ?? ctx.model?.api) !== "openai-completions") return;
|
|
13
|
+
const isKimi = isFireworksKimiModelId(ctx.modelId);
|
|
14
|
+
const isNative = isFireworksNativeModel(ctx.model, ctx.sourceApi);
|
|
15
|
+
if (!isKimi && !isNative) return;
|
|
16
|
+
const underlying = isKimi ? createPayloadPatchStreamWrapper(ctx.streamFn, ({ payload }) => {
|
|
12
17
|
payload.thinking = { type: "disabled" };
|
|
13
18
|
delete payload.reasoning;
|
|
14
19
|
delete payload.reasoning_effort;
|
|
15
20
|
delete payload.reasoningEffort;
|
|
16
|
-
});
|
|
21
|
+
}) : ctx.streamFn ?? streamSimple;
|
|
22
|
+
if (!isNative) return underlying;
|
|
23
|
+
return async (model, context, options) => {
|
|
24
|
+
let cache;
|
|
25
|
+
const stream = await underlying(model, context, {
|
|
26
|
+
...options,
|
|
27
|
+
onResponse(response, responseModel) {
|
|
28
|
+
const prompt = Number(response.headers["fireworks-prompt-tokens"]?.trim() || NaN);
|
|
29
|
+
const read = Number(response.headers["fireworks-cached-prompt-tokens"]?.trim() || NaN);
|
|
30
|
+
cache = Number.isSafeInteger(prompt) && Number.isSafeInteger(read) && read >= 0 && read <= prompt ? {
|
|
31
|
+
prompt,
|
|
32
|
+
read
|
|
33
|
+
} : void 0;
|
|
34
|
+
return options?.onResponse?.(response, responseModel);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
return transformProviderStreamMessages(stream, (message) => {
|
|
38
|
+
const usage = message.usage;
|
|
39
|
+
if (!cache || usage.cacheTelemetry?.state !== "unavailable" || usage.input + usage.cacheRead + usage.cacheWrite !== cache.prompt) return;
|
|
40
|
+
usage.input -= cache.read;
|
|
41
|
+
usage.cacheRead = cache.read;
|
|
42
|
+
usage.cacheTelemetry = { state: "available" };
|
|
43
|
+
const billedTotal = usage.cost.total;
|
|
44
|
+
calculateCost(model, usage);
|
|
45
|
+
if (usage.cost.totalOrigin === "provider-billed") usage.cost.total = billedTotal;
|
|
46
|
+
});
|
|
47
|
+
};
|
|
17
48
|
}
|
|
18
49
|
//#endregion
|
|
19
50
|
export { wrapFireworksProviderStream };
|
package/openclaw.plugin.json
CHANGED
|
@@ -59,37 +59,6 @@
|
|
|
59
59
|
"cacheRead": 0.39,
|
|
60
60
|
"cacheWrite": 0
|
|
61
61
|
}
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"id": "accounts/fireworks/models/kimi-k2p6",
|
|
65
|
-
"name": "Kimi K2.6",
|
|
66
|
-
"reasoning": false,
|
|
67
|
-
"input": ["text", "image"],
|
|
68
|
-
"contextWindow": 262144,
|
|
69
|
-
"maxTokens": 262144,
|
|
70
|
-
"cost": {
|
|
71
|
-
"input": 0.95,
|
|
72
|
-
"output": 4,
|
|
73
|
-
"cacheRead": 0.16,
|
|
74
|
-
"cacheWrite": 0
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"id": "accounts/fireworks/routers/kimi-k2p6-turbo",
|
|
79
|
-
"name": "Kimi K2.6 Fast",
|
|
80
|
-
"reasoning": false,
|
|
81
|
-
"input": ["text", "image"],
|
|
82
|
-
"contextWindow": 262144,
|
|
83
|
-
"maxTokens": 256000,
|
|
84
|
-
"compat": {
|
|
85
|
-
"unsupportedToolSchemaKeywords": ["not"]
|
|
86
|
-
},
|
|
87
|
-
"cost": {
|
|
88
|
-
"input": 2,
|
|
89
|
-
"output": 8,
|
|
90
|
-
"cacheRead": 0.3,
|
|
91
|
-
"cacheWrite": 0
|
|
92
|
-
}
|
|
93
62
|
}
|
|
94
63
|
]
|
|
95
64
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/fireworks-provider",
|
|
3
|
-
"version": "2026.10.
|
|
3
|
+
"version": "2026.10.10-beta.1",
|
|
4
4
|
"description": "OpenClaw Fireworks provider plugin",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"openclaw": {
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"minHostVersion": ">=2026.6.9"
|
|
15
15
|
},
|
|
16
16
|
"compat": {
|
|
17
|
-
"pluginApi": ">=2026.10.
|
|
17
|
+
"pluginApi": ">=2026.10.10-beta.1"
|
|
18
18
|
},
|
|
19
19
|
"build": {
|
|
20
|
-
"openclawVersion": "2026.10.
|
|
20
|
+
"openclawVersion": "2026.10.10-beta.1",
|
|
21
21
|
"bundledDist": false
|
|
22
22
|
},
|
|
23
23
|
"release": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"assets/activity.svg"
|
|
41
41
|
],
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"openclaw": ">=2026.10.
|
|
43
|
+
"openclaw": ">=2026.10.10-beta.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependenciesMeta": {
|
|
46
46
|
"openclaw": {
|