mohdel 0.121.0 → 0.121.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.
@@ -332,7 +332,12 @@ function buildContents (prompt) {
332
332
  /** @param {string | import('#core/envelope.js').MessagePart[]} content */
333
333
  function safeParseToolResult (content) {
334
334
  const text = flattenText(content)
335
- try { return JSON.parse(text) } catch { return { result: text } }
335
+ let value
336
+ try { value = JSON.parse(text) } catch { return { result: text } }
337
+ // `response` must be a protobuf Struct — a JSON object. A result that
338
+ // parses to a number, string, boolean, null or array is rejected 400.
339
+ if (value === null || typeof value !== 'object' || Array.isArray(value)) return { result: value }
340
+ return value
336
341
  }
337
342
 
338
343
  /** @param {string} role */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mohdel",
3
- "version": "0.121.0",
3
+ "version": "0.121.1",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Christophe Le Bars",
@@ -108,16 +108,16 @@
108
108
  "@opentelemetry/exporter-trace-otlp-grpc": "^0.221.0",
109
109
  "@opentelemetry/sdk-node": "^0.221.0",
110
110
  "chalk": "^6.0.0",
111
- "mohdel-thin-gate-linux-x64-gnu": "0.121.0"
111
+ "mohdel-thin-gate-linux-x64-gnu": "0.121.1"
112
112
  },
113
113
  "dependencies": {
114
- "@anthropic-ai/sdk": "^0.117.1",
114
+ "@anthropic-ai/sdk": "^0.120.0",
115
115
  "@cerebras/cerebras_cloud_sdk": "^1.91.0",
116
- "@google/genai": "^2.17.1",
116
+ "@google/genai": "^2.18.0",
117
117
  "@opentelemetry/api": "^1.9.1",
118
118
  "env-paths": "^4.0.0",
119
119
  "groq-sdk": "^1.5.0",
120
- "openai": "^7.4.0",
120
+ "openai": "^7.5.0",
121
121
  "undici": "^7.29.0"
122
122
  },
123
123
  "lint-staged": {
@@ -128,6 +128,6 @@
128
128
  "lint-staged": "^17.3.0",
129
129
  "release-it": "^21.0.2",
130
130
  "standard": "^17.1.2",
131
- "vitest": "^4.1.10"
131
+ "vitest": "^4.1.11"
132
132
  }
133
133
  }