@openclaw/groq-provider 2026.7.2-beta.4 → 2026.7.2-beta.5

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/api.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region extensions/groq/api.ts
2
- const GROQ_QWEN3_32B_ID = "qwen/qwen3-32b";
2
+ const GROQ_QWEN3_6_27B_ID = "qwen/qwen3.6-27b";
3
3
  const GROQ_GPT_OSS_REASONING_IDS = /* @__PURE__ */ new Set([
4
4
  "openai/gpt-oss-20b",
5
5
  "openai/gpt-oss-120b",
@@ -27,7 +27,7 @@ function normalizeGroqModelId(modelId) {
27
27
  }
28
28
  function resolveGroqReasoningCompatPatch(modelId) {
29
29
  const normalized = normalizeGroqModelId(modelId);
30
- if (normalized === GROQ_QWEN3_32B_ID) return {
30
+ if (normalized === GROQ_QWEN3_6_27B_ID) return {
31
31
  supportsReasoningEffort: true,
32
32
  supportedReasoningEfforts: [...GROQ_QWEN_REASONING_EFFORTS],
33
33
  reasoningEffortMap: GROQ_QWEN_REASONING_EFFORT_MAP
package/dist/index.js CHANGED
@@ -1,161 +1,178 @@
1
1
  import { groqMediaUnderstandingProvider } from "./media-understanding-provider.js";
2
2
  import { createAssistantMessageEventStream, streamSimple } from "openclaw/plugin-sdk/llm";
3
- import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
4
- import { createProviderApiKeyAuthMethod } from "openclaw/plugin-sdk/provider-auth-api-key";
5
- import { buildOpenAICompatibleProviderCatalog } from "openclaw/plugin-sdk/provider-catalog-live-runtime";
6
- import { buildManifestModelProviderConfig } from "openclaw/plugin-sdk/provider-catalog-shared";
3
+ import { defineSingleProviderPluginEntry } from "openclaw/plugin-sdk/provider-entry";
7
4
  //#region extensions/groq/openclaw.plugin.json
8
- var modelCatalog = {
9
- "providers": { "groq": {
10
- "baseUrl": "https://api.groq.com/openai/v1",
11
- "api": "openai-completions",
12
- "models": [
13
- {
14
- "id": "groq/compound",
15
- "name": "Compound",
16
- "reasoning": true,
17
- "input": ["text"],
18
- "contextWindow": 131072,
19
- "maxTokens": 8192,
20
- "cost": {
21
- "input": 0,
22
- "output": 0,
23
- "cacheRead": 0,
24
- "cacheWrite": 0
25
- }
26
- },
27
- {
28
- "id": "groq/compound-mini",
29
- "name": "Compound Mini",
30
- "reasoning": true,
31
- "input": ["text"],
32
- "contextWindow": 131072,
33
- "maxTokens": 8192,
34
- "cost": {
35
- "input": 0,
36
- "output": 0,
37
- "cacheRead": 0,
38
- "cacheWrite": 0
39
- }
40
- },
41
- {
42
- "id": "llama-3.1-8b-instant",
43
- "name": "Llama 3.1 8B Instant",
44
- "reasoning": false,
45
- "input": ["text"],
46
- "contextWindow": 131072,
47
- "maxTokens": 131072,
48
- "cost": {
49
- "input": .05,
50
- "output": .08,
51
- "cacheRead": 0,
52
- "cacheWrite": 0
53
- }
54
- },
55
- {
56
- "id": "llama-3.3-70b-versatile",
57
- "name": "Llama 3.3 70B Versatile",
58
- "reasoning": false,
59
- "input": ["text"],
60
- "contextWindow": 131072,
61
- "maxTokens": 32768,
62
- "cost": {
63
- "input": .59,
64
- "output": .79,
65
- "cacheRead": 0,
66
- "cacheWrite": 0
67
- }
68
- },
69
- {
70
- "id": "meta-llama/llama-4-scout-17b-16e-instruct",
71
- "name": "Llama 4 Scout 17B",
72
- "reasoning": false,
73
- "input": ["text", "image"],
74
- "mediaInput": { "image": {
75
- "maxPixels": 33177600,
76
- "preferredSidePx": 2048,
77
- "tokenMode": "provider"
78
- } },
79
- "contextWindow": 131072,
80
- "maxTokens": 8192,
81
- "cost": {
82
- "input": .11,
83
- "output": .34,
84
- "cacheRead": 0,
85
- "cacheWrite": 0
86
- }
87
- },
88
- {
89
- "id": "openai/gpt-oss-120b",
90
- "name": "GPT OSS 120B",
91
- "reasoning": true,
92
- "input": ["text"],
93
- "contextWindow": 131072,
94
- "maxTokens": 65536,
95
- "cost": {
96
- "input": .15,
97
- "output": .6,
98
- "cacheRead": 0,
99
- "cacheWrite": 0
100
- }
101
- },
102
- {
103
- "id": "openai/gpt-oss-20b",
104
- "name": "GPT OSS 20B",
105
- "reasoning": true,
106
- "input": ["text"],
107
- "contextWindow": 131072,
108
- "maxTokens": 65536,
109
- "cost": {
110
- "input": .075,
111
- "output": .3,
112
- "cacheRead": 0,
113
- "cacheWrite": 0
114
- }
115
- },
116
- {
117
- "id": "openai/gpt-oss-safeguard-20b",
118
- "name": "Safety GPT OSS 20B",
119
- "reasoning": true,
120
- "input": ["text"],
121
- "contextWindow": 131072,
122
- "maxTokens": 65536,
123
- "cost": {
124
- "input": .075,
125
- "output": .3,
126
- "cacheRead": .037,
127
- "cacheWrite": 0
128
- }
129
- },
130
- {
131
- "id": "qwen/qwen3-32b",
132
- "name": "Qwen3 32B",
133
- "reasoning": true,
134
- "input": ["text"],
135
- "contextWindow": 131072,
136
- "maxTokens": 40960,
137
- "cost": {
138
- "input": .29,
139
- "output": .59,
140
- "cacheRead": 0,
141
- "cacheWrite": 0
5
+ var openclaw_plugin_default = {
6
+ id: "groq",
7
+ activation: { "onStartup": false },
8
+ enabledByDefault: true,
9
+ providers: ["groq"],
10
+ providerEndpoints: [{
11
+ "endpointClass": "groq-native",
12
+ "hosts": ["api.groq.com"]
13
+ }],
14
+ providerRequest: { "providers": { "groq": { "family": "groq" } } },
15
+ setup: { "providers": [{
16
+ "id": "groq",
17
+ "authMethods": ["api-key"],
18
+ "envVars": ["GROQ_API_KEY"]
19
+ }] },
20
+ providerAuthChoices: [{
21
+ "provider": "groq",
22
+ "method": "api-key",
23
+ "choiceId": "groq-api-key",
24
+ "appGuidedSecret": true,
25
+ "choiceLabel": "Groq API key",
26
+ "choiceHint": "Fast OpenAI-compatible inference",
27
+ "groupId": "groq",
28
+ "groupLabel": "Groq",
29
+ "optionKey": "groqApiKey",
30
+ "cliFlag": "--groq-api-key",
31
+ "cliOption": "--groq-api-key <key>",
32
+ "cliDescription": "Groq API key"
33
+ }],
34
+ modelCatalog: {
35
+ "providers": { "groq": {
36
+ "baseUrl": "https://api.groq.com/openai/v1",
37
+ "api": "openai-completions",
38
+ "defaultModel": "openai/gpt-oss-120b",
39
+ "models": [
40
+ {
41
+ "id": "groq/compound",
42
+ "name": "Compound",
43
+ "reasoning": false,
44
+ "input": ["text"],
45
+ "contextWindow": 131072,
46
+ "maxTokens": 8192,
47
+ "cost": {
48
+ "input": 0,
49
+ "output": 0,
50
+ "cacheRead": 0,
51
+ "cacheWrite": 0
52
+ }
53
+ },
54
+ {
55
+ "id": "groq/compound-mini",
56
+ "name": "Compound Mini",
57
+ "reasoning": false,
58
+ "input": ["text"],
59
+ "contextWindow": 131072,
60
+ "maxTokens": 8192,
61
+ "cost": {
62
+ "input": 0,
63
+ "output": 0,
64
+ "cacheRead": 0,
65
+ "cacheWrite": 0
66
+ }
67
+ },
68
+ {
69
+ "id": "llama-3.1-8b-instant",
70
+ "name": "Llama 3.1 8B Instant",
71
+ "status": "deprecated",
72
+ "replacedBy": "openai/gpt-oss-20b",
73
+ "reasoning": false,
74
+ "input": ["text"],
75
+ "contextWindow": 131072,
76
+ "maxTokens": 131072,
77
+ "cost": {
78
+ "input": .05,
79
+ "output": .08,
80
+ "cacheRead": 0,
81
+ "cacheWrite": 0
82
+ }
83
+ },
84
+ {
85
+ "id": "llama-3.3-70b-versatile",
86
+ "name": "Llama 3.3 70B Versatile",
87
+ "status": "deprecated",
88
+ "replacedBy": "openai/gpt-oss-120b",
89
+ "reasoning": false,
90
+ "input": ["text"],
91
+ "contextWindow": 131072,
92
+ "maxTokens": 32768,
93
+ "cost": {
94
+ "input": .59,
95
+ "output": .79,
96
+ "cacheRead": 0,
97
+ "cacheWrite": 0
98
+ }
99
+ },
100
+ {
101
+ "id": "openai/gpt-oss-120b",
102
+ "name": "GPT OSS 120B",
103
+ "reasoning": true,
104
+ "input": ["text"],
105
+ "contextWindow": 131072,
106
+ "maxTokens": 65536,
107
+ "cost": {
108
+ "input": .15,
109
+ "output": .6,
110
+ "cacheRead": .075,
111
+ "cacheWrite": 0
112
+ }
113
+ },
114
+ {
115
+ "id": "openai/gpt-oss-20b",
116
+ "name": "GPT OSS 20B",
117
+ "reasoning": true,
118
+ "input": ["text"],
119
+ "contextWindow": 131072,
120
+ "maxTokens": 65536,
121
+ "cost": {
122
+ "input": .075,
123
+ "output": .3,
124
+ "cacheRead": .0375,
125
+ "cacheWrite": 0
126
+ }
127
+ },
128
+ {
129
+ "id": "openai/gpt-oss-safeguard-20b",
130
+ "name": "Safety GPT OSS 20B",
131
+ "reasoning": true,
132
+ "input": ["text"],
133
+ "contextWindow": 131072,
134
+ "maxTokens": 65536,
135
+ "cost": {
136
+ "input": .075,
137
+ "output": .3,
138
+ "cacheRead": .037,
139
+ "cacheWrite": 0
140
+ }
141
+ },
142
+ {
143
+ "id": "qwen/qwen3.6-27b",
144
+ "name": "Qwen 3.6 27B",
145
+ "reasoning": true,
146
+ "input": ["text", "image"],
147
+ "contextWindow": 131072,
148
+ "maxTokens": 16384,
149
+ "cost": {
150
+ "input": .6,
151
+ "output": 3,
152
+ "cacheRead": 0,
153
+ "cacheWrite": 0
154
+ }
142
155
  }
143
- }
144
- ]
156
+ ]
157
+ } },
158
+ "discovery": { "groq": "refreshable" }
159
+ },
160
+ contracts: { "mediaUnderstandingProviders": ["groq"] },
161
+ mediaUnderstandingProviderMetadata: { "groq": {
162
+ "capabilities": ["audio"],
163
+ "defaultModels": { "audio": "whisper-large-v3-turbo" },
164
+ "autoPriority": { "audio": 20 }
145
165
  } },
146
- "discovery": { "groq": "refreshable" }
166
+ configSchema: {
167
+ "type": "object",
168
+ "additionalProperties": false,
169
+ "properties": {}
170
+ }
147
171
  };
148
172
  //#endregion
149
173
  //#region extensions/groq/index.ts
150
- const GROQ_DEFAULT_MODEL_REF = "groq/llama-3.3-70b-versatile";
151
- const GROQ_DEFAULT_MODEL_ID = "llama-3.3-70b-versatile";
174
+ const GROQ_OVERSIZED_RECOVERY_MODEL_ID = "llama-3.3-70b-versatile";
152
175
  const GROQ_FALLBACK_MAX_TOKENS = 1024;
153
- function buildGroqCatalogProvider() {
154
- return buildManifestModelProviderConfig({
155
- providerId: "groq",
156
- catalog: modelCatalog.providers.groq
157
- });
158
- }
159
176
  function hasWireMaxTokens(value) {
160
177
  if (typeof value !== "object" || value === null || Array.isArray(value)) return false;
161
178
  const record = value;
@@ -249,49 +266,18 @@ function wrapGroqOversizedRequestRecovery(streamFn, enabled) {
249
266
  return output;
250
267
  };
251
268
  }
252
- var groq_default = definePluginEntry({
269
+ var groq_default = defineSingleProviderPluginEntry({
253
270
  id: "groq",
254
271
  name: "Groq Provider",
255
272
  description: "Bundled Groq provider plugin",
273
+ manifest: openclaw_plugin_default,
274
+ provider: {
275
+ label: "Groq",
276
+ docsPath: "/providers/groq",
277
+ catalog: { liveModelDiscovery: true },
278
+ wrapStreamFn: (ctx) => wrapGroqOversizedRequestRecovery(ctx.streamFn, ctx.modelId === GROQ_OVERSIZED_RECOVERY_MODEL_ID && !hasExplicitMaxTokens(ctx.extraParams) && !hasExplicitMaxTokens(ctx.model?.params) && ctx.model?.maxTokensSource === "discovered")
279
+ },
256
280
  register(api) {
257
- api.registerProvider({
258
- id: "groq",
259
- label: "Groq",
260
- docsPath: "/providers/groq",
261
- envVars: ["GROQ_API_KEY"],
262
- auth: [createProviderApiKeyAuthMethod({
263
- providerId: "groq",
264
- methodId: "api-key",
265
- label: "Groq API key",
266
- hint: "Fast OpenAI-compatible inference",
267
- optionKey: "groqApiKey",
268
- flagName: "--groq-api-key",
269
- envVar: "GROQ_API_KEY",
270
- promptMessage: "Enter Groq API key",
271
- defaultModel: GROQ_DEFAULT_MODEL_REF,
272
- wizard: {
273
- choiceId: "groq-api-key",
274
- choiceLabel: "Groq API key",
275
- choiceHint: "Fast OpenAI-compatible inference",
276
- groupId: "groq",
277
- groupLabel: "Groq",
278
- groupHint: "Fast OpenAI-compatible inference"
279
- }
280
- })],
281
- catalog: {
282
- order: "simple",
283
- run: (ctx) => buildOpenAICompatibleProviderCatalog({
284
- ctx,
285
- providerId: "groq",
286
- buildProvider: buildGroqCatalogProvider
287
- })
288
- },
289
- staticCatalog: {
290
- order: "simple",
291
- run: async () => ({ provider: buildGroqCatalogProvider() })
292
- },
293
- wrapStreamFn: (ctx) => wrapGroqOversizedRequestRecovery(ctx.streamFn, ctx.modelId === GROQ_DEFAULT_MODEL_ID && !hasExplicitMaxTokens(ctx.extraParams) && !hasExplicitMaxTokens(ctx.model?.params) && ctx.model?.maxTokensSource === "discovered")
294
- });
295
281
  api.registerMediaUnderstandingProvider(groqMediaUnderstandingProvider);
296
282
  }
297
283
  });
@@ -48,11 +48,12 @@
48
48
  "groq": {
49
49
  "baseUrl": "https://api.groq.com/openai/v1",
50
50
  "api": "openai-completions",
51
+ "defaultModel": "openai/gpt-oss-120b",
51
52
  "models": [
52
53
  {
53
54
  "id": "groq/compound",
54
55
  "name": "Compound",
55
- "reasoning": true,
56
+ "reasoning": false,
56
57
  "input": ["text"],
57
58
  "contextWindow": 131072,
58
59
  "maxTokens": 8192,
@@ -66,7 +67,7 @@
66
67
  {
67
68
  "id": "groq/compound-mini",
68
69
  "name": "Compound Mini",
69
- "reasoning": true,
70
+ "reasoning": false,
70
71
  "input": ["text"],
71
72
  "contextWindow": 131072,
72
73
  "maxTokens": 8192,
@@ -80,6 +81,8 @@
80
81
  {
81
82
  "id": "llama-3.1-8b-instant",
82
83
  "name": "Llama 3.1 8B Instant",
84
+ "status": "deprecated",
85
+ "replacedBy": "openai/gpt-oss-20b",
83
86
  "reasoning": false,
84
87
  "input": ["text"],
85
88
  "contextWindow": 131072,
@@ -94,6 +97,8 @@
94
97
  {
95
98
  "id": "llama-3.3-70b-versatile",
96
99
  "name": "Llama 3.3 70B Versatile",
100
+ "status": "deprecated",
101
+ "replacedBy": "openai/gpt-oss-120b",
97
102
  "reasoning": false,
98
103
  "input": ["text"],
99
104
  "contextWindow": 131072,
@@ -105,23 +110,6 @@
105
110
  "cacheWrite": 0
106
111
  }
107
112
  },
108
- {
109
- "id": "meta-llama/llama-4-scout-17b-16e-instruct",
110
- "name": "Llama 4 Scout 17B",
111
- "reasoning": false,
112
- "input": ["text", "image"],
113
- "mediaInput": {
114
- "image": { "maxPixels": 33177600, "preferredSidePx": 2048, "tokenMode": "provider" }
115
- },
116
- "contextWindow": 131072,
117
- "maxTokens": 8192,
118
- "cost": {
119
- "input": 0.11,
120
- "output": 0.34,
121
- "cacheRead": 0,
122
- "cacheWrite": 0
123
- }
124
- },
125
113
  {
126
114
  "id": "openai/gpt-oss-120b",
127
115
  "name": "GPT OSS 120B",
@@ -132,7 +120,7 @@
132
120
  "cost": {
133
121
  "input": 0.15,
134
122
  "output": 0.6,
135
- "cacheRead": 0,
123
+ "cacheRead": 0.075,
136
124
  "cacheWrite": 0
137
125
  }
138
126
  },
@@ -146,7 +134,7 @@
146
134
  "cost": {
147
135
  "input": 0.075,
148
136
  "output": 0.3,
149
- "cacheRead": 0,
137
+ "cacheRead": 0.0375,
150
138
  "cacheWrite": 0
151
139
  }
152
140
  },
@@ -165,15 +153,15 @@
165
153
  }
166
154
  },
167
155
  {
168
- "id": "qwen/qwen3-32b",
169
- "name": "Qwen3 32B",
156
+ "id": "qwen/qwen3.6-27b",
157
+ "name": "Qwen 3.6 27B",
170
158
  "reasoning": true,
171
- "input": ["text"],
159
+ "input": ["text", "image"],
172
160
  "contextWindow": 131072,
173
- "maxTokens": 40960,
161
+ "maxTokens": 16384,
174
162
  "cost": {
175
- "input": 0.29,
176
- "output": 0.59,
163
+ "input": 0.6,
164
+ "output": 3,
177
165
  "cacheRead": 0,
178
166
  "cacheWrite": 0
179
167
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/groq-provider",
3
- "version": "2026.7.2-beta.4",
3
+ "version": "2026.7.2-beta.5",
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.7.2-beta.4"
21
+ "pluginApi": ">=2026.7.2-beta.5"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.7.2-beta.4",
24
+ "openclawVersion": "2026.7.2-beta.5",
25
25
  "bundledDist": false
26
26
  },
27
27
  "release": {
@@ -35,11 +35,10 @@
35
35
  "files": [
36
36
  "dist/**",
37
37
  "openclaw.plugin.json",
38
- "npm-shrinkwrap.json",
39
38
  "README.md"
40
39
  ],
41
40
  "peerDependencies": {
42
- "openclaw": ">=2026.7.2-beta.4"
41
+ "openclaw": ">=2026.7.2-beta.5"
43
42
  },
44
43
  "peerDependenciesMeta": {
45
44
  "openclaw": {
@@ -1,12 +0,0 @@
1
- {
2
- "name": "@openclaw/groq-provider",
3
- "version": "2026.7.2-beta.4",
4
- "lockfileVersion": 3,
5
- "requires": true,
6
- "packages": {
7
- "": {
8
- "name": "@openclaw/groq-provider",
9
- "version": "2026.7.2-beta.4"
10
- }
11
- }
12
- }