@openclaw/venice-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,3 +1,2 @@
1
- import { a as discoverVeniceModels, i as buildVeniceModelDefinition, n as VENICE_DEFAULT_MODEL_REF, r as VENICE_MODEL_CATALOG, t as VENICE_BASE_URL } from "./models-DKepSu04.js";
2
- import { buildVeniceProvider } from "./provider-catalog.js";
3
- export { VENICE_BASE_URL, VENICE_DEFAULT_MODEL_REF, VENICE_MODEL_CATALOG, buildVeniceModelDefinition, buildVeniceProvider, discoverVeniceModels };
1
+ import { n as VENICE_DEFAULT_MODEL_REF, r as VENICE_MODEL_CATALOG, t as VENICE_BASE_URL } from "./models-BnwQxlOw.js";
2
+ export { VENICE_BASE_URL, VENICE_DEFAULT_MODEL_REF, VENICE_MODEL_CATALOG };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { n as VENICE_DEFAULT_MODEL_REF } from "./models-DKepSu04.js";
2
- import { buildVeniceProvider } from "./provider-catalog.js";
1
+ import { a as openclaw_plugin_default, i as VENICE_MODEL_DISCOVERY_OPTIONS } from "./models-BnwQxlOw.js";
3
2
  import { applyVeniceConfig } from "./onboard.js";
3
+ import { buildStaticVeniceProvider } from "./provider-catalog.js";
4
4
  import { createVeniceDeepSeekV4Wrapper } from "./stream.js";
5
5
  import { fetchVeniceUsage } from "./usage.js";
6
6
  import { defineSingleProviderPluginEntry } from "openclaw/plugin-sdk/provider-entry";
@@ -30,28 +30,23 @@ var venice_default = defineSingleProviderPluginEntry({
30
30
  id: PROVIDER_ID,
31
31
  name: "Venice Provider",
32
32
  description: "Bundled Venice provider plugin",
33
+ manifest: openclaw_plugin_default,
33
34
  provider: {
34
35
  label: "Venice",
35
36
  docsPath: "/providers/venice",
36
- auth: [{
37
- methodId: "api-key",
38
- label: "Venice AI API key",
39
- hint: "Privacy-focused (uncensored models)",
40
- optionKey: "veniceApiKey",
41
- flagName: "--venice-api-key",
42
- envVar: "VENICE_API_KEY",
43
- promptMessage: "Enter Venice AI API key",
44
- defaultModel: VENICE_DEFAULT_MODEL_REF,
45
- applyConfig: (cfg) => applyVeniceConfig(cfg),
37
+ manifestAuth: {
38
+ applyConfig: applyVeniceConfig,
46
39
  noteMessage: [
47
40
  "Venice AI provides privacy-focused inference with uncensored models.",
48
41
  "Get your API key at: https://venice.ai/settings/api",
49
42
  "Supports 'private' (fully private) and 'anonymized' (proxy) modes."
50
43
  ].join("\n"),
51
- noteTitle: "Venice AI",
52
- wizard: { groupLabel: "Venice AI" }
53
- }],
54
- catalog: { buildProvider: buildVeniceProvider },
44
+ noteTitle: "Venice AI"
45
+ },
46
+ catalog: {
47
+ buildProvider: buildStaticVeniceProvider,
48
+ liveModelDiscovery: VENICE_MODEL_DISCOVERY_OPTIONS
49
+ },
55
50
  normalizeResolvedModel: ({ modelId, model }) => isXaiBackedVeniceModel(modelId) ? applyXaiModelCompat(model) : void 0,
56
51
  wrapStreamFn: (ctx) => createVeniceDeepSeekV4Wrapper(ctx.streamFn, ctx.thinkingLevel),
57
52
  resolveUsageAuth: async (ctx) => {
@@ -0,0 +1,443 @@
1
+ import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
2
+ import { buildManifestModelDefinition, readManifestProviderDefaultModelRef } from "openclaw/plugin-sdk/provider-catalog-shared";
3
+ //#region extensions/venice/openclaw.plugin.json
4
+ var openclaw_plugin_default = {
5
+ id: "venice",
6
+ activation: { "onStartup": false },
7
+ enabledByDefault: true,
8
+ providers: ["venice"],
9
+ contracts: { "usageProviders": ["venice"] },
10
+ providerAuthChoices: [{
11
+ "provider": "venice",
12
+ "method": "api-key",
13
+ "choiceId": "venice-api-key",
14
+ "appGuidedSecret": true,
15
+ "choiceLabel": "Venice AI API key",
16
+ "groupId": "venice",
17
+ "groupLabel": "Venice AI",
18
+ "groupHint": "Privacy-focused (uncensored models)",
19
+ "optionKey": "veniceApiKey",
20
+ "cliFlag": "--venice-api-key",
21
+ "cliOption": "--venice-api-key <key>",
22
+ "cliDescription": "Venice API key"
23
+ }],
24
+ configSchema: {
25
+ "type": "object",
26
+ "additionalProperties": false,
27
+ "properties": {}
28
+ },
29
+ setup: { "providers": [{
30
+ "id": "venice",
31
+ "authMethods": ["api-key"],
32
+ "envVars": ["VENICE_API_KEY"]
33
+ }] },
34
+ modelCatalog: {
35
+ "providers": { "venice": {
36
+ "baseUrl": "https://api.venice.ai/api/v1",
37
+ "api": "openai-completions",
38
+ "defaultModel": "zai-org-glm-4.7",
39
+ "models": [
40
+ {
41
+ "id": "zai-org-glm-5-2",
42
+ "name": "GLM 5.2",
43
+ "reasoning": true,
44
+ "input": ["text"],
45
+ "contextWindow": 1e6,
46
+ "maxTokens": 131072,
47
+ "cost": {
48
+ "input": 1.4,
49
+ "output": 4.4,
50
+ "cacheRead": .26,
51
+ "cacheWrite": 0
52
+ },
53
+ "compat": { "supportsUsageInStreaming": false }
54
+ },
55
+ {
56
+ "id": "zai-org-glm-4.7",
57
+ "name": "GLM 4.7",
58
+ "reasoning": true,
59
+ "input": ["text"],
60
+ "contextWindow": 198e3,
61
+ "maxTokens": 16384,
62
+ "cost": {
63
+ "input": .55,
64
+ "output": 2.65,
65
+ "cacheRead": .11,
66
+ "cacheWrite": 0
67
+ },
68
+ "compat": { "supportsUsageInStreaming": false }
69
+ },
70
+ {
71
+ "id": "venice-uncensored-1-2",
72
+ "name": "Venice Uncensored 1.2",
73
+ "reasoning": false,
74
+ "input": ["text", "image"],
75
+ "contextWindow": 128e3,
76
+ "maxTokens": 8192,
77
+ "cost": {
78
+ "input": .2,
79
+ "output": .9,
80
+ "cacheRead": 0,
81
+ "cacheWrite": 0
82
+ },
83
+ "compat": { "supportsUsageInStreaming": false }
84
+ },
85
+ {
86
+ "id": "google-gemma-4-31b-it",
87
+ "name": "Google Gemma 4 31B Instruct",
88
+ "reasoning": true,
89
+ "input": ["text", "image"],
90
+ "contextWindow": 256e3,
91
+ "maxTokens": 8192,
92
+ "cost": {
93
+ "input": .12,
94
+ "output": .36,
95
+ "cacheRead": .09,
96
+ "cacheWrite": 0
97
+ },
98
+ "compat": { "supportsUsageInStreaming": false }
99
+ },
100
+ {
101
+ "id": "kimi-k2-6",
102
+ "name": "Kimi K2.6",
103
+ "reasoning": true,
104
+ "input": ["text", "image"],
105
+ "contextWindow": 256e3,
106
+ "maxTokens": 65536,
107
+ "cost": {
108
+ "input": .75,
109
+ "output": 3.5,
110
+ "cacheRead": .16,
111
+ "cacheWrite": 0
112
+ },
113
+ "compat": { "supportsUsageInStreaming": false }
114
+ },
115
+ {
116
+ "id": "deepseek-v3.2",
117
+ "name": "DeepSeek V3.2",
118
+ "reasoning": true,
119
+ "input": ["text"],
120
+ "contextWindow": 16e4,
121
+ "maxTokens": 32768,
122
+ "cost": {
123
+ "input": .33,
124
+ "output": .48,
125
+ "cacheRead": .16,
126
+ "cacheWrite": 0
127
+ },
128
+ "compat": { "supportsUsageInStreaming": false }
129
+ },
130
+ {
131
+ "id": "qwen3-235b-a22b-thinking-2507",
132
+ "name": "Qwen3 235B Thinking",
133
+ "reasoning": true,
134
+ "input": ["text"],
135
+ "contextWindow": 128e3,
136
+ "maxTokens": 16384,
137
+ "cost": {
138
+ "input": .45,
139
+ "output": 3.5,
140
+ "cacheRead": 0,
141
+ "cacheWrite": 0
142
+ },
143
+ "compat": { "supportsUsageInStreaming": false }
144
+ },
145
+ {
146
+ "id": "qwen3-coder-480b-a35b-instruct-turbo",
147
+ "name": "Qwen3 Coder 480B Turbo",
148
+ "reasoning": false,
149
+ "input": ["text"],
150
+ "contextWindow": 256e3,
151
+ "maxTokens": 65536,
152
+ "cost": {
153
+ "input": .35,
154
+ "output": 1.5,
155
+ "cacheRead": .04,
156
+ "cacheWrite": 0
157
+ },
158
+ "compat": { "supportsUsageInStreaming": false }
159
+ },
160
+ {
161
+ "id": "qwen3-vl-235b-a22b",
162
+ "name": "Qwen3 VL 235B (Vision)",
163
+ "reasoning": false,
164
+ "input": ["text", "image"],
165
+ "contextWindow": 128e3,
166
+ "maxTokens": 16384,
167
+ "cost": {
168
+ "input": .21,
169
+ "output": 1.9,
170
+ "cacheRead": .1,
171
+ "cacheWrite": 0
172
+ },
173
+ "compat": { "supportsUsageInStreaming": false }
174
+ },
175
+ {
176
+ "id": "grok-4-5",
177
+ "name": "Grok 4.5",
178
+ "reasoning": true,
179
+ "input": ["text", "image"],
180
+ "contextWindow": 5e5,
181
+ "maxTokens": 32e3,
182
+ "cost": {
183
+ "input": 2.27,
184
+ "output": 6.8,
185
+ "cacheRead": .34,
186
+ "cacheWrite": 0
187
+ },
188
+ "compat": { "supportsUsageInStreaming": false }
189
+ },
190
+ {
191
+ "id": "qwen-3-7-max",
192
+ "name": "Qwen 3.7 Max (via Venice)",
193
+ "reasoning": true,
194
+ "input": ["text", "image"],
195
+ "contextWindow": 1e6,
196
+ "maxTokens": 65536,
197
+ "cost": {
198
+ "input": 2.7,
199
+ "output": 8.05,
200
+ "cacheRead": .27,
201
+ "cacheWrite": 3.35
202
+ },
203
+ "compat": { "supportsUsageInStreaming": false }
204
+ },
205
+ {
206
+ "id": "qwen-3-7-plus",
207
+ "name": "Qwen 3.7 Plus (via Venice)",
208
+ "reasoning": true,
209
+ "input": ["text", "image"],
210
+ "contextWindow": 1e6,
211
+ "maxTokens": 65536,
212
+ "cost": {
213
+ "input": .5,
214
+ "output": 2,
215
+ "cacheRead": .05,
216
+ "cacheWrite": .625
217
+ },
218
+ "compat": { "supportsUsageInStreaming": false }
219
+ },
220
+ {
221
+ "id": "claude-fable-5",
222
+ "name": "Claude Fable 5 (via Venice)",
223
+ "reasoning": true,
224
+ "input": ["text", "image"],
225
+ "contextWindow": 1e6,
226
+ "maxTokens": 128e3,
227
+ "cost": {
228
+ "input": 12,
229
+ "output": 60,
230
+ "cacheRead": 1.2,
231
+ "cacheWrite": 15
232
+ },
233
+ "compat": { "supportsUsageInStreaming": false }
234
+ },
235
+ {
236
+ "id": "claude-opus-5",
237
+ "name": "Claude Opus 5 (via Venice)",
238
+ "reasoning": true,
239
+ "input": ["text", "image"],
240
+ "contextWindow": 1e6,
241
+ "maxTokens": 128e3,
242
+ "cost": {
243
+ "input": 6,
244
+ "output": 30,
245
+ "cacheRead": .6,
246
+ "cacheWrite": 7.5
247
+ },
248
+ "compat": { "supportsUsageInStreaming": false }
249
+ },
250
+ {
251
+ "id": "claude-sonnet-4-6",
252
+ "name": "Claude Sonnet 4.6 (via Venice)",
253
+ "reasoning": true,
254
+ "input": ["text", "image"],
255
+ "contextWindow": 1e6,
256
+ "maxTokens": 64e3,
257
+ "cost": {
258
+ "input": 3.6,
259
+ "output": 18,
260
+ "cacheRead": .36,
261
+ "cacheWrite": 4.5
262
+ },
263
+ "compat": { "supportsUsageInStreaming": false }
264
+ },
265
+ {
266
+ "id": "openai-gpt-56-sol",
267
+ "name": "GPT-5.6 Sol (via Venice)",
268
+ "reasoning": true,
269
+ "input": ["text", "image"],
270
+ "contextWindow": 1e6,
271
+ "maxTokens": 128e3,
272
+ "cost": {
273
+ "input": 6.25,
274
+ "output": 37.5,
275
+ "cacheRead": .625,
276
+ "cacheWrite": 7.8125
277
+ },
278
+ "compat": { "supportsUsageInStreaming": false }
279
+ },
280
+ {
281
+ "id": "zai-org-glm-4.6",
282
+ "name": "GLM 4.6",
283
+ "status": "deprecated",
284
+ "replacedBy": "zai-org-glm-4.7",
285
+ "reasoning": true,
286
+ "input": ["text"],
287
+ "contextWindow": 198e3,
288
+ "maxTokens": 16384,
289
+ "cost": {
290
+ "input": .43,
291
+ "output": 1.75,
292
+ "cacheRead": .08,
293
+ "cacheWrite": 0
294
+ },
295
+ "compat": { "supportsUsageInStreaming": false }
296
+ },
297
+ {
298
+ "id": "google-gemma-3-27b-it",
299
+ "name": "Google Gemma 3 27B Instruct",
300
+ "status": "deprecated",
301
+ "replacedBy": "google-gemma-4-31b-it",
302
+ "reasoning": false,
303
+ "input": ["text", "image"],
304
+ "contextWindow": 198e3,
305
+ "maxTokens": 16384,
306
+ "cost": {
307
+ "input": .12,
308
+ "output": .2,
309
+ "cacheRead": 0,
310
+ "cacheWrite": 0
311
+ },
312
+ "compat": { "supportsUsageInStreaming": false }
313
+ },
314
+ {
315
+ "id": "kimi-k2-5",
316
+ "name": "Kimi K2.5",
317
+ "status": "deprecated",
318
+ "replacedBy": "kimi-k2-6",
319
+ "reasoning": true,
320
+ "input": ["text", "image"],
321
+ "contextWindow": 256e3,
322
+ "maxTokens": 65536,
323
+ "cost": {
324
+ "input": .56,
325
+ "output": 3.5,
326
+ "cacheRead": .22,
327
+ "cacheWrite": 0
328
+ },
329
+ "compat": { "supportsUsageInStreaming": false }
330
+ }
331
+ ]
332
+ } },
333
+ "discovery": { "venice": "refreshable" }
334
+ }
335
+ };
336
+ //#endregion
337
+ //#region extensions/venice/models.ts
338
+ const VENICE_MANIFEST_CATALOG = openclaw_plugin_default.modelCatalog.providers.venice;
339
+ const VENICE_BASE_URL = VENICE_MANIFEST_CATALOG.baseUrl;
340
+ const VENICE_DEFAULT_MODEL_REF = readManifestProviderDefaultModelRef(openclaw_plugin_default, "venice");
341
+ const VENICE_DEFAULT_COST = {
342
+ input: 0,
343
+ output: 0,
344
+ cacheRead: 0,
345
+ cacheWrite: 0
346
+ };
347
+ const VENICE_DEFAULT_CONTEXT_WINDOW = 128e3;
348
+ const VENICE_DEFAULT_MAX_TOKENS = 4096;
349
+ const VENICE_DISCOVERY_HARD_MAX_TOKENS = 131072;
350
+ const VENICE_DISCOVERY_TIMEOUT_MS = 1e4;
351
+ const VENICE_DISCOVERY_CACHE_TTL_MS = 6e4;
352
+ function decorateVeniceModelDefinition(entry) {
353
+ return {
354
+ id: entry.id,
355
+ name: entry.name,
356
+ reasoning: entry.reasoning,
357
+ input: [...entry.input],
358
+ cost: VENICE_DEFAULT_COST,
359
+ contextWindow: entry.contextWindow,
360
+ maxTokens: entry.maxTokens,
361
+ compat: {
362
+ supportsUsageInStreaming: false,
363
+ ...entry.compat
364
+ }
365
+ };
366
+ }
367
+ /** Venice's decorated network-free fallback catalog. */
368
+ const VENICE_MODEL_CATALOG = VENICE_MANIFEST_CATALOG.models.map(buildManifestModelDefinition({
369
+ providerId: "venice",
370
+ catalog: VENICE_MANIFEST_CATALOG,
371
+ decorate: decorateVeniceModelDefinition
372
+ }));
373
+ function normalizePositiveInt(value) {
374
+ if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) return;
375
+ return Math.floor(value);
376
+ }
377
+ function resolveApiMaxCompletionTokens(params) {
378
+ const raw = normalizePositiveInt(params.apiModel.model_spec?.maxCompletionTokens);
379
+ if (!raw) return;
380
+ const contextWindow = normalizePositiveInt(params.apiModel.model_spec?.availableContextTokens);
381
+ const knownMaxTokens = typeof params.knownMaxTokens === "number" && Number.isFinite(params.knownMaxTokens) ? Math.floor(params.knownMaxTokens) : void 0;
382
+ return Math.min(raw, contextWindow ?? knownMaxTokens ?? VENICE_DEFAULT_CONTEXT_WINDOW, knownMaxTokens ?? VENICE_DISCOVERY_HARD_MAX_TOKENS);
383
+ }
384
+ function resolveApiSupportsTools(apiModel) {
385
+ const supportsFunctionCalling = apiModel.model_spec?.capabilities?.supportsFunctionCalling;
386
+ return typeof supportsFunctionCalling === "boolean" ? supportsFunctionCalling : void 0;
387
+ }
388
+ function projectVeniceModels(rows, fallback) {
389
+ const catalogById = new Map(fallback.models.map((model) => [model.id, model]));
390
+ const models = [];
391
+ for (const row of rows) {
392
+ if (!row || typeof row !== "object" || Array.isArray(row)) continue;
393
+ const apiModel = row;
394
+ if (typeof apiModel.id !== "string" || !apiModel.id.trim()) continue;
395
+ const catalogEntry = catalogById.get(apiModel.id);
396
+ const apiMaxTokens = resolveApiMaxCompletionTokens({
397
+ apiModel,
398
+ knownMaxTokens: catalogEntry?.maxTokens
399
+ });
400
+ const apiSupportsTools = resolveApiSupportsTools(apiModel);
401
+ if (catalogEntry) {
402
+ const definition = {
403
+ ...catalogEntry,
404
+ input: [...catalogEntry.input],
405
+ cost: { ...catalogEntry.cost },
406
+ ...catalogEntry.compat ? { compat: { ...catalogEntry.compat } } : {}
407
+ };
408
+ if (apiMaxTokens !== void 0) definition.maxTokens = apiMaxTokens;
409
+ if (apiSupportsTools === false) definition.compat = {
410
+ ...definition.compat,
411
+ supportsTools: false
412
+ };
413
+ models.push(definition);
414
+ } else {
415
+ const apiSpec = apiModel.model_spec;
416
+ const lowerModelId = normalizeLowercaseStringOrEmpty(apiModel.id);
417
+ const isReasoning = apiSpec?.capabilities?.supportsReasoning || lowerModelId.includes("thinking") || lowerModelId.includes("reason") || lowerModelId.includes("r1");
418
+ const hasVision = apiSpec?.capabilities?.supportsVision === true;
419
+ models.push({
420
+ id: apiModel.id,
421
+ name: apiSpec?.name || apiModel.id,
422
+ reasoning: isReasoning,
423
+ input: hasVision ? ["text", "image"] : ["text"],
424
+ cost: VENICE_DEFAULT_COST,
425
+ contextWindow: normalizePositiveInt(apiSpec?.availableContextTokens) ?? VENICE_DEFAULT_CONTEXT_WINDOW,
426
+ maxTokens: apiMaxTokens ?? VENICE_DEFAULT_MAX_TOKENS,
427
+ compat: {
428
+ supportsUsageInStreaming: false,
429
+ ...apiSupportsTools === false ? { supportsTools: false } : {}
430
+ }
431
+ });
432
+ }
433
+ }
434
+ return models;
435
+ }
436
+ const VENICE_MODEL_DISCOVERY_OPTIONS = {
437
+ timeoutMs: VENICE_DISCOVERY_TIMEOUT_MS,
438
+ ttlMs: VENICE_DISCOVERY_CACHE_TTL_MS,
439
+ buildRequestHeaders: () => ({ Accept: "application/json" }),
440
+ projectRows: projectVeniceModels
441
+ };
442
+ //#endregion
443
+ export { openclaw_plugin_default as a, VENICE_MODEL_DISCOVERY_OPTIONS as i, VENICE_DEFAULT_MODEL_REF as n, VENICE_MODEL_CATALOG as r, VENICE_BASE_URL as t };
package/dist/models.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as discoverVeniceModels, i as buildVeniceModelDefinition, n as VENICE_DEFAULT_MODEL_REF, r as VENICE_MODEL_CATALOG, t as VENICE_BASE_URL } from "./models-DKepSu04.js";
2
- export { VENICE_BASE_URL, VENICE_DEFAULT_MODEL_REF, VENICE_MODEL_CATALOG, buildVeniceModelDefinition, discoverVeniceModels };
1
+ import { i as VENICE_MODEL_DISCOVERY_OPTIONS, n as VENICE_DEFAULT_MODEL_REF, r as VENICE_MODEL_CATALOG, t as VENICE_BASE_URL } from "./models-BnwQxlOw.js";
2
+ export { VENICE_BASE_URL, VENICE_DEFAULT_MODEL_REF, VENICE_MODEL_CATALOG, VENICE_MODEL_DISCOVERY_OPTIONS };
package/dist/onboard.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as buildVeniceModelDefinition, n as VENICE_DEFAULT_MODEL_REF, r as VENICE_MODEL_CATALOG, t as VENICE_BASE_URL } from "./models-DKepSu04.js";
1
+ import { n as VENICE_DEFAULT_MODEL_REF, r as VENICE_MODEL_CATALOG, t as VENICE_BASE_URL } from "./models-BnwQxlOw.js";
2
2
  import "./api.js";
3
3
  import { createModelCatalogPresetAppliers } from "openclaw/plugin-sdk/provider-onboard";
4
4
  //#region extensions/venice/onboard.ts
@@ -8,10 +8,10 @@ const venicePresetAppliers = createModelCatalogPresetAppliers({
8
8
  providerId: "venice",
9
9
  api: "openai-completions",
10
10
  baseUrl: VENICE_BASE_URL,
11
- catalogModels: VENICE_MODEL_CATALOG.map(buildVeniceModelDefinition),
11
+ catalogModels: structuredClone(VENICE_MODEL_CATALOG),
12
12
  aliases: [{
13
13
  modelRef: VENICE_DEFAULT_MODEL_REF,
14
- alias: "Kimi K2.5"
14
+ alias: "GLM 4.7"
15
15
  }]
16
16
  })
17
17
  });
@@ -19,4 +19,4 @@ function applyVeniceConfig(cfg) {
19
19
  return venicePresetAppliers.applyConfig(cfg);
20
20
  }
21
21
  //#endregion
22
- export { VENICE_DEFAULT_MODEL_REF, applyVeniceConfig };
22
+ export { applyVeniceConfig };
@@ -1,11 +1,11 @@
1
- import { a as discoverVeniceModels, t as VENICE_BASE_URL } from "./models-DKepSu04.js";
1
+ import { r as VENICE_MODEL_CATALOG, t as VENICE_BASE_URL } from "./models-BnwQxlOw.js";
2
2
  //#region extensions/venice/provider-catalog.ts
3
- async function buildVeniceProvider() {
3
+ function buildStaticVeniceProvider() {
4
4
  return {
5
5
  baseUrl: VENICE_BASE_URL,
6
6
  api: "openai-completions",
7
- models: await discoverVeniceModels()
7
+ models: structuredClone(VENICE_MODEL_CATALOG)
8
8
  };
9
9
  }
10
10
  //#endregion
11
- export { buildVeniceProvider };
11
+ export { buildStaticVeniceProvider };
package/dist/stream.js CHANGED
@@ -1,22 +1,19 @@
1
- import { createPayloadPatchStreamWrapper } from "openclaw/plugin-sdk/provider-stream-shared";
1
+ import { createPayloadPatchStreamWrapper, normalizeOpenAICompatibleReasoningReplay } from "openclaw/plugin-sdk/provider-stream-shared";
2
2
  //#region extensions/venice/stream.ts
3
3
  function isVeniceDeepSeekV4ModelId(modelId) {
4
4
  return modelId === "deepseek-v4-flash" || modelId === "deepseek-v4-pro";
5
5
  }
6
- function ensureVeniceDeepSeekV4Replay(payload) {
7
- delete payload.thinking;
8
- delete payload.reasoning;
9
- delete payload.reasoning_effort;
10
- if (!Array.isArray(payload.messages)) return;
11
- for (const message of payload.messages) {
12
- if (!message || typeof message !== "object") continue;
13
- const record = message;
14
- if (record.role === "assistant") record.reasoning_content ??= "";
15
- }
16
- }
17
6
  function createVeniceDeepSeekV4Wrapper(baseStreamFn, thinkingLevel) {
18
7
  return createPayloadPatchStreamWrapper(baseStreamFn, ({ payload, model }) => {
19
- if (model.provider === "venice" && isVeniceDeepSeekV4ModelId(model.id)) ensureVeniceDeepSeekV4Replay(payload);
8
+ if (model.provider === "venice" && isVeniceDeepSeekV4ModelId(model.id)) {
9
+ delete payload.thinking;
10
+ delete payload.reasoning;
11
+ delete payload.reasoning_effort;
12
+ normalizeOpenAICompatibleReasoningReplay(payload, {
13
+ thinkingEnabled: true,
14
+ replaceNullReasoningContent: true
15
+ });
16
+ }
20
17
  });
21
18
  }
22
19
  //#endregion