@openclaw/cerebras-provider 2026.9.1-beta.1 → 2026.9.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/api.js CHANGED
@@ -1,4 +1,4 @@
1
+ import { n as buildCerebrasProvider } from "./provider-catalog-CngkMOQh.js";
1
2
  import { CEREBRAS_BASE_URL, CEREBRAS_MODEL_CATALOG, buildCerebrasCatalogModels } from "./models.js";
2
3
  import { CEREBRAS_DEFAULT_MODEL_REF, applyCerebrasConfig } from "./onboard.js";
3
- import { buildCerebrasProvider } from "./provider-catalog.js";
4
4
  export { CEREBRAS_BASE_URL, CEREBRAS_DEFAULT_MODEL_REF, CEREBRAS_MODEL_CATALOG, applyCerebrasConfig, buildCerebrasCatalogModels, buildCerebrasProvider };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as openclaw_plugin_default } from "./openclaw.plugin-BMw62OlY.js";
1
+ import { r as openclaw_plugin_default, t as CEREBRAS_MODEL_DISCOVERY } from "./provider-catalog-CngkMOQh.js";
2
2
  import { applyCerebrasConfig } from "./onboard.js";
3
3
  import { defineSingleProviderPluginEntry } from "openclaw/plugin-sdk/provider-entry";
4
4
  var cerebras_default = defineSingleProviderPluginEntry({
@@ -15,7 +15,10 @@ var cerebras_default = defineSingleProviderPluginEntry({
15
15
  noteMessage: ["Cerebras provides high-speed OpenAI-compatible inference for GPT OSS and GLM models.", "Get your API key at: https://cloud.cerebras.ai"].join("\n"),
16
16
  noteTitle: "Cerebras"
17
17
  },
18
- catalog: {}
18
+ catalog: {
19
+ allowExplicitBaseUrl: true,
20
+ liveModelDiscovery: CEREBRAS_MODEL_DISCOVERY
21
+ }
19
22
  }
20
23
  });
21
24
  //#endregion
package/dist/models.js CHANGED
@@ -1,9 +1,5 @@
1
- import { t as openclaw_plugin_default } from "./openclaw.plugin-BMw62OlY.js";
2
- import { buildManifestModelDefinition } from "openclaw/plugin-sdk/provider-catalog-shared";
1
+ import { n as buildCerebrasProvider, r as openclaw_plugin_default } from "./provider-catalog-CngkMOQh.js";
3
2
  //#region extensions/cerebras/models.ts
4
- /**
5
- * Cerebras model catalog helpers derived from the plugin manifest.
6
- */
7
3
  const CEREBRAS_MANIFEST_CATALOG = openclaw_plugin_default.modelCatalog.providers.cerebras;
8
4
  /** Base URL for Cerebras OpenAI-compatible inference. */
9
5
  const CEREBRAS_BASE_URL = CEREBRAS_MANIFEST_CATALOG.baseUrl;
@@ -11,10 +7,7 @@ const CEREBRAS_BASE_URL = CEREBRAS_MANIFEST_CATALOG.baseUrl;
11
7
  const CEREBRAS_MODEL_CATALOG = CEREBRAS_MANIFEST_CATALOG.models;
12
8
  /** Builds normalized Cerebras catalog model definitions. */
13
9
  function buildCerebrasCatalogModels() {
14
- return CEREBRAS_MODEL_CATALOG.map(buildManifestModelDefinition({
15
- providerId: "cerebras",
16
- catalog: CEREBRAS_MANIFEST_CATALOG
17
- }));
10
+ return buildCerebrasProvider().models;
18
11
  }
19
12
  //#endregion
20
13
  export { CEREBRAS_BASE_URL, CEREBRAS_MODEL_CATALOG, buildCerebrasCatalogModels };
package/dist/onboard.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as openclaw_plugin_default } from "./openclaw.plugin-BMw62OlY.js";
1
+ import { r as openclaw_plugin_default } from "./provider-catalog-CngkMOQh.js";
2
2
  import { CEREBRAS_BASE_URL, buildCerebrasCatalogModels } from "./models.js";
3
3
  import { readManifestProviderDefaultModelRef } from "openclaw/plugin-sdk/provider-catalog-shared";
4
4
  import { createModelCatalogPresetAppliers } from "openclaw/plugin-sdk/provider-onboard";
@@ -6,11 +6,11 @@ import { createModelCatalogPresetAppliers } from "openclaw/plugin-sdk/provider-o
6
6
  const CEREBRAS_DEFAULT_MODEL_REF = readManifestProviderDefaultModelRef(openclaw_plugin_default, "cerebras");
7
7
  const { applyConfig: applyCerebrasConfig } = createModelCatalogPresetAppliers({
8
8
  primaryModelRef: CEREBRAS_DEFAULT_MODEL_REF,
9
- resolveParams: () => ({
9
+ resolveParams: (cfg) => ({
10
10
  providerId: "cerebras",
11
11
  api: "openai-completions",
12
12
  baseUrl: CEREBRAS_BASE_URL,
13
- catalogModels: buildCerebrasCatalogModels(),
13
+ catalogModels: cfg.models?.mode === "replace" ? buildCerebrasCatalogModels() : [],
14
14
  aliases: [{
15
15
  modelRef: CEREBRAS_DEFAULT_MODEL_REF,
16
16
  alias: "Cerebras Gemma 4 31B"
@@ -0,0 +1,8 @@
1
+ import { normalizeModelPricingCatalog, normalizeOpenRouterModelPricing } from "openclaw/plugin-sdk/model-catalog-pricing";
2
+ import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
3
+ //#region extensions/cerebras/pricing-api.ts
4
+ function parseCerebrasPricingCatalog(payload) {
5
+ return normalizeModelPricingCatalog(asOptionalRecord(payload)?.data, normalizeOpenRouterModelPricing);
6
+ }
7
+ //#endregion
8
+ export { parseCerebrasPricingCatalog };
@@ -0,0 +1,148 @@
1
+ import { buildManifestModelProviderConfig } from "openclaw/plugin-sdk/provider-catalog-shared";
2
+ import { normalizeOpenRouterModelPricing } from "openclaw/plugin-sdk/model-catalog-pricing";
3
+ import { asOptionalRecord, asPositiveSafeInteger, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
4
+ //#region extensions/cerebras/openclaw.plugin.json
5
+ var openclaw_plugin_default = {
6
+ id: "cerebras",
7
+ activation: { "onStartup": false },
8
+ enabledByDefault: true,
9
+ providers: ["cerebras"],
10
+ modelPricing: { "providers": { "cerebras": { "cerebras": { "provider": "cerebras" } } } },
11
+ providerEndpoints: [{
12
+ "endpointClass": "cerebras-native",
13
+ "hosts": ["api.cerebras.ai"]
14
+ }],
15
+ providerRequest: { "providers": { "cerebras": { "family": "cerebras" } } },
16
+ modelCatalog: {
17
+ "providers": { "cerebras": {
18
+ "baseUrl": "https://api.cerebras.ai/v1",
19
+ "api": "openai-completions",
20
+ "defaultModel": "gemma-4-31b",
21
+ "models": [
22
+ {
23
+ "id": "zai-glm-4.7",
24
+ "name": "Z.ai GLM 4.7",
25
+ "status": "deprecated",
26
+ "input": ["text"],
27
+ "reasoning": true,
28
+ "contextWindow": 131072,
29
+ "maxTokens": 40960,
30
+ "cost": {
31
+ "input": 2.25,
32
+ "output": 2.75,
33
+ "cacheRead": 2.25,
34
+ "cacheWrite": 2.75
35
+ }
36
+ },
37
+ {
38
+ "id": "gpt-oss-120b",
39
+ "name": "GPT OSS 120B",
40
+ "input": ["text"],
41
+ "reasoning": true,
42
+ "contextWindow": 131072,
43
+ "maxTokens": 40960,
44
+ "cost": {
45
+ "input": .35,
46
+ "output": .75,
47
+ "cacheRead": 0,
48
+ "cacheWrite": 0
49
+ }
50
+ },
51
+ {
52
+ "id": "gemma-4-31b",
53
+ "name": "Gemma 4 31B",
54
+ "input": ["text", "image"],
55
+ "reasoning": true,
56
+ "contextWindow": 131072,
57
+ "maxTokens": 40960,
58
+ "cost": {
59
+ "input": .99,
60
+ "output": 1.49,
61
+ "cacheRead": 0,
62
+ "cacheWrite": 0
63
+ }
64
+ }
65
+ ]
66
+ } },
67
+ "discovery": { "cerebras": "refreshable" }
68
+ },
69
+ setup: { "providers": [{
70
+ "id": "cerebras",
71
+ "envVars": ["CEREBRAS_API_KEY"]
72
+ }] },
73
+ providerAuthChoices: [{
74
+ "provider": "cerebras",
75
+ "method": "api-key",
76
+ "choiceId": "cerebras-api-key",
77
+ "appGuidedSecret": true,
78
+ "choiceLabel": "Cerebras API key",
79
+ "groupId": "cerebras",
80
+ "groupLabel": "Cerebras",
81
+ "groupHint": "Fast OpenAI-compatible inference",
82
+ "optionKey": "cerebrasApiKey",
83
+ "cliFlag": "--cerebras-api-key",
84
+ "cliOption": "--cerebras-api-key <key>",
85
+ "cliDescription": "Cerebras API key"
86
+ }],
87
+ configSchema: {
88
+ "type": "object",
89
+ "additionalProperties": false,
90
+ "properties": {}
91
+ }
92
+ };
93
+ //#endregion
94
+ //#region extensions/cerebras/provider-catalog.ts
95
+ /**
96
+ * Cerebras model provider builder.
97
+ */
98
+ function projectCerebrasModels(rows, fallback) {
99
+ const seeds = new Map(fallback.models.map((model) => [model.id, model]));
100
+ const models = /* @__PURE__ */ new Map();
101
+ for (const row of rows) {
102
+ const record = asOptionalRecord(row);
103
+ const id = normalizeOptionalString(record?.id);
104
+ const limits = asOptionalRecord(record?.limits);
105
+ const contextWindow = asPositiveSafeInteger(limits?.max_context_length);
106
+ const maxTokens = asPositiveSafeInteger(limits?.max_completion_tokens);
107
+ if (!record || !id || id.length > 512 || /[\s\p{Cc}]/u.test(id) || record.object !== void 0 && record.object !== "model" || record.deprecated === true || !contextWindow || !maxTokens) continue;
108
+ const seed = seeds.get(id);
109
+ const capabilities = asOptionalRecord(record.capabilities);
110
+ models.set(id, {
111
+ ...seed,
112
+ id,
113
+ name: normalizeOptionalString(record.name) ?? id,
114
+ reasoning: capabilities?.reasoning === true,
115
+ input: capabilities?.vision === true ? ["text", "image"] : ["text"],
116
+ contextWindow,
117
+ maxTokens,
118
+ cost: normalizeOpenRouterModelPricing(record.pricing) ?? {
119
+ input: 0,
120
+ output: 0,
121
+ cacheRead: 0,
122
+ cacheWrite: 0
123
+ },
124
+ compat: {
125
+ ...seed?.compat,
126
+ ...typeof capabilities?.tools === "boolean" ? { supportsTools: capabilities.tools } : {}
127
+ }
128
+ });
129
+ }
130
+ return [...models.values()].toSorted((left, right) => left.id.localeCompare(right.id));
131
+ }
132
+ const CEREBRAS_MODEL_DISCOVERY = {
133
+ endpointUrl: {
134
+ url: "https://api.cerebras.ai/public/v1/models",
135
+ requireBaseUrl: openclaw_plugin_default.modelCatalog.providers.cerebras.baseUrl
136
+ },
137
+ buildRequestHeaders: () => ({ Accept: "application/json" }),
138
+ projectRows: projectCerebrasModels
139
+ };
140
+ /** Builds the Cerebras OpenAI-compatible model provider config. */
141
+ function buildCerebrasProvider() {
142
+ return buildManifestModelProviderConfig({
143
+ providerId: "cerebras",
144
+ catalog: openclaw_plugin_default.modelCatalog.providers.cerebras
145
+ });
146
+ }
147
+ //#endregion
148
+ export { buildCerebrasProvider as n, openclaw_plugin_default as r, CEREBRAS_MODEL_DISCOVERY as t };
@@ -1,15 +1,2 @@
1
- import { t as openclaw_plugin_default } from "./openclaw.plugin-BMw62OlY.js";
2
- import { buildManifestModelProviderConfig } from "openclaw/plugin-sdk/provider-catalog-shared";
3
- //#region extensions/cerebras/provider-catalog.ts
4
- /**
5
- * Cerebras model provider builder.
6
- */
7
- /** Builds the Cerebras OpenAI-compatible model provider config. */
8
- function buildCerebrasProvider() {
9
- return buildManifestModelProviderConfig({
10
- providerId: "cerebras",
11
- catalog: openclaw_plugin_default.modelCatalog.providers.cerebras
12
- });
13
- }
14
- //#endregion
15
- export { buildCerebrasProvider };
1
+ import { n as buildCerebrasProvider, t as CEREBRAS_MODEL_DISCOVERY } from "./provider-catalog-CngkMOQh.js";
2
+ export { CEREBRAS_MODEL_DISCOVERY, buildCerebrasProvider };
@@ -5,6 +5,11 @@
5
5
  },
6
6
  "enabledByDefault": true,
7
7
  "providers": ["cerebras"],
8
+ "modelPricing": {
9
+ "providers": {
10
+ "cerebras": { "cerebras": { "provider": "cerebras" } }
11
+ }
12
+ },
8
13
  "providerEndpoints": [
9
14
  {
10
15
  "endpointClass": "cerebras-native",
@@ -28,6 +33,7 @@
28
33
  {
29
34
  "id": "zai-glm-4.7",
30
35
  "name": "Z.ai GLM 4.7",
36
+ "status": "deprecated",
31
37
  "input": ["text"],
32
38
  "reasoning": true,
33
39
  "contextWindow": 131072,
@@ -49,8 +55,8 @@
49
55
  "cost": {
50
56
  "input": 0.35,
51
57
  "output": 0.75,
52
- "cacheRead": 0.35,
53
- "cacheWrite": 0.75
58
+ "cacheRead": 0,
59
+ "cacheWrite": 0
54
60
  }
55
61
  },
56
62
  {
@@ -63,15 +69,15 @@
63
69
  "cost": {
64
70
  "input": 0.99,
65
71
  "output": 1.49,
66
- "cacheRead": 0.99,
67
- "cacheWrite": 1.49
72
+ "cacheRead": 0,
73
+ "cacheWrite": 0
68
74
  }
69
75
  }
70
76
  ]
71
77
  }
72
78
  },
73
79
  "discovery": {
74
- "cerebras": "static"
80
+ "cerebras": "refreshable"
75
81
  }
76
82
  },
77
83
  "setup": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/cerebras-provider",
3
- "version": "2026.9.1-beta.1",
3
+ "version": "2026.9.1",
4
4
  "description": "OpenClaw Cerebras provider plugin.",
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.9.1-beta.1"
21
+ "pluginApi": ">=2026.9.1"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.9.1-beta.1",
24
+ "openclawVersion": "2026.9.1",
25
25
  "bundledDist": false
26
26
  },
27
27
  "release": {
@@ -38,7 +38,7 @@
38
38
  "README.md"
39
39
  ],
40
40
  "peerDependencies": {
41
- "openclaw": ">=2026.9.1-beta.1"
41
+ "openclaw": ">=2026.9.1"
42
42
  },
43
43
  "peerDependenciesMeta": {
44
44
  "openclaw": {
@@ -1,89 +0,0 @@
1
- //#region extensions/cerebras/openclaw.plugin.json
2
- var openclaw_plugin_default = {
3
- id: "cerebras",
4
- activation: { "onStartup": false },
5
- enabledByDefault: true,
6
- providers: ["cerebras"],
7
- providerEndpoints: [{
8
- "endpointClass": "cerebras-native",
9
- "hosts": ["api.cerebras.ai"]
10
- }],
11
- providerRequest: { "providers": { "cerebras": { "family": "cerebras" } } },
12
- modelCatalog: {
13
- "providers": { "cerebras": {
14
- "baseUrl": "https://api.cerebras.ai/v1",
15
- "api": "openai-completions",
16
- "defaultModel": "gemma-4-31b",
17
- "models": [
18
- {
19
- "id": "zai-glm-4.7",
20
- "name": "Z.ai GLM 4.7",
21
- "input": ["text"],
22
- "reasoning": true,
23
- "contextWindow": 131072,
24
- "maxTokens": 40960,
25
- "cost": {
26
- "input": 2.25,
27
- "output": 2.75,
28
- "cacheRead": 2.25,
29
- "cacheWrite": 2.75
30
- }
31
- },
32
- {
33
- "id": "gpt-oss-120b",
34
- "name": "GPT OSS 120B",
35
- "input": ["text"],
36
- "reasoning": true,
37
- "contextWindow": 131072,
38
- "maxTokens": 40960,
39
- "cost": {
40
- "input": .35,
41
- "output": .75,
42
- "cacheRead": .35,
43
- "cacheWrite": .75
44
- }
45
- },
46
- {
47
- "id": "gemma-4-31b",
48
- "name": "Gemma 4 31B",
49
- "input": ["text", "image"],
50
- "reasoning": true,
51
- "contextWindow": 131072,
52
- "maxTokens": 40960,
53
- "cost": {
54
- "input": .99,
55
- "output": 1.49,
56
- "cacheRead": .99,
57
- "cacheWrite": 1.49
58
- }
59
- }
60
- ]
61
- } },
62
- "discovery": { "cerebras": "static" }
63
- },
64
- setup: { "providers": [{
65
- "id": "cerebras",
66
- "envVars": ["CEREBRAS_API_KEY"]
67
- }] },
68
- providerAuthChoices: [{
69
- "provider": "cerebras",
70
- "method": "api-key",
71
- "choiceId": "cerebras-api-key",
72
- "appGuidedSecret": true,
73
- "choiceLabel": "Cerebras API key",
74
- "groupId": "cerebras",
75
- "groupLabel": "Cerebras",
76
- "groupHint": "Fast OpenAI-compatible inference",
77
- "optionKey": "cerebrasApiKey",
78
- "cliFlag": "--cerebras-api-key",
79
- "cliOption": "--cerebras-api-key <key>",
80
- "cliDescription": "Cerebras API key"
81
- }],
82
- configSchema: {
83
- "type": "object",
84
- "additionalProperties": false,
85
- "properties": {}
86
- }
87
- };
88
- //#endregion
89
- export { openclaw_plugin_default as t };