@openclaw/groq-provider 0.0.0 → 2026.6.9-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/README.md CHANGED
@@ -1,3 +1,12 @@
1
- # @openclaw/groq-provider
1
+ # OpenClaw Groq Provider
2
2
 
3
- Reserved placeholder for the official OpenClaw plugin package. Use a published release version instead.
3
+ Official OpenClaw provider plugin for Groq.
4
+
5
+ Install from OpenClaw:
6
+
7
+ ```bash
8
+ openclaw plugins install @openclaw/groq-provider
9
+ openclaw gateway restart
10
+ ```
11
+
12
+ See <https://docs.openclaw.ai/providers/groq> for setup and configuration.
package/dist/api.js ADDED
@@ -0,0 +1,42 @@
1
+ //#region extensions/groq/api.ts
2
+ const GROQ_QWEN3_32B_ID = "qwen/qwen3-32b";
3
+ const GROQ_GPT_OSS_REASONING_IDS = 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_32B_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 };
package/dist/index.js ADDED
@@ -0,0 +1,40 @@
1
+ import { groqMediaUnderstandingProvider } from "./media-understanding-provider.js";
2
+ import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
3
+ import { createProviderApiKeyAuthMethod } from "openclaw/plugin-sdk/provider-auth-api-key";
4
+ //#region extensions/groq/index.ts
5
+ const GROQ_DEFAULT_MODEL_REF = "groq/llama-3.3-70b-versatile";
6
+ var groq_default = definePluginEntry({
7
+ id: "groq",
8
+ name: "Groq Provider",
9
+ description: "Bundled Groq provider plugin",
10
+ register(api) {
11
+ api.registerProvider({
12
+ id: "groq",
13
+ label: "Groq",
14
+ docsPath: "/providers/groq",
15
+ envVars: ["GROQ_API_KEY"],
16
+ auth: [createProviderApiKeyAuthMethod({
17
+ providerId: "groq",
18
+ methodId: "api-key",
19
+ label: "Groq API key",
20
+ hint: "Fast OpenAI-compatible inference",
21
+ optionKey: "groqApiKey",
22
+ flagName: "--groq-api-key",
23
+ envVar: "GROQ_API_KEY",
24
+ promptMessage: "Enter Groq API key",
25
+ defaultModel: GROQ_DEFAULT_MODEL_REF,
26
+ wizard: {
27
+ choiceId: "groq-api-key",
28
+ choiceLabel: "Groq API key",
29
+ choiceHint: "Fast OpenAI-compatible inference",
30
+ groupId: "groq",
31
+ groupLabel: "Groq",
32
+ groupHint: "Fast OpenAI-compatible inference"
33
+ }
34
+ })]
35
+ });
36
+ api.registerMediaUnderstandingProvider(groqMediaUnderstandingProvider);
37
+ }
38
+ });
39
+ //#endregion
40
+ export { groq_default as default };
@@ -0,0 +1,18 @@
1
+ import { transcribeOpenAiCompatibleAudio } from "openclaw/plugin-sdk/media-understanding";
2
+ //#region extensions/groq/media-understanding-provider.ts
3
+ const DEFAULT_GROQ_AUDIO_BASE_URL = "https://api.groq.com/openai/v1";
4
+ const DEFAULT_GROQ_AUDIO_MODEL = "whisper-large-v3-turbo";
5
+ const groqMediaUnderstandingProvider = {
6
+ id: "groq",
7
+ capabilities: ["audio"],
8
+ defaultModels: { audio: DEFAULT_GROQ_AUDIO_MODEL },
9
+ autoPriority: { audio: 20 },
10
+ transcribeAudio: (req) => transcribeOpenAiCompatibleAudio({
11
+ ...req,
12
+ baseUrl: req.baseUrl ?? DEFAULT_GROQ_AUDIO_BASE_URL,
13
+ defaultBaseUrl: DEFAULT_GROQ_AUDIO_BASE_URL,
14
+ defaultModel: DEFAULT_GROQ_AUDIO_MODEL
15
+ })
16
+ };
17
+ //#endregion
18
+ export { groqMediaUnderstandingProvider };
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "@openclaw/groq-provider",
3
+ "version": "2026.6.9-beta.1",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "@openclaw/groq-provider",
9
+ "version": "2026.6.9-beta.1"
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,191 @@
1
+ {
2
+ "id": "groq",
3
+ "activation": {
4
+ "onStartup": false
5
+ },
6
+ "enabledByDefault": true,
7
+ "providers": ["groq"],
8
+ "providerEndpoints": [
9
+ {
10
+ "endpointClass": "groq-native",
11
+ "hosts": ["api.groq.com"]
12
+ }
13
+ ],
14
+ "providerRequest": {
15
+ "providers": {
16
+ "groq": {
17
+ "family": "groq"
18
+ }
19
+ }
20
+ },
21
+ "setup": {
22
+ "providers": [
23
+ {
24
+ "id": "groq",
25
+ "authMethods": ["api-key"],
26
+ "envVars": ["GROQ_API_KEY"]
27
+ }
28
+ ]
29
+ },
30
+ "modelCatalog": {
31
+ "providers": {
32
+ "groq": {
33
+ "baseUrl": "https://api.groq.com/openai/v1",
34
+ "api": "openai-completions",
35
+ "models": [
36
+ {
37
+ "id": "groq/compound",
38
+ "name": "Compound",
39
+ "reasoning": true,
40
+ "input": ["text"],
41
+ "contextWindow": 131072,
42
+ "maxTokens": 8192,
43
+ "cost": {
44
+ "input": 0,
45
+ "output": 0,
46
+ "cacheRead": 0,
47
+ "cacheWrite": 0
48
+ }
49
+ },
50
+ {
51
+ "id": "groq/compound-mini",
52
+ "name": "Compound Mini",
53
+ "reasoning": true,
54
+ "input": ["text"],
55
+ "contextWindow": 131072,
56
+ "maxTokens": 8192,
57
+ "cost": {
58
+ "input": 0,
59
+ "output": 0,
60
+ "cacheRead": 0,
61
+ "cacheWrite": 0
62
+ }
63
+ },
64
+ {
65
+ "id": "llama-3.1-8b-instant",
66
+ "name": "Llama 3.1 8B Instant",
67
+ "reasoning": false,
68
+ "input": ["text"],
69
+ "contextWindow": 131072,
70
+ "maxTokens": 131072,
71
+ "cost": {
72
+ "input": 0.05,
73
+ "output": 0.08,
74
+ "cacheRead": 0,
75
+ "cacheWrite": 0
76
+ }
77
+ },
78
+ {
79
+ "id": "llama-3.3-70b-versatile",
80
+ "name": "Llama 3.3 70B Versatile",
81
+ "reasoning": false,
82
+ "input": ["text"],
83
+ "contextWindow": 131072,
84
+ "maxTokens": 32768,
85
+ "cost": {
86
+ "input": 0.59,
87
+ "output": 0.79,
88
+ "cacheRead": 0,
89
+ "cacheWrite": 0
90
+ }
91
+ },
92
+ {
93
+ "id": "meta-llama/llama-4-scout-17b-16e-instruct",
94
+ "name": "Llama 4 Scout 17B",
95
+ "reasoning": false,
96
+ "input": ["text", "image"],
97
+ "mediaInput": {
98
+ "image": { "maxPixels": 33177600, "preferredSidePx": 2048, "tokenMode": "provider" }
99
+ },
100
+ "contextWindow": 131072,
101
+ "maxTokens": 8192,
102
+ "cost": {
103
+ "input": 0.11,
104
+ "output": 0.34,
105
+ "cacheRead": 0,
106
+ "cacheWrite": 0
107
+ }
108
+ },
109
+ {
110
+ "id": "openai/gpt-oss-120b",
111
+ "name": "GPT OSS 120B",
112
+ "reasoning": true,
113
+ "input": ["text"],
114
+ "contextWindow": 131072,
115
+ "maxTokens": 65536,
116
+ "cost": {
117
+ "input": 0.15,
118
+ "output": 0.6,
119
+ "cacheRead": 0,
120
+ "cacheWrite": 0
121
+ }
122
+ },
123
+ {
124
+ "id": "openai/gpt-oss-20b",
125
+ "name": "GPT OSS 20B",
126
+ "reasoning": true,
127
+ "input": ["text"],
128
+ "contextWindow": 131072,
129
+ "maxTokens": 65536,
130
+ "cost": {
131
+ "input": 0.075,
132
+ "output": 0.3,
133
+ "cacheRead": 0,
134
+ "cacheWrite": 0
135
+ }
136
+ },
137
+ {
138
+ "id": "openai/gpt-oss-safeguard-20b",
139
+ "name": "Safety GPT OSS 20B",
140
+ "reasoning": true,
141
+ "input": ["text"],
142
+ "contextWindow": 131072,
143
+ "maxTokens": 65536,
144
+ "cost": {
145
+ "input": 0.075,
146
+ "output": 0.3,
147
+ "cacheRead": 0.037,
148
+ "cacheWrite": 0
149
+ }
150
+ },
151
+ {
152
+ "id": "qwen/qwen3-32b",
153
+ "name": "Qwen3 32B",
154
+ "reasoning": true,
155
+ "input": ["text"],
156
+ "contextWindow": 131072,
157
+ "maxTokens": 40960,
158
+ "cost": {
159
+ "input": 0.29,
160
+ "output": 0.59,
161
+ "cacheRead": 0,
162
+ "cacheWrite": 0
163
+ }
164
+ }
165
+ ]
166
+ }
167
+ },
168
+ "discovery": {
169
+ "groq": "static"
170
+ }
171
+ },
172
+ "contracts": {
173
+ "mediaUnderstandingProviders": ["groq"]
174
+ },
175
+ "mediaUnderstandingProviderMetadata": {
176
+ "groq": {
177
+ "capabilities": ["audio"],
178
+ "defaultModels": {
179
+ "audio": "whisper-large-v3-turbo"
180
+ },
181
+ "autoPriority": {
182
+ "audio": 20
183
+ }
184
+ }
185
+ },
186
+ "configSchema": {
187
+ "type": "object",
188
+ "additionalProperties": false,
189
+ "properties": {}
190
+ }
191
+ }
package/package.json CHANGED
@@ -1,14 +1,50 @@
1
1
  {
2
2
  "name": "@openclaw/groq-provider",
3
- "version": "0.0.0",
4
- "description": "Reserved package name for an official OpenClaw plugin.",
5
- "license": "MIT",
3
+ "version": "2026.6.9-beta.1",
4
+ "description": "OpenClaw Groq media-understanding provider.",
6
5
  "repository": {
7
6
  "type": "git",
8
- "url": "git+https://github.com/openclaw/openclaw.git"
7
+ "url": "https://github.com/openclaw/openclaw"
9
8
  },
10
- "publishConfig": {
11
- "access": "public",
12
- "tag": "placeholder"
13
- }
9
+ "type": "module",
10
+ "openclaw": {
11
+ "extensions": [
12
+ "./index.ts"
13
+ ],
14
+ "install": {
15
+ "clawhubSpec": "clawhub:@openclaw/groq-provider",
16
+ "npmSpec": "@openclaw/groq-provider",
17
+ "defaultChoice": "npm",
18
+ "minHostVersion": ">=2026.6.8"
19
+ },
20
+ "compat": {
21
+ "pluginApi": ">=2026.6.9-beta.1"
22
+ },
23
+ "build": {
24
+ "openclawVersion": "2026.6.9-beta.1",
25
+ "bundledDist": false
26
+ },
27
+ "release": {
28
+ "publishToClawHub": true,
29
+ "publishToNpm": true
30
+ },
31
+ "runtimeExtensions": [
32
+ "./dist/index.js"
33
+ ]
34
+ },
35
+ "files": [
36
+ "dist/**",
37
+ "openclaw.plugin.json",
38
+ "npm-shrinkwrap.json",
39
+ "README.md"
40
+ ],
41
+ "peerDependencies": {
42
+ "openclaw": ">=2026.6.9-beta.1"
43
+ },
44
+ "peerDependenciesMeta": {
45
+ "openclaw": {
46
+ "optional": true
47
+ }
48
+ },
49
+ "bundledDependencies": []
14
50
  }