@openclaw/cerebras-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/cerebras-provider
1
+ # OpenClaw Cerebras Provider
2
2
 
3
- Reserved placeholder for the official OpenClaw plugin package. Use a published release version instead.
3
+ Official OpenClaw provider plugin for Cerebras.
4
+
5
+ Install from OpenClaw:
6
+
7
+ ```bash
8
+ openclaw plugins install @openclaw/cerebras-provider
9
+ openclaw gateway restart
10
+ ```
11
+
12
+ See <https://docs.openclaw.ai/providers/cerebras> for setup and configuration.
package/dist/api.js ADDED
@@ -0,0 +1,4 @@
1
+ import { i as buildCerebrasModelDefinition, n as CEREBRAS_MODEL_CATALOG, t as CEREBRAS_BASE_URL } from "./models-CT3YflMI.js";
2
+ import { CEREBRAS_DEFAULT_MODEL_REF, applyCerebrasConfig } from "./onboard.js";
3
+ import { buildCerebrasProvider } from "./provider-catalog.js";
4
+ export { CEREBRAS_BASE_URL, CEREBRAS_DEFAULT_MODEL_REF, CEREBRAS_MODEL_CATALOG, applyCerebrasConfig, buildCerebrasModelDefinition, buildCerebrasProvider };
package/dist/index.js ADDED
@@ -0,0 +1,35 @@
1
+ import { CEREBRAS_DEFAULT_MODEL_REF, applyCerebrasConfig } from "./onboard.js";
2
+ import { buildCerebrasProvider } from "./provider-catalog.js";
3
+ import { defineSingleProviderPluginEntry } from "openclaw/plugin-sdk/provider-entry";
4
+ var cerebras_default = defineSingleProviderPluginEntry({
5
+ id: "cerebras",
6
+ name: "Cerebras Provider",
7
+ description: "Bundled Cerebras provider plugin",
8
+ provider: {
9
+ label: "Cerebras",
10
+ docsPath: "/providers/cerebras",
11
+ auth: [{
12
+ methodId: "api-key",
13
+ label: "Cerebras API key",
14
+ hint: "Fast OpenAI-compatible inference",
15
+ optionKey: "cerebrasApiKey",
16
+ flagName: "--cerebras-api-key",
17
+ envVar: "CEREBRAS_API_KEY",
18
+ promptMessage: "Enter Cerebras API key",
19
+ defaultModel: CEREBRAS_DEFAULT_MODEL_REF,
20
+ applyConfig: (cfg) => applyCerebrasConfig(cfg),
21
+ noteMessage: ["Cerebras provides high-speed OpenAI-compatible inference for GPT OSS, GLM, Qwen, and Llama models.", "Get your API key at: https://cloud.cerebras.ai"].join("\n"),
22
+ noteTitle: "Cerebras",
23
+ wizard: {
24
+ groupLabel: "Cerebras",
25
+ groupHint: "Fast OpenAI-compatible inference"
26
+ }
27
+ }],
28
+ catalog: {
29
+ buildProvider: buildCerebrasProvider,
30
+ buildStaticProvider: buildCerebrasProvider
31
+ }
32
+ }
33
+ });
34
+ //#endregion
35
+ export { cerebras_default as default };
@@ -0,0 +1,92 @@
1
+ import { buildManifestModelProviderConfig } from "openclaw/plugin-sdk/provider-catalog-shared";
2
+ //#endregion
3
+ //#region extensions/cerebras/models.ts
4
+ /**
5
+ * Cerebras model catalog helpers derived from the plugin manifest.
6
+ */
7
+ const CEREBRAS_MANIFEST_CATALOG = {
8
+ "providers": { "cerebras": {
9
+ "baseUrl": "https://api.cerebras.ai/v1",
10
+ "api": "openai-completions",
11
+ "models": [
12
+ {
13
+ "id": "zai-glm-4.7",
14
+ "name": "Z.ai GLM 4.7",
15
+ "input": ["text"],
16
+ "reasoning": true,
17
+ "contextWindow": 128e3,
18
+ "maxTokens": 8192,
19
+ "cost": {
20
+ "input": 2.25,
21
+ "output": 2.75,
22
+ "cacheRead": 2.25,
23
+ "cacheWrite": 2.75
24
+ }
25
+ },
26
+ {
27
+ "id": "gpt-oss-120b",
28
+ "name": "GPT OSS 120B",
29
+ "input": ["text"],
30
+ "reasoning": true,
31
+ "contextWindow": 128e3,
32
+ "maxTokens": 8192,
33
+ "cost": {
34
+ "input": .35,
35
+ "output": .75,
36
+ "cacheRead": .35,
37
+ "cacheWrite": .75
38
+ }
39
+ },
40
+ {
41
+ "id": "qwen-3-235b-a22b-instruct-2507",
42
+ "name": "Qwen 3 235B Instruct",
43
+ "input": ["text"],
44
+ "contextWindow": 128e3,
45
+ "maxTokens": 8192,
46
+ "cost": {
47
+ "input": .6,
48
+ "output": 1.2,
49
+ "cacheRead": .6,
50
+ "cacheWrite": 1.2
51
+ }
52
+ },
53
+ {
54
+ "id": "llama3.1-8b",
55
+ "name": "Llama 3.1 8B",
56
+ "input": ["text"],
57
+ "contextWindow": 128e3,
58
+ "maxTokens": 8192,
59
+ "cost": {
60
+ "input": .1,
61
+ "output": .1,
62
+ "cacheRead": .1,
63
+ "cacheWrite": .1
64
+ }
65
+ }
66
+ ]
67
+ } },
68
+ "discovery": { "cerebras": "static" }
69
+ }.providers.cerebras;
70
+ /** Base URL for Cerebras OpenAI-compatible inference. */
71
+ const CEREBRAS_BASE_URL = CEREBRAS_MANIFEST_CATALOG.baseUrl;
72
+ /** Cerebras model catalog entries from the plugin manifest. */
73
+ const CEREBRAS_MODEL_CATALOG = CEREBRAS_MANIFEST_CATALOG.models;
74
+ /** Builds normalized Cerebras catalog model definitions. */
75
+ function buildCerebrasCatalogModels() {
76
+ return buildManifestModelProviderConfig({
77
+ providerId: "cerebras",
78
+ catalog: CEREBRAS_MANIFEST_CATALOG
79
+ }).models;
80
+ }
81
+ /** Builds one normalized Cerebras model definition from a manifest entry. */
82
+ function buildCerebrasModelDefinition(model) {
83
+ return buildManifestModelProviderConfig({
84
+ providerId: "cerebras",
85
+ catalog: {
86
+ ...CEREBRAS_MANIFEST_CATALOG,
87
+ models: [model]
88
+ }
89
+ }).models[0];
90
+ }
91
+ //#endregion
92
+ export { buildCerebrasModelDefinition as i, CEREBRAS_MODEL_CATALOG as n, buildCerebrasCatalogModels as r, CEREBRAS_BASE_URL as t };
package/dist/models.js ADDED
@@ -0,0 +1,2 @@
1
+ import { i as buildCerebrasModelDefinition, n as CEREBRAS_MODEL_CATALOG, r as buildCerebrasCatalogModels, t as CEREBRAS_BASE_URL } from "./models-CT3YflMI.js";
2
+ export { CEREBRAS_BASE_URL, CEREBRAS_MODEL_CATALOG, buildCerebrasCatalogModels, buildCerebrasModelDefinition };
@@ -0,0 +1,27 @@
1
+ import { i as buildCerebrasModelDefinition, n as CEREBRAS_MODEL_CATALOG, t as CEREBRAS_BASE_URL } from "./models-CT3YflMI.js";
2
+ import { createModelCatalogPresetAppliers } from "openclaw/plugin-sdk/provider-onboard";
3
+ //#region extensions/cerebras/onboard.ts
4
+ /**
5
+ * Cerebras onboarding config helpers.
6
+ */
7
+ /** Default Cerebras model reference used after onboarding. */
8
+ const CEREBRAS_DEFAULT_MODEL_REF = "cerebras/zai-glm-4.7";
9
+ const cerebrasPresetAppliers = createModelCatalogPresetAppliers({
10
+ primaryModelRef: CEREBRAS_DEFAULT_MODEL_REF,
11
+ resolveParams: (_cfg) => ({
12
+ providerId: "cerebras",
13
+ api: "openai-completions",
14
+ baseUrl: CEREBRAS_BASE_URL,
15
+ catalogModels: CEREBRAS_MODEL_CATALOG.map(buildCerebrasModelDefinition),
16
+ aliases: [{
17
+ modelRef: CEREBRAS_DEFAULT_MODEL_REF,
18
+ alias: "Cerebras GLM 4.7"
19
+ }]
20
+ })
21
+ });
22
+ /** Applies Cerebras provider/catalog config and default model aliases. */
23
+ function applyCerebrasConfig(cfg) {
24
+ return cerebrasPresetAppliers.applyConfig(cfg);
25
+ }
26
+ //#endregion
27
+ export { CEREBRAS_DEFAULT_MODEL_REF, applyCerebrasConfig };
@@ -0,0 +1,12 @@
1
+ import { r as buildCerebrasCatalogModels, t as CEREBRAS_BASE_URL } from "./models-CT3YflMI.js";
2
+ //#region extensions/cerebras/provider-catalog.ts
3
+ /** Builds the Cerebras OpenAI-compatible model provider config. */
4
+ function buildCerebrasProvider() {
5
+ return {
6
+ baseUrl: CEREBRAS_BASE_URL,
7
+ api: "openai-completions",
8
+ models: buildCerebrasCatalogModels()
9
+ };
10
+ }
11
+ //#endregion
12
+ export { buildCerebrasProvider };
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "@openclaw/cerebras-provider",
3
+ "version": "2026.6.9-beta.1",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "@openclaw/cerebras-provider",
9
+ "version": "2026.6.9-beta.1"
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,116 @@
1
+ {
2
+ "id": "cerebras",
3
+ "activation": {
4
+ "onStartup": false
5
+ },
6
+ "enabledByDefault": true,
7
+ "providers": ["cerebras"],
8
+ "providerEndpoints": [
9
+ {
10
+ "endpointClass": "cerebras-native",
11
+ "hosts": ["api.cerebras.ai"]
12
+ }
13
+ ],
14
+ "providerRequest": {
15
+ "providers": {
16
+ "cerebras": {
17
+ "family": "cerebras"
18
+ }
19
+ }
20
+ },
21
+ "modelCatalog": {
22
+ "providers": {
23
+ "cerebras": {
24
+ "baseUrl": "https://api.cerebras.ai/v1",
25
+ "api": "openai-completions",
26
+ "models": [
27
+ {
28
+ "id": "zai-glm-4.7",
29
+ "name": "Z.ai GLM 4.7",
30
+ "input": ["text"],
31
+ "reasoning": true,
32
+ "contextWindow": 128000,
33
+ "maxTokens": 8192,
34
+ "cost": {
35
+ "input": 2.25,
36
+ "output": 2.75,
37
+ "cacheRead": 2.25,
38
+ "cacheWrite": 2.75
39
+ }
40
+ },
41
+ {
42
+ "id": "gpt-oss-120b",
43
+ "name": "GPT OSS 120B",
44
+ "input": ["text"],
45
+ "reasoning": true,
46
+ "contextWindow": 128000,
47
+ "maxTokens": 8192,
48
+ "cost": {
49
+ "input": 0.35,
50
+ "output": 0.75,
51
+ "cacheRead": 0.35,
52
+ "cacheWrite": 0.75
53
+ }
54
+ },
55
+ {
56
+ "id": "qwen-3-235b-a22b-instruct-2507",
57
+ "name": "Qwen 3 235B Instruct",
58
+ "input": ["text"],
59
+ "contextWindow": 128000,
60
+ "maxTokens": 8192,
61
+ "cost": {
62
+ "input": 0.6,
63
+ "output": 1.2,
64
+ "cacheRead": 0.6,
65
+ "cacheWrite": 1.2
66
+ }
67
+ },
68
+ {
69
+ "id": "llama3.1-8b",
70
+ "name": "Llama 3.1 8B",
71
+ "input": ["text"],
72
+ "contextWindow": 128000,
73
+ "maxTokens": 8192,
74
+ "cost": {
75
+ "input": 0.1,
76
+ "output": 0.1,
77
+ "cacheRead": 0.1,
78
+ "cacheWrite": 0.1
79
+ }
80
+ }
81
+ ]
82
+ }
83
+ },
84
+ "discovery": {
85
+ "cerebras": "static"
86
+ }
87
+ },
88
+ "setup": {
89
+ "providers": [
90
+ {
91
+ "id": "cerebras",
92
+ "envVars": ["CEREBRAS_API_KEY"]
93
+ }
94
+ ]
95
+ },
96
+ "providerAuthChoices": [
97
+ {
98
+ "provider": "cerebras",
99
+ "method": "api-key",
100
+ "choiceId": "cerebras-api-key",
101
+ "choiceLabel": "Cerebras API key",
102
+ "groupId": "cerebras",
103
+ "groupLabel": "Cerebras",
104
+ "groupHint": "Fast OpenAI-compatible inference",
105
+ "optionKey": "cerebrasApiKey",
106
+ "cliFlag": "--cerebras-api-key",
107
+ "cliOption": "--cerebras-api-key <key>",
108
+ "cliDescription": "Cerebras API key"
109
+ }
110
+ ],
111
+ "configSchema": {
112
+ "type": "object",
113
+ "additionalProperties": false,
114
+ "properties": {}
115
+ }
116
+ }
package/package.json CHANGED
@@ -1,14 +1,50 @@
1
1
  {
2
2
  "name": "@openclaw/cerebras-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 Cerebras provider plugin.",
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/cerebras-provider",
16
+ "npmSpec": "@openclaw/cerebras-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
  }