Vendor OpenClaw source as Adolf fork baseline
Some checks failed
ClawSweeper Dispatch / dispatch (push) Has been cancelled
CodeQL / Security High (actions) (push) Has been cancelled
CodeQL / Security High (channel-runtime-boundary) (push) Has been cancelled
CodeQL / Security High (core-auth-secrets) (push) Has been cancelled
CodeQL / Security High (mcp-process-tool-boundary) (push) Has been cancelled
CodeQL / Security High (network-ssrf-boundary) (push) Has been cancelled
CodeQL / Security High (plugin-trust-boundary) (push) Has been cancelled
CodeQL / Security High (process-exec-boundary) (push) Has been cancelled
Docs Sync Publish Repo / sync-publish-repo (push) Has been cancelled
Docs / docs (push) Has been cancelled
OpenClaw Stable Main Closeout / Resolve stable release closeout inputs (push) Has been cancelled
OpenClaw Stable Main Closeout / Verify stable main closeout (push) Has been cancelled
Workflow Sanity / no-tabs (push) Has been cancelled
Workflow Sanity / actionlint (push) Has been cancelled
Workflow Sanity / generated-doc-baselines (push) Has been cancelled
CI / runner-admission (push) Has been cancelled
CI / preflight (push) Has been cancelled
CI / security-fast (push) Has been cancelled
CI / pnpm-store-warmup (push) Has been cancelled
CI / build-artifacts (push) Has been cancelled
CI / native-i18n (push) Has been cancelled
CI / ${{ matrix.check_name }} (push) Has been cancelled
CI / ${{ matrix.checkName }} (push) Has been cancelled
CI / checks-node-compat-node22 (push) Has been cancelled
CI / check-bundled-channel-config-metadata (push) Has been cancelled
CI / check-dependencies (push) Has been cancelled
CI / check-guards (push) Has been cancelled
CI / check-lint (push) Has been cancelled
CI / check-prod-types (push) Has been cancelled
CI / check-shrinkwrap (push) Has been cancelled
CI / check-test-types (push) Has been cancelled
CI / check-additional-boundaries-a (push) Has been cancelled
CI / check-additional-boundaries-bcd (push) Has been cancelled
CI / check-additional-extension-bundled (push) Has been cancelled
CI / check-additional-extension-channels (push) Has been cancelled
CI / check-additional-extension-package-boundary (push) Has been cancelled
CI / check-additional-runtime-topology-architecture (push) Has been cancelled
CI / check-session-accessor-boundary (push) Has been cancelled
CI / check-session-transcript-reader-boundary (push) Has been cancelled
CI / check-docs (push) Has been cancelled
CI / skills-python (push) Has been cancelled
CI / macos-swift (push) Has been cancelled
CI / ios-build (push) Has been cancelled
CI / ci-timings-summary (push) Has been cancelled
Native App Locale Refresh / Refresh native fa (push) Has been cancelled
Native App Locale Refresh / Refresh native fr (push) Has been cancelled
Native App Locale Refresh / Refresh native hi (push) Has been cancelled
Native App Locale Refresh / Refresh native id (push) Has been cancelled
Native App Locale Refresh / Refresh native it (push) Has been cancelled
Native App Locale Refresh / Refresh native ja-JP (push) Has been cancelled
Control UI Locale Refresh / plan (push) Has been cancelled
Control UI Locale Refresh / Refresh ${{ matrix.locale }} (push) Has been cancelled
Control UI Locale Refresh / Commit control UI locale refresh (push) Has been cancelled
Live Media Runner Image / Build live media runner image (push) Has been cancelled
Native App Locale Refresh / Refresh native ar (push) Has been cancelled
Native App Locale Refresh / Refresh native de (push) Has been cancelled
Native App Locale Refresh / Refresh native es (push) Has been cancelled
Native App Locale Refresh / Refresh native ko (push) Has been cancelled
Native App Locale Refresh / Refresh native nl (push) Has been cancelled
Native App Locale Refresh / Refresh native pl (push) Has been cancelled
Native App Locale Refresh / Refresh native pt-BR (push) Has been cancelled
Native App Locale Refresh / Refresh native ru (push) Has been cancelled
Native App Locale Refresh / Refresh native sv (push) Has been cancelled
Native App Locale Refresh / Refresh native th (push) Has been cancelled
Native App Locale Refresh / Refresh native tr (push) Has been cancelled
Native App Locale Refresh / Refresh native uk (push) Has been cancelled
Native App Locale Refresh / Refresh native vi (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-CN (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-TW (push) Has been cancelled
Native App Locale Refresh / Commit native locale refresh (push) Has been cancelled
Plugin Init Scaffold Validation / Validate provider scaffold (push) Has been cancelled
Plugin NPM Release / preview_plugins_npm (push) Has been cancelled
Plugin NPM Release / Validate release publish approval (push) Has been cancelled
Plugin NPM Release / preview_plugin_pack (push) Has been cancelled
Plugin NPM Release / publish_plugins_npm (push) Has been cancelled
Sandbox Common Smoke / sandbox-common-smoke (push) Has been cancelled
Website Installer Sync / static (push) Has been cancelled
Website Installer Sync / linux-docker (push) Has been cancelled
Website Installer Sync / macos-installer (push) Has been cancelled
Website Installer Sync / windows-installer (push) Has been cancelled
Website Installer Sync / sync-website (push) Has been cancelled

Adolf is a fork/vendored clone of github.com/openclaw/openclaw (v2026.6.11),
free to diverge. Tree copied sans upstream .git; upstream remote added for
future syncs. Node pinned to 24 (.nvmrc); engines already require >=22.19.
Preserves docs/ARCHITECTURE.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LeqyaxJF2nbRXJtae2kNB2
This commit is contained in:
2026-07-05 09:36:54 +00:00
parent 3216769225
commit bedb527145
21108 changed files with 6010766 additions and 0 deletions

12
extensions/groq/README.md Normal file
View File

@@ -0,0 +1,12 @@
# OpenClaw Groq Provider
Official OpenClaw provider plugin for Groq.
Install from OpenClaw:
```bash
openclaw plugins install @openclaw/groq-provider
openclaw gateway restart
```
See <https://docs.openclaw.ai/providers/groq> for setup and configuration.

51
extensions/groq/api.ts Normal file
View File

@@ -0,0 +1,51 @@
// Groq API module exposes the plugin public contract.
import type { ModelCompatConfig } from "openclaw/plugin-sdk/provider-model-shared";
const GROQ_QWEN3_32B_ID = "qwen/qwen3-32b";
const GROQ_GPT_OSS_REASONING_IDS = new Set([
"openai/gpt-oss-20b",
"openai/gpt-oss-120b",
"openai/gpt-oss-safeguard-20b",
]);
const GROQ_QWEN_REASONING_EFFORTS = ["none", "default"] as const;
const GROQ_GPT_OSS_REASONING_EFFORTS = ["low", "medium", "high"] as const;
const GROQ_QWEN_REASONING_EFFORT_MAP: Record<string, string> = {
off: "none",
none: "none",
minimal: "default",
low: "default",
medium: "default",
high: "default",
xhigh: "default",
adaptive: "default",
max: "default",
};
function normalizeGroqModelId(modelId: string | undefined): string {
return modelId?.trim().toLowerCase() ?? "";
}
export function resolveGroqReasoningCompatPatch(
modelId: string,
): Pick<
ModelCompatConfig,
"supportsReasoningEffort" | "supportedReasoningEfforts" | "reasoningEffortMap"
> | null {
const normalized = normalizeGroqModelId(modelId);
if (normalized === GROQ_QWEN3_32B_ID) {
return {
supportsReasoningEffort: true,
supportedReasoningEfforts: [...GROQ_QWEN_REASONING_EFFORTS],
reasoningEffortMap: GROQ_QWEN_REASONING_EFFORT_MAP,
};
}
if (GROQ_GPT_OSS_REASONING_IDS.has(normalized)) {
return {
supportsReasoningEffort: true,
supportedReasoningEfforts: [...GROQ_GPT_OSS_REASONING_EFFORTS],
};
}
return null;
}

View File

@@ -0,0 +1,69 @@
// Groq tests cover index plugin behavior.
import { capturePluginRegistration } from "openclaw/plugin-sdk/plugin-test-runtime";
import { describe, expect, it } from "vitest";
import { resolveGroqReasoningCompatPatch } from "./api.js";
import plugin from "./index.js";
describe("groq provider compat", () => {
it("maps Groq Qwen 3 reasoning to provider-native none/default values", () => {
expect(resolveGroqReasoningCompatPatch("qwen/qwen3-32b")).toEqual({
supportsReasoningEffort: true,
supportedReasoningEfforts: ["none", "default"],
reasoningEffortMap: {
adaptive: "default",
high: "default",
off: "none",
none: "none",
minimal: "default",
low: "default",
medium: "default",
max: "default",
xhigh: "default",
},
});
});
it("keeps GPT-OSS reasoning on the Groq low/medium/high contract", () => {
expect(resolveGroqReasoningCompatPatch("openai/gpt-oss-120b")).toEqual({
supportsReasoningEffort: true,
supportedReasoningEfforts: ["low", "medium", "high"],
});
});
it("registers Groq model and media providers", () => {
const captured = capturePluginRegistration(plugin);
const [provider] = captured.providers;
if (!provider) {
throw new Error("Expected Groq provider");
}
expect(provider).toMatchObject({
docsPath: "/providers/groq",
envVars: ["GROQ_API_KEY"],
id: "groq",
label: "Groq",
});
expect(provider.auth).toHaveLength(1);
expect(provider.auth[0]).toMatchObject({
id: "api-key",
kind: "api_key",
label: "Groq API key",
wizard: {
choiceId: "groq-api-key",
groupId: "groq",
},
});
expect(captured.mediaUnderstandingProviders).toHaveLength(1);
const [mediaProvider] = captured.mediaUnderstandingProviders;
if (!mediaProvider) {
throw new Error("Expected Groq media understanding provider");
}
const { transcribeAudio, ...mediaProviderMetadata } = mediaProvider;
expect(mediaProviderMetadata).toEqual({
autoPriority: { audio: 20 },
capabilities: ["audio"],
defaultModels: { audio: "whisper-large-v3-turbo" },
id: "groq",
});
expect(transcribeAudio).toBeTypeOf("function");
});
});

42
extensions/groq/index.ts Normal file
View File

@@ -0,0 +1,42 @@
// Groq plugin entrypoint registers its OpenClaw integration.
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
import { createProviderApiKeyAuthMethod } from "openclaw/plugin-sdk/provider-auth-api-key";
import { groqMediaUnderstandingProvider } from "./media-understanding-provider.js";
const GROQ_DEFAULT_MODEL_REF = "groq/llama-3.3-70b-versatile";
export default definePluginEntry({
id: "groq",
name: "Groq Provider",
description: "Bundled Groq provider plugin",
register(api) {
api.registerProvider({
id: "groq",
label: "Groq",
docsPath: "/providers/groq",
envVars: ["GROQ_API_KEY"],
auth: [
createProviderApiKeyAuthMethod({
providerId: "groq",
methodId: "api-key",
label: "Groq API key",
hint: "Fast OpenAI-compatible inference",
optionKey: "groqApiKey",
flagName: "--groq-api-key",
envVar: "GROQ_API_KEY",
promptMessage: "Enter Groq API key",
defaultModel: GROQ_DEFAULT_MODEL_REF,
wizard: {
choiceId: "groq-api-key",
choiceLabel: "Groq API key",
choiceHint: "Fast OpenAI-compatible inference",
groupId: "groq",
groupLabel: "Groq",
groupHint: "Fast OpenAI-compatible inference",
},
}),
],
});
api.registerMediaUnderstandingProvider(groqMediaUnderstandingProvider);
},
});

View File

@@ -0,0 +1,22 @@
// Groq provider module implements model/runtime integration.
import {
transcribeOpenAiCompatibleAudio,
type MediaUnderstandingProvider,
} from "openclaw/plugin-sdk/media-understanding";
const DEFAULT_GROQ_AUDIO_BASE_URL = "https://api.groq.com/openai/v1";
const DEFAULT_GROQ_AUDIO_MODEL = "whisper-large-v3-turbo";
export const groqMediaUnderstandingProvider: MediaUnderstandingProvider = {
id: "groq",
capabilities: ["audio"],
defaultModels: { audio: DEFAULT_GROQ_AUDIO_MODEL },
autoPriority: { audio: 20 },
transcribeAudio: (req) =>
transcribeOpenAiCompatibleAudio({
...req,
baseUrl: req.baseUrl ?? DEFAULT_GROQ_AUDIO_BASE_URL,
defaultBaseUrl: DEFAULT_GROQ_AUDIO_BASE_URL,
defaultModel: DEFAULT_GROQ_AUDIO_MODEL,
}),
};

12
extensions/groq/npm-shrinkwrap.json generated Normal file
View File

@@ -0,0 +1,12 @@
{
"name": "@openclaw/groq-provider",
"version": "2026.6.11",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@openclaw/groq-provider",
"version": "2026.6.11"
}
}
}

View File

@@ -0,0 +1,191 @@
{
"id": "groq",
"activation": {
"onStartup": false
},
"enabledByDefault": true,
"providers": ["groq"],
"providerEndpoints": [
{
"endpointClass": "groq-native",
"hosts": ["api.groq.com"]
}
],
"providerRequest": {
"providers": {
"groq": {
"family": "groq"
}
}
},
"setup": {
"providers": [
{
"id": "groq",
"authMethods": ["api-key"],
"envVars": ["GROQ_API_KEY"]
}
]
},
"modelCatalog": {
"providers": {
"groq": {
"baseUrl": "https://api.groq.com/openai/v1",
"api": "openai-completions",
"models": [
{
"id": "groq/compound",
"name": "Compound",
"reasoning": true,
"input": ["text"],
"contextWindow": 131072,
"maxTokens": 8192,
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
}
},
{
"id": "groq/compound-mini",
"name": "Compound Mini",
"reasoning": true,
"input": ["text"],
"contextWindow": 131072,
"maxTokens": 8192,
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
}
},
{
"id": "llama-3.1-8b-instant",
"name": "Llama 3.1 8B Instant",
"reasoning": false,
"input": ["text"],
"contextWindow": 131072,
"maxTokens": 131072,
"cost": {
"input": 0.05,
"output": 0.08,
"cacheRead": 0,
"cacheWrite": 0
}
},
{
"id": "llama-3.3-70b-versatile",
"name": "Llama 3.3 70B Versatile",
"reasoning": false,
"input": ["text"],
"contextWindow": 131072,
"maxTokens": 32768,
"cost": {
"input": 0.59,
"output": 0.79,
"cacheRead": 0,
"cacheWrite": 0
}
},
{
"id": "meta-llama/llama-4-scout-17b-16e-instruct",
"name": "Llama 4 Scout 17B",
"reasoning": false,
"input": ["text", "image"],
"mediaInput": {
"image": { "maxPixels": 33177600, "preferredSidePx": 2048, "tokenMode": "provider" }
},
"contextWindow": 131072,
"maxTokens": 8192,
"cost": {
"input": 0.11,
"output": 0.34,
"cacheRead": 0,
"cacheWrite": 0
}
},
{
"id": "openai/gpt-oss-120b",
"name": "GPT OSS 120B",
"reasoning": true,
"input": ["text"],
"contextWindow": 131072,
"maxTokens": 65536,
"cost": {
"input": 0.15,
"output": 0.6,
"cacheRead": 0,
"cacheWrite": 0
}
},
{
"id": "openai/gpt-oss-20b",
"name": "GPT OSS 20B",
"reasoning": true,
"input": ["text"],
"contextWindow": 131072,
"maxTokens": 65536,
"cost": {
"input": 0.075,
"output": 0.3,
"cacheRead": 0,
"cacheWrite": 0
}
},
{
"id": "openai/gpt-oss-safeguard-20b",
"name": "Safety GPT OSS 20B",
"reasoning": true,
"input": ["text"],
"contextWindow": 131072,
"maxTokens": 65536,
"cost": {
"input": 0.075,
"output": 0.3,
"cacheRead": 0.037,
"cacheWrite": 0
}
},
{
"id": "qwen/qwen3-32b",
"name": "Qwen3 32B",
"reasoning": true,
"input": ["text"],
"contextWindow": 131072,
"maxTokens": 40960,
"cost": {
"input": 0.29,
"output": 0.59,
"cacheRead": 0,
"cacheWrite": 0
}
}
]
}
},
"discovery": {
"groq": "static"
}
},
"contracts": {
"mediaUnderstandingProviders": ["groq"]
},
"mediaUnderstandingProviderMetadata": {
"groq": {
"capabilities": ["audio"],
"defaultModels": {
"audio": "whisper-large-v3-turbo"
},
"autoPriority": {
"audio": 20
}
}
},
"configSchema": {
"type": "object",
"additionalProperties": false,
"properties": {}
}
}

View File

@@ -0,0 +1,35 @@
{
"name": "@openclaw/groq-provider",
"version": "2026.6.11",
"description": "OpenClaw Groq media-understanding provider.",
"repository": {
"type": "git",
"url": "https://github.com/openclaw/openclaw"
},
"type": "module",
"devDependencies": {
"@openclaw/plugin-sdk": "workspace:*"
},
"openclaw": {
"extensions": [
"./index.ts"
],
"install": {
"clawhubSpec": "clawhub:@openclaw/groq-provider",
"npmSpec": "@openclaw/groq-provider",
"defaultChoice": "npm",
"minHostVersion": ">=2026.6.8"
},
"compat": {
"pluginApi": ">=2026.6.11"
},
"build": {
"openclawVersion": "2026.6.11",
"bundledDist": false
},
"release": {
"publishToClawHub": true,
"publishToNpm": true
}
}
}

View File

@@ -0,0 +1,2 @@
// Groq API module exposes the plugin public contract.
export { groqMediaUnderstandingProvider } from "./media-understanding-provider.js";

View File

@@ -0,0 +1,16 @@
{
"extends": "../tsconfig.package-boundary.base.json",
"compilerOptions": {
"rootDir": "."
},
"include": ["./*.ts", "./src/**/*.ts"],
"exclude": [
"./**/*.test.ts",
"./dist/**",
"./node_modules/**",
"./src/test-support/**",
"./src/**/*test-helpers.ts",
"./src/**/*test-harness.ts",
"./src/**/*test-support.ts"
]
}