@openclaw/groq-provider 2026.9.8 → 2026.10.1-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.
- package/dist/index.js +9 -10
- package/package.json +4 -4
- package/dist/api.js +0 -42
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { groqMediaUnderstandingProvider } from "./media-understanding-provider.j
|
|
|
2
2
|
import { t as openclaw_plugin_default } from "./.setup/openclaw.plugin-D8U6uSHC.mjs";
|
|
3
3
|
import { createAssistantMessageEventStream, streamSimple } from "openclaw/plugin-sdk/llm";
|
|
4
4
|
import { defineSingleProviderPluginEntry } from "openclaw/plugin-sdk/provider-entry";
|
|
5
|
-
import { createEmptyTransportUsage } from "openclaw/plugin-sdk/provider-transport-runtime";
|
|
5
|
+
import { buildAssistantMessage, createEmptyTransportUsage } from "openclaw/plugin-sdk/provider-transport-runtime";
|
|
6
6
|
//#region extensions/groq/index.ts
|
|
7
7
|
const GROQ_OVERSIZED_RECOVERY_MODEL_ID = "llama-3.3-70b-versatile";
|
|
8
8
|
const GROQ_FALLBACK_MAX_TOKENS = 1024;
|
|
@@ -63,19 +63,18 @@ function wrapGroqOversizedRequestRecovery(streamFn, enabled) {
|
|
|
63
63
|
for await (const event of fallback) output.push(event);
|
|
64
64
|
}
|
|
65
65
|
} catch (error) {
|
|
66
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
66
67
|
output.push({
|
|
67
68
|
type: "error",
|
|
68
69
|
reason: "error",
|
|
69
70
|
error: {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
errorMessage: error instanceof Error ? error.message : String(error),
|
|
78
|
-
timestamp: Date.now()
|
|
71
|
+
...buildAssistantMessage({
|
|
72
|
+
model,
|
|
73
|
+
content: [],
|
|
74
|
+
usage: createEmptyTransportUsage(),
|
|
75
|
+
stopReason: "error"
|
|
76
|
+
}),
|
|
77
|
+
errorMessage
|
|
79
78
|
}
|
|
80
79
|
});
|
|
81
80
|
} finally {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/groq-provider",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.10.1-beta.1",
|
|
4
4
|
"description": "OpenClaw Groq media-understanding provider.",
|
|
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.
|
|
21
|
+
"pluginApi": ">=2026.10.1-beta.1"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.
|
|
24
|
+
"openclawVersion": "2026.10.1-beta.1",
|
|
25
25
|
"bundledDist": false
|
|
26
26
|
},
|
|
27
27
|
"release": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"assets/activity.svg"
|
|
41
41
|
],
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"openclaw": ">=2026.
|
|
43
|
+
"openclaw": ">=2026.10.1-beta.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependenciesMeta": {
|
|
46
46
|
"openclaw": {
|
package/dist/api.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
//#region extensions/groq/api.ts
|
|
2
|
-
const GROQ_QWEN3_6_27B_ID = "qwen/qwen3.6-27b";
|
|
3
|
-
const GROQ_GPT_OSS_REASONING_IDS = /* @__PURE__ */ new Set([
|
|
4
|
-
"openai/gpt-oss-20b",
|
|
5
|
-
"openai/gpt-oss-120b",
|
|
6
|
-
"openai/gpt-oss-safeguard-20b"
|
|
7
|
-
]);
|
|
8
|
-
const GROQ_QWEN_REASONING_EFFORTS = ["none", "default"];
|
|
9
|
-
const GROQ_GPT_OSS_REASONING_EFFORTS = [
|
|
10
|
-
"low",
|
|
11
|
-
"medium",
|
|
12
|
-
"high"
|
|
13
|
-
];
|
|
14
|
-
const GROQ_QWEN_REASONING_EFFORT_MAP = {
|
|
15
|
-
off: "none",
|
|
16
|
-
none: "none",
|
|
17
|
-
minimal: "default",
|
|
18
|
-
low: "default",
|
|
19
|
-
medium: "default",
|
|
20
|
-
high: "default",
|
|
21
|
-
xhigh: "default",
|
|
22
|
-
adaptive: "default",
|
|
23
|
-
max: "default"
|
|
24
|
-
};
|
|
25
|
-
function normalizeGroqModelId(modelId) {
|
|
26
|
-
return modelId?.trim().toLowerCase() ?? "";
|
|
27
|
-
}
|
|
28
|
-
function resolveGroqReasoningCompatPatch(modelId) {
|
|
29
|
-
const normalized = normalizeGroqModelId(modelId);
|
|
30
|
-
if (normalized === GROQ_QWEN3_6_27B_ID) return {
|
|
31
|
-
supportsReasoningEffort: true,
|
|
32
|
-
supportedReasoningEfforts: [...GROQ_QWEN_REASONING_EFFORTS],
|
|
33
|
-
reasoningEffortMap: GROQ_QWEN_REASONING_EFFORT_MAP
|
|
34
|
-
};
|
|
35
|
-
if (GROQ_GPT_OSS_REASONING_IDS.has(normalized)) return {
|
|
36
|
-
supportsReasoningEffort: true,
|
|
37
|
-
supportedReasoningEfforts: [...GROQ_GPT_OSS_REASONING_EFFORTS]
|
|
38
|
-
};
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
//#endregion
|
|
42
|
-
export { resolveGroqReasoningCompatPatch };
|