@openclaw/gradium-speech 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.
@@ -1,10 +1,10 @@
1
1
  import { GRADIUM_VOICES, normalizeGradiumBaseUrl } from "./shared.js";
2
2
  import { gradiumTTS } from "./tts.js";
3
+ import { resolveGeneratedMediaMaxBytes } from "openclaw/plugin-sdk/media-generation-runtime";
3
4
  import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
4
5
  import { asObject, trimToUndefined } from "openclaw/plugin-sdk/speech";
5
6
  import { resolveSpeechProviderApiKey } from "openclaw/plugin-sdk/speech-core";
6
7
  //#region extensions/gradium/speech-provider.ts
7
- const DEFAULT_GENERATED_AUDIO_MAX_BYTES = 16 * 1024 * 1024;
8
8
  function normalizeGradiumProviderConfig(rawConfig) {
9
9
  const raw = asObject(asObject(rawConfig.providers)?.gradium) ?? asObject(rawConfig.gradium);
10
10
  return {
@@ -36,11 +36,6 @@ function isGradiumProviderConfigured(config) {
36
36
  return false;
37
37
  }
38
38
  }
39
- function resolveGeneratedAudioMaxBytes(req) {
40
- const configured = req.cfg.agents?.defaults?.mediaMaxMb;
41
- if (typeof configured === "number" && Number.isFinite(configured) && configured > 0) return Math.floor(configured * 1024 * 1024);
42
- return DEFAULT_GENERATED_AUDIO_MAX_BYTES;
43
- }
44
39
  function parseDirectiveToken(ctx) {
45
40
  switch (ctx.key) {
46
41
  case "voice":
@@ -87,7 +82,7 @@ function buildGradiumSpeechProvider() {
87
82
  voiceId: trimToUndefined(overrides.voiceId) ?? config.voiceId,
88
83
  outputFormat,
89
84
  timeoutMs: req.timeoutMs,
90
- maxBytes: resolveGeneratedAudioMaxBytes(req)
85
+ maxBytes: resolveGeneratedMediaMaxBytes(req.cfg, "audio")
91
86
  }),
92
87
  outputFormat,
93
88
  fileExtension: wantsVoiceNote ? ".opus" : ".wav",
@@ -108,7 +103,7 @@ function buildGradiumSpeechProvider() {
108
103
  voiceId: trimToUndefined(overrides.voiceId) ?? config.voiceId,
109
104
  outputFormat,
110
105
  timeoutMs: req.timeoutMs,
111
- maxBytes: resolveGeneratedAudioMaxBytes(req)
106
+ maxBytes: resolveGeneratedMediaMaxBytes(req.cfg, "audio")
112
107
  }),
113
108
  outputFormat,
114
109
  sampleRate: 8e3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/gradium-speech",
3
- "version": "2026.7.2-beta.4",
3
+ "version": "2026.7.2-beta.5",
4
4
  "description": "OpenClaw Gradium speech 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.7.2-beta.4"
21
+ "pluginApi": ">=2026.7.2-beta.5"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.7.2-beta.4",
24
+ "openclawVersion": "2026.7.2-beta.5",
25
25
  "bundledDist": false
26
26
  },
27
27
  "release": {
@@ -35,11 +35,10 @@
35
35
  "files": [
36
36
  "dist/**",
37
37
  "openclaw.plugin.json",
38
- "npm-shrinkwrap.json",
39
38
  "README.md"
40
39
  ],
41
40
  "peerDependencies": {
42
- "openclaw": ">=2026.7.2-beta.4"
41
+ "openclaw": ">=2026.7.2-beta.5"
43
42
  },
44
43
  "peerDependenciesMeta": {
45
44
  "openclaw": {
@@ -1,12 +0,0 @@
1
- {
2
- "name": "@openclaw/gradium-speech",
3
- "version": "2026.7.2-beta.4",
4
- "lockfileVersion": 3,
5
- "requires": true,
6
- "packages": {
7
- "": {
8
- "name": "@openclaw/gradium-speech",
9
- "version": "2026.7.2-beta.4"
10
- }
11
- }
12
- }