piclaw 0.0.19 → 0.0.21

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.
Files changed (270) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/defult-D5RLDUrI.js +1 -0
  3. package/.output/public/assets/{dist-CMBqBOCp.js → dist-BH_oa-kv.js} +1 -1
  4. package/.output/public/assets/index-7JvURuHy.js +204 -0
  5. package/.output/public/assets/index-K43slwjJ.css +1 -0
  6. package/.output/public/index.html +11 -2
  7. package/.output/server/_...path_.get.mjs +16 -0
  8. package/.output/server/_chunks/app.mjs +261 -181
  9. package/.output/server/_chunks/browser.mjs +4 -1
  10. package/.output/server/_chunks/config.mjs +4 -0
  11. package/.output/server/_chunks/db.mjs +32 -28
  12. package/.output/server/_chunks/device-bus.mjs +123 -0
  13. package/.output/server/_chunks/dummy.mjs +1 -1
  14. package/.output/server/_chunks/logger.mjs +23 -0
  15. package/.output/server/_chunks/login.mjs +1 -1
  16. package/.output/server/_chunks/notes.mjs +1 -3
  17. package/.output/server/_chunks/renderer-template.mjs +1 -1
  18. package/.output/server/_chunks/sandbox.mjs +217 -0
  19. package/.output/server/_chunks/server.mjs +2302 -122
  20. package/.output/server/_chunks/terminal.mjs +63 -8
  21. package/.output/server/_chunks/uploads.mjs +60 -0
  22. package/.output/server/_chunks/virtual.mjs +192 -54
  23. package/.output/server/_id_.delete.mjs +5 -2
  24. package/.output/server/_id_.patch.mjs +2 -0
  25. package/.output/server/_id_2.delete.mjs +8 -0
  26. package/.output/server/_jid_.delete.mjs +5 -2
  27. package/.output/server/_jid_.patch.mjs +37 -4
  28. package/.output/server/_jid_2.delete.mjs +5 -2
  29. package/.output/server/_libs/@acemir/cssom+[...].mjs +2269 -1137
  30. package/.output/server/_libs/@google/genai.mjs +337 -273
  31. package/.output/server/_libs/@mariozechner/pi-agent-core+[...].mjs +381 -2073
  32. package/.output/server/_libs/@mariozechner/pi-coding-agent+[...].mjs +231 -131
  33. package/.output/server/_libs/_.mjs +3 -2
  34. package/.output/server/_libs/_10.mjs +2 -4
  35. package/.output/server/_libs/_11.mjs +2 -4
  36. package/.output/server/_libs/_12.mjs +2 -3
  37. package/.output/server/_libs/_13.mjs +2 -3
  38. package/.output/server/_libs/_14.mjs +2 -4
  39. package/.output/server/_libs/_15.mjs +2 -4
  40. package/.output/server/_libs/_16.mjs +2 -3
  41. package/.output/server/_libs/_17.mjs +2 -4
  42. package/.output/server/_libs/_18.mjs +2 -2
  43. package/.output/server/_libs/_19.mjs +2 -2
  44. package/.output/server/_libs/_2.mjs +3 -3
  45. package/.output/server/_libs/_20.mjs +2 -2
  46. package/.output/server/_libs/_21.mjs +2 -2
  47. package/.output/server/_libs/_22.mjs +2 -2
  48. package/.output/server/_libs/_23.mjs +2 -2
  49. package/.output/server/_libs/_24.mjs +2 -2
  50. package/.output/server/_libs/_25.mjs +2 -2
  51. package/.output/server/_libs/_26.mjs +2 -2
  52. package/.output/server/_libs/_27.mjs +2 -2
  53. package/.output/server/_libs/_28.mjs +2 -2
  54. package/.output/server/_libs/_29.mjs +2 -2
  55. package/.output/server/_libs/_3.mjs +3 -3
  56. package/.output/server/_libs/_30.mjs +2 -2
  57. package/.output/server/_libs/_31.mjs +2 -2
  58. package/.output/server/_libs/_32.mjs +2 -2
  59. package/.output/server/_libs/_33.mjs +2 -2
  60. package/.output/server/_libs/_34.mjs +2 -2
  61. package/.output/server/_libs/_35.mjs +2 -2
  62. package/.output/server/_libs/_36.mjs +2 -2
  63. package/.output/server/_libs/_37.mjs +2 -2
  64. package/.output/server/_libs/_38.mjs +2 -2
  65. package/.output/server/_libs/_39.mjs +2 -2
  66. package/.output/server/_libs/_4.mjs +4 -3
  67. package/.output/server/_libs/_40.mjs +2 -2
  68. package/.output/server/_libs/_41.mjs +2 -2
  69. package/.output/server/_libs/_42.mjs +2 -2
  70. package/.output/server/_libs/_43.mjs +2 -2
  71. package/.output/server/_libs/_44.mjs +2 -2
  72. package/.output/server/_libs/_45.mjs +2 -2
  73. package/.output/server/_libs/_46.mjs +2 -2
  74. package/.output/server/_libs/_47.mjs +2 -2
  75. package/.output/server/_libs/_48.mjs +2 -2
  76. package/.output/server/_libs/_49.mjs +2 -2
  77. package/.output/server/_libs/_5.mjs +2 -3
  78. package/.output/server/_libs/_50.mjs +2 -2
  79. package/.output/server/_libs/_51.mjs +2 -2
  80. package/.output/server/_libs/_52.mjs +2 -2
  81. package/.output/server/_libs/_53.mjs +2 -2
  82. package/.output/server/_libs/_54.mjs +2 -2
  83. package/.output/server/_libs/_55.mjs +2 -2
  84. package/.output/server/_libs/_56.mjs +2 -2
  85. package/.output/server/_libs/_57.mjs +2 -2
  86. package/.output/server/_libs/_58.mjs +2 -2
  87. package/.output/server/_libs/_59.mjs +2 -2
  88. package/.output/server/_libs/_6.mjs +2 -3
  89. package/.output/server/_libs/_60.mjs +2 -2
  90. package/.output/server/_libs/_61.mjs +2 -2
  91. package/.output/server/_libs/_62.mjs +2 -2
  92. package/.output/server/_libs/_63.mjs +2 -2
  93. package/.output/server/_libs/_64.mjs +2 -2
  94. package/.output/server/_libs/_65.mjs +2 -2
  95. package/.output/server/_libs/_66.mjs +2 -2
  96. package/.output/server/_libs/_67.mjs +2 -2
  97. package/.output/server/_libs/_68.mjs +2 -2
  98. package/.output/server/_libs/_69.mjs +2 -2
  99. package/.output/server/_libs/_7.mjs +2 -5
  100. package/.output/server/_libs/_70.mjs +2 -2
  101. package/.output/server/_libs/_71.mjs +2 -2
  102. package/.output/server/_libs/_72.mjs +2 -2
  103. package/.output/server/_libs/_73.mjs +2 -2
  104. package/.output/server/_libs/_74.mjs +2 -2
  105. package/.output/server/_libs/_75.mjs +2 -2
  106. package/.output/server/_libs/_76.mjs +2 -2
  107. package/.output/server/_libs/_77.mjs +2 -2
  108. package/.output/server/_libs/_78.mjs +2 -2
  109. package/.output/server/_libs/_79.mjs +2 -2
  110. package/.output/server/_libs/_8.mjs +2 -3
  111. package/.output/server/_libs/_80.mjs +2 -2
  112. package/.output/server/_libs/_81.mjs +2 -2
  113. package/.output/server/_libs/_82.mjs +2 -2
  114. package/.output/server/_libs/_83.mjs +2 -2
  115. package/.output/server/_libs/_84.mjs +2 -2
  116. package/.output/server/_libs/_85.mjs +2 -2
  117. package/.output/server/_libs/_86.mjs +2 -2
  118. package/.output/server/_libs/_87.mjs +2 -2
  119. package/.output/server/_libs/_88.mjs +2 -2
  120. package/.output/server/_libs/_89.mjs +2 -2
  121. package/.output/server/_libs/_9.mjs +2 -4
  122. package/.output/server/_libs/_90.mjs +5 -2
  123. package/.output/server/_libs/_91.mjs +3 -2
  124. package/.output/server/_libs/_92.mjs +2 -2
  125. package/.output/server/_libs/_93.mjs +2 -2
  126. package/.output/server/_libs/_94.mjs +2 -2
  127. package/.output/server/_libs/agent-base.mjs +1 -1
  128. package/.output/server/_libs/cheerio+[...].mjs +1 -1
  129. package/.output/server/_libs/data-uri-to-buffer.mjs +2 -67
  130. package/.output/server/_libs/data-urls+[...].mjs +1 -1
  131. package/.output/server/_libs/diff.mjs +1 -1
  132. package/.output/server/_libs/exodus__bytes.mjs +99 -81
  133. package/.output/server/_libs/fetch-blob+node-domexception.mjs +1 -1
  134. package/.output/server/_libs/h3+rou3+srvx.mjs +34 -4
  135. package/.output/server/_libs/html-encoding-sniffer.mjs +1 -1
  136. package/.output/server/_libs/https-proxy-agent.mjs +2 -2
  137. package/.output/server/_libs/jsdom.mjs +1 -1
  138. package/.output/server/_libs/just-bash+[...].mjs +4676 -3916
  139. package/.output/server/_libs/mariozechner__jiti.mjs +1 -1
  140. package/.output/server/_libs/mariozechner__pi-ai.mjs +1472 -0
  141. package/.output/server/_libs/md4x.mjs +1 -1
  142. package/.output/server/_libs/mime.mjs +838 -1
  143. package/.output/server/_libs/node-fetch.mjs +4 -4
  144. package/.output/server/_libs/node-liblzma.mjs +1 -1
  145. package/.output/server/_libs/silvia-odwyer__photon-node.mjs +1 -1
  146. package/.output/server/_routes/api/auth/approve.mjs +2 -0
  147. package/.output/server/_routes/api/auth/revoke.mjs +2 -0
  148. package/.output/server/_routes/api/auth/status.mjs +25 -6
  149. package/.output/server/_routes/api/browser2.mjs +1 -1
  150. package/.output/server/_routes/api/config2.mjs +2 -0
  151. package/.output/server/_routes/api/device_events.mjs +36 -0
  152. package/.output/server/_routes/api/files/groups.mjs +1 -2
  153. package/.output/server/_routes/api/files/raw.mjs +1 -1
  154. package/.output/server/_routes/api/groups.mjs +5 -3
  155. package/.output/server/_routes/api/groups2.mjs +18 -6
  156. package/.output/server/_routes/api/health.mjs +1 -2
  157. package/.output/server/_routes/api/messages.mjs +7 -1
  158. package/.output/server/_routes/api/notes/delete.mjs +4 -1
  159. package/.output/server/_routes/api/notes/write.mjs +2 -0
  160. package/.output/server/_routes/api/ntfy/setup.mjs +8 -0
  161. package/.output/server/_routes/api/pi/apikey.mjs +3 -2
  162. package/.output/server/_routes/api/pi/apikey_providers.mjs +1 -2
  163. package/.output/server/_routes/api/pi/commands.mjs +13 -3
  164. package/.output/server/_routes/api/pi/login/events.mjs +0 -1
  165. package/.output/server/_routes/api/pi/login/respond.mjs +2 -1
  166. package/.output/server/_routes/api/pi/login.mjs +1 -2
  167. package/.output/server/_routes/api/pi/logout.mjs +2 -1
  168. package/.output/server/_routes/api/pi/models.mjs +1 -2
  169. package/.output/server/_routes/api/pi/models_config2.mjs +2 -0
  170. package/.output/server/_routes/api/pi/settings2.mjs +2 -0
  171. package/.output/server/_routes/api/pi/status.mjs +1 -2
  172. package/.output/server/_routes/api/proxy.mjs +19 -1
  173. package/.output/server/_routes/api/sandbox.mjs +26 -0
  174. package/.output/server/_routes/api/sandbox2.mjs +17 -0
  175. package/.output/server/_routes/api/send.mjs +26 -18
  176. package/.output/server/_routes/api/status.mjs +1 -3
  177. package/.output/server/_routes/api/stop.mjs +11 -0
  178. package/.output/server/_routes/api/store/plugins.mjs +75 -0
  179. package/.output/server/_routes/api/store/skills.mjs +11 -0
  180. package/.output/server/_routes/api/tasks2.mjs +3 -2
  181. package/.output/server/_routes/api/telegram/setup.mjs +5 -2
  182. package/.output/server/_routes/api/telegram/status.mjs +1 -2
  183. package/.output/server/_routes/api/terminal2.mjs +2 -1
  184. package/.output/server/_routes/api/tunnel/setup.mjs +4 -2
  185. package/.output/server/_runtime.mjs +1 -2
  186. package/.output/server/_utils.mjs +10 -2
  187. package/.output/server/index.mjs +1 -1
  188. package/.output/server/node_modules/amdefine/amdefine.js +301 -0
  189. package/.output/server/node_modules/amdefine/package.json +16 -0
  190. package/.output/server/node_modules/compressjs/lib/BWT.js +420 -0
  191. package/.output/server/node_modules/compressjs/lib/BWTC.js +234 -0
  192. package/.output/server/node_modules/compressjs/lib/BitStream.js +108 -0
  193. package/.output/server/node_modules/compressjs/lib/Bzip2.js +936 -0
  194. package/.output/server/node_modules/compressjs/lib/CRC32.js +105 -0
  195. package/.output/server/node_modules/compressjs/lib/Context1Model.js +56 -0
  196. package/.output/server/node_modules/compressjs/lib/DefSumModel.js +152 -0
  197. package/.output/server/node_modules/compressjs/lib/DeflateDistanceModel.js +55 -0
  198. package/.output/server/node_modules/compressjs/lib/Dmc.js +197 -0
  199. package/.output/server/node_modules/compressjs/lib/DummyRangeCoder.js +81 -0
  200. package/.output/server/node_modules/compressjs/lib/FenwickModel.js +194 -0
  201. package/.output/server/node_modules/compressjs/lib/Huffman.js +514 -0
  202. package/.output/server/node_modules/compressjs/lib/HuffmanAllocator.js +227 -0
  203. package/.output/server/node_modules/compressjs/lib/LogDistanceModel.js +46 -0
  204. package/.output/server/node_modules/compressjs/lib/Lzjb.js +300 -0
  205. package/.output/server/node_modules/compressjs/lib/LzjbR.js +241 -0
  206. package/.output/server/node_modules/compressjs/lib/Lzp3.js +273 -0
  207. package/.output/server/node_modules/compressjs/lib/MTFModel.js +208 -0
  208. package/.output/server/node_modules/compressjs/lib/NoModel.js +46 -0
  209. package/.output/server/node_modules/compressjs/lib/PPM.js +343 -0
  210. package/.output/server/node_modules/compressjs/lib/RangeCoder.js +238 -0
  211. package/.output/server/node_modules/compressjs/lib/Simple.js +111 -0
  212. package/.output/server/node_modules/compressjs/lib/Stream.js +53 -0
  213. package/.output/server/node_modules/compressjs/lib/Util.js +324 -0
  214. package/.output/server/node_modules/compressjs/lib/freeze.js +14 -0
  215. package/.output/server/node_modules/compressjs/main.js +29 -0
  216. package/.output/server/node_modules/compressjs/package.json +35 -0
  217. package/.output/server/package.json +2 -1
  218. package/README.md +10 -1
  219. package/lib/index.d.mts +1 -0
  220. package/lib/index.mjs +1 -0
  221. package/lib/piclaw.mjs +100 -0
  222. package/lib/utils.mjs +96 -0
  223. package/package.json +16 -11
  224. package/.output/public/assets/defult-CMO6TZ5a.js +0 -1
  225. package/.output/public/assets/index-jdnbJw-M.js +0 -204
  226. package/.output/public/assets/index-ooXrRwgl.css +0 -1
  227. package/.output/server/_chunks/commands.mjs +0 -282
  228. package/.output/server/_chunks/pi.mjs +0 -202
  229. package/.output/server/_chunks/session.mjs +0 -1114
  230. package/.output/server/_libs/@aws-crypto/crc32+[...].mjs +0 -299
  231. package/.output/server/_libs/@aws-sdk/client-bedrock-runtime+[...].mjs +0 -17828
  232. package/.output/server/_libs/@aws-sdk/credential-provider-http+[...].mjs +0 -122
  233. package/.output/server/_libs/@aws-sdk/credential-provider-ini+[...].mjs +0 -417
  234. package/.output/server/_libs/@aws-sdk/credential-provider-process+[...].mjs +0 -54
  235. package/.output/server/_libs/@aws-sdk/credential-provider-sso+[...].mjs +0 -1151
  236. package/.output/server/_libs/@aws-sdk/credential-provider-web-identity+[...].mjs +0 -50
  237. package/.output/server/_libs/@smithy/credential-provider-imds+[...].mjs +0 -369
  238. package/.output/server/_libs/@tootallnate/quickjs-emscripten+[...].mjs +0 -3011
  239. package/.output/server/_libs/_100.mjs +0 -2
  240. package/.output/server/_libs/_101.mjs +0 -2
  241. package/.output/server/_libs/_102.mjs +0 -5
  242. package/.output/server/_libs/_103.mjs +0 -3
  243. package/.output/server/_libs/_104.mjs +0 -2
  244. package/.output/server/_libs/_105.mjs +0 -3
  245. package/.output/server/_libs/_106.mjs +0 -2
  246. package/.output/server/_libs/_107.mjs +0 -2
  247. package/.output/server/_libs/_95.mjs +0 -2
  248. package/.output/server/_libs/_96.mjs +0 -2
  249. package/.output/server/_libs/_97.mjs +0 -2
  250. package/.output/server/_libs/_98.mjs +0 -2
  251. package/.output/server/_libs/_99.mjs +0 -2
  252. package/.output/server/_libs/amdefine.mjs +0 -188
  253. package/.output/server/_libs/ast-types.mjs +0 -2270
  254. package/.output/server/_libs/aws-sdk__nested-clients.mjs +0 -3141
  255. package/.output/server/_libs/basic-ftp.mjs +0 -1906
  256. package/.output/server/_libs/compressjs.mjs +0 -50
  257. package/.output/server/_libs/degenerator+[...].mjs +0 -9964
  258. package/.output/server/_libs/get-uri.mjs +0 -413
  259. package/.output/server/_libs/http-proxy-agent.mjs +0 -123
  260. package/.output/server/_libs/ip-address.mjs +0 -1423
  261. package/.output/server/_libs/lru-cache.mjs +0 -732
  262. package/.output/server/_libs/netmask.mjs +0 -139
  263. package/.output/server/_libs/pac-proxy-agent+[...].mjs +0 -3104
  264. package/.output/server/_libs/proxy-agent+proxy-from-env.mjs +0 -204
  265. package/.output/server/_libs/smithy__core.mjs +0 -192
  266. package/.output/server/node_modules/tslib/modules/index.js +0 -70
  267. package/.output/server/node_modules/tslib/modules/package.json +0 -3
  268. package/.output/server/node_modules/tslib/package.json +0 -47
  269. package/.output/server/node_modules/tslib/tslib.js +0 -484
  270. package/bin/piclaw.mjs +0 -195
@@ -1,4 +1,4 @@
1
- import { a as __require, n as __esmMin, o as __toCommonJS, r as __exportAll, s as __toESM, t as __commonJSMin } from "../../_runtime.mjs";
1
+ import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "../../_runtime.mjs";
2
2
  import { createWriteStream } from "fs";
3
3
  import * as path$1 from "path";
4
4
  import { Readable } from "node:stream";
@@ -1096,12 +1096,12 @@ var require_gaxios = /* @__PURE__ */ __commonJSMin(((exports) => {
1096
1096
  * @returns A proxy agent
1097
1097
  */
1098
1098
  static async #getProxyAgent() {
1099
- this.#proxyAgent ||= (await import("../_16.mjs").then((m) => /* @__PURE__ */ __toESM(m.default))).HttpsProxyAgent;
1099
+ this.#proxyAgent ||= (await import("../_3.mjs").then((m) => /* @__PURE__ */ __toESM(m.default))).HttpsProxyAgent;
1100
1100
  return this.#proxyAgent;
1101
1101
  }
1102
1102
  static async #getFetch() {
1103
1103
  const hasWindow = typeof window !== "undefined" && !!window;
1104
- this.#fetch ||= hasWindow ? window.fetch : (await import("../_102.mjs")).default;
1104
+ this.#fetch ||= hasWindow ? window.fetch : (await import("../_90.mjs")).default;
1105
1105
  return this.#fetch;
1106
1106
  }
1107
1107
  /**
@@ -13198,7 +13198,7 @@ var FunctionResponseScheduling;
13198
13198
  */
13199
13199
  FunctionResponseScheduling["INTERRUPT"] = "INTERRUPT";
13200
13200
  })(FunctionResponseScheduling || (FunctionResponseScheduling = {}));
13201
- /** The type of the data. */
13201
+ /** Data type of the schema field. */
13202
13202
  var Type;
13203
13203
  (function(Type) {
13204
13204
  /**
@@ -13266,22 +13266,6 @@ var PhishBlockThreshold;
13266
13266
  */
13267
13267
  PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
13268
13268
  })(PhishBlockThreshold || (PhishBlockThreshold = {}));
13269
- /** The API spec that the external API implements. This enum is not supported in Gemini API. */
13270
- var ApiSpec;
13271
- (function(ApiSpec) {
13272
- /**
13273
- * Unspecified API spec. This value should not be used.
13274
- */
13275
- ApiSpec["API_SPEC_UNSPECIFIED"] = "API_SPEC_UNSPECIFIED";
13276
- /**
13277
- * Simple search API spec.
13278
- */
13279
- ApiSpec["SIMPLE_SEARCH"] = "SIMPLE_SEARCH";
13280
- /**
13281
- * Elastic search API spec.
13282
- */
13283
- ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
13284
- })(ApiSpec || (ApiSpec = {}));
13285
13269
  /** Type of auth scheme. This enum is not supported in Gemini API. */
13286
13270
  var AuthType;
13287
13271
  (function(AuthType) {
@@ -13336,6 +13320,22 @@ var HttpElementLocation;
13336
13320
  */
13337
13321
  HttpElementLocation["HTTP_IN_COOKIE"] = "HTTP_IN_COOKIE";
13338
13322
  })(HttpElementLocation || (HttpElementLocation = {}));
13323
+ /** The API spec that the external API implements. This enum is not supported in Gemini API. */
13324
+ var ApiSpec;
13325
+ (function(ApiSpec) {
13326
+ /**
13327
+ * Unspecified API spec. This value should not be used.
13328
+ */
13329
+ ApiSpec["API_SPEC_UNSPECIFIED"] = "API_SPEC_UNSPECIFIED";
13330
+ /**
13331
+ * Simple search API spec.
13332
+ */
13333
+ ApiSpec["SIMPLE_SEARCH"] = "SIMPLE_SEARCH";
13334
+ /**
13335
+ * Elastic search API spec.
13336
+ */
13337
+ ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
13338
+ })(ApiSpec || (ApiSpec = {}));
13339
13339
  /** Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. This enum is not supported in Vertex AI. */
13340
13340
  var Behavior;
13341
13341
  (function(Behavior) {
@@ -13412,27 +13412,43 @@ var ThinkingLevel;
13412
13412
  */
13413
13413
  ThinkingLevel["MINIMAL"] = "MINIMAL";
13414
13414
  })(ThinkingLevel || (ThinkingLevel = {}));
13415
- /** Harm category. */
13415
+ /** Enum that controls the generation of people. */
13416
+ var PersonGeneration;
13417
+ (function(PersonGeneration) {
13418
+ /**
13419
+ * Block generation of images of people.
13420
+ */
13421
+ PersonGeneration["DONT_ALLOW"] = "DONT_ALLOW";
13422
+ /**
13423
+ * Generate images of adults, but not children.
13424
+ */
13425
+ PersonGeneration["ALLOW_ADULT"] = "ALLOW_ADULT";
13426
+ /**
13427
+ * Generate images that include adults and children.
13428
+ */
13429
+ PersonGeneration["ALLOW_ALL"] = "ALLOW_ALL";
13430
+ })(PersonGeneration || (PersonGeneration = {}));
13431
+ /** The harm category to be blocked. */
13416
13432
  var HarmCategory;
13417
13433
  (function(HarmCategory) {
13418
13434
  /**
13419
- * The harm category is unspecified.
13435
+ * Default value. This value is unused.
13420
13436
  */
13421
13437
  HarmCategory["HARM_CATEGORY_UNSPECIFIED"] = "HARM_CATEGORY_UNSPECIFIED";
13422
13438
  /**
13423
- * The harm category is harassment.
13439
+ * Abusive, threatening, or content intended to bully, torment, or ridicule.
13424
13440
  */
13425
13441
  HarmCategory["HARM_CATEGORY_HARASSMENT"] = "HARM_CATEGORY_HARASSMENT";
13426
13442
  /**
13427
- * The harm category is hate speech.
13443
+ * Content that promotes violence or incites hatred against individuals or groups based on certain attributes.
13428
13444
  */
13429
13445
  HarmCategory["HARM_CATEGORY_HATE_SPEECH"] = "HARM_CATEGORY_HATE_SPEECH";
13430
13446
  /**
13431
- * The harm category is sexually explicit content.
13447
+ * Content that contains sexually explicit material.
13432
13448
  */
13433
13449
  HarmCategory["HARM_CATEGORY_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_SEXUALLY_EXPLICIT";
13434
13450
  /**
13435
- * The harm category is dangerous content.
13451
+ * Content that promotes, facilitates, or enables dangerous activities.
13436
13452
  */
13437
13453
  HarmCategory["HARM_CATEGORY_DANGEROUS_CONTENT"] = "HARM_CATEGORY_DANGEROUS_CONTENT";
13438
13454
  /**
@@ -13440,27 +13456,27 @@ var HarmCategory;
13440
13456
  */
13441
13457
  HarmCategory["HARM_CATEGORY_CIVIC_INTEGRITY"] = "HARM_CATEGORY_CIVIC_INTEGRITY";
13442
13458
  /**
13443
- * The harm category is image hate. This enum value is not supported in Gemini API.
13459
+ * Images that contain hate speech. This enum value is not supported in Gemini API.
13444
13460
  */
13445
13461
  HarmCategory["HARM_CATEGORY_IMAGE_HATE"] = "HARM_CATEGORY_IMAGE_HATE";
13446
13462
  /**
13447
- * The harm category is image dangerous content. This enum value is not supported in Gemini API.
13463
+ * Images that contain dangerous content. This enum value is not supported in Gemini API.
13448
13464
  */
13449
13465
  HarmCategory["HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT"] = "HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT";
13450
13466
  /**
13451
- * The harm category is image harassment. This enum value is not supported in Gemini API.
13467
+ * Images that contain harassment. This enum value is not supported in Gemini API.
13452
13468
  */
13453
13469
  HarmCategory["HARM_CATEGORY_IMAGE_HARASSMENT"] = "HARM_CATEGORY_IMAGE_HARASSMENT";
13454
13470
  /**
13455
- * The harm category is image sexually explicit content. This enum value is not supported in Gemini API.
13471
+ * Images that contain sexually explicit content. This enum value is not supported in Gemini API.
13456
13472
  */
13457
13473
  HarmCategory["HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT";
13458
13474
  /**
13459
- * The harm category is for jailbreak prompts. This enum value is not supported in Gemini API.
13475
+ * Prompts designed to bypass safety filters. This enum value is not supported in Gemini API.
13460
13476
  */
13461
13477
  HarmCategory["HARM_CATEGORY_JAILBREAK"] = "HARM_CATEGORY_JAILBREAK";
13462
13478
  })(HarmCategory || (HarmCategory = {}));
13463
- /** Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. This enum is not supported in Gemini API. */
13479
+ /** The method for blocking content. If not specified, the default behavior is to use the probability score. This enum is not supported in Gemini API. */
13464
13480
  var HarmBlockMethod;
13465
13481
  (function(HarmBlockMethod) {
13466
13482
  /**
@@ -13476,31 +13492,31 @@ var HarmBlockMethod;
13476
13492
  */
13477
13493
  HarmBlockMethod["PROBABILITY"] = "PROBABILITY";
13478
13494
  })(HarmBlockMethod || (HarmBlockMethod = {}));
13479
- /** The harm block threshold. */
13495
+ /** The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked. */
13480
13496
  var HarmBlockThreshold;
13481
13497
  (function(HarmBlockThreshold) {
13482
13498
  /**
13483
- * Unspecified harm block threshold.
13499
+ * The harm block threshold is unspecified.
13484
13500
  */
13485
13501
  HarmBlockThreshold["HARM_BLOCK_THRESHOLD_UNSPECIFIED"] = "HARM_BLOCK_THRESHOLD_UNSPECIFIED";
13486
13502
  /**
13487
- * Block low threshold and above (i.e. block more).
13503
+ * Block content with a low harm probability or higher.
13488
13504
  */
13489
13505
  HarmBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
13490
13506
  /**
13491
- * Block medium threshold and above.
13507
+ * Block content with a medium harm probability or higher.
13492
13508
  */
13493
13509
  HarmBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
13494
13510
  /**
13495
- * Block only high threshold (i.e. block less).
13511
+ * Block content with a high harm probability.
13496
13512
  */
13497
13513
  HarmBlockThreshold["BLOCK_ONLY_HIGH"] = "BLOCK_ONLY_HIGH";
13498
13514
  /**
13499
- * Block none.
13515
+ * Do not block any content, regardless of its harm probability.
13500
13516
  */
13501
13517
  HarmBlockThreshold["BLOCK_NONE"] = "BLOCK_NONE";
13502
13518
  /**
13503
- * Turn off the safety filter.
13519
+ * Turn off the safety filter entirely.
13504
13520
  */
13505
13521
  HarmBlockThreshold["OFF"] = "OFF";
13506
13522
  })(HarmBlockThreshold || (HarmBlockThreshold = {}));
@@ -13578,55 +13594,55 @@ var FinishReason;
13578
13594
  */
13579
13595
  FinishReason["IMAGE_OTHER"] = "IMAGE_OTHER";
13580
13596
  })(FinishReason || (FinishReason = {}));
13581
- /** Output only. Harm probability levels in the content. */
13597
+ /** Output only. The probability of harm for this category. */
13582
13598
  var HarmProbability;
13583
13599
  (function(HarmProbability) {
13584
13600
  /**
13585
- * Harm probability unspecified.
13601
+ * The harm probability is unspecified.
13586
13602
  */
13587
13603
  HarmProbability["HARM_PROBABILITY_UNSPECIFIED"] = "HARM_PROBABILITY_UNSPECIFIED";
13588
13604
  /**
13589
- * Negligible level of harm.
13605
+ * The harm probability is negligible.
13590
13606
  */
13591
13607
  HarmProbability["NEGLIGIBLE"] = "NEGLIGIBLE";
13592
13608
  /**
13593
- * Low level of harm.
13609
+ * The harm probability is low.
13594
13610
  */
13595
13611
  HarmProbability["LOW"] = "LOW";
13596
13612
  /**
13597
- * Medium level of harm.
13613
+ * The harm probability is medium.
13598
13614
  */
13599
13615
  HarmProbability["MEDIUM"] = "MEDIUM";
13600
13616
  /**
13601
- * High level of harm.
13617
+ * The harm probability is high.
13602
13618
  */
13603
13619
  HarmProbability["HIGH"] = "HIGH";
13604
13620
  })(HarmProbability || (HarmProbability = {}));
13605
- /** Output only. Harm severity levels in the content. This enum is not supported in Gemini API. */
13621
+ /** Output only. The severity of harm for this category. This enum is not supported in Gemini API. */
13606
13622
  var HarmSeverity;
13607
13623
  (function(HarmSeverity) {
13608
13624
  /**
13609
- * Harm severity unspecified.
13625
+ * The harm severity is unspecified.
13610
13626
  */
13611
13627
  HarmSeverity["HARM_SEVERITY_UNSPECIFIED"] = "HARM_SEVERITY_UNSPECIFIED";
13612
13628
  /**
13613
- * Negligible level of harm severity.
13629
+ * The harm severity is negligible.
13614
13630
  */
13615
13631
  HarmSeverity["HARM_SEVERITY_NEGLIGIBLE"] = "HARM_SEVERITY_NEGLIGIBLE";
13616
13632
  /**
13617
- * Low level of harm severity.
13633
+ * The harm severity is low.
13618
13634
  */
13619
13635
  HarmSeverity["HARM_SEVERITY_LOW"] = "HARM_SEVERITY_LOW";
13620
13636
  /**
13621
- * Medium level of harm severity.
13637
+ * The harm severity is medium.
13622
13638
  */
13623
13639
  HarmSeverity["HARM_SEVERITY_MEDIUM"] = "HARM_SEVERITY_MEDIUM";
13624
13640
  /**
13625
- * High level of harm severity.
13641
+ * The harm severity is high.
13626
13642
  */
13627
13643
  HarmSeverity["HARM_SEVERITY_HIGH"] = "HARM_SEVERITY_HIGH";
13628
13644
  })(HarmSeverity || (HarmSeverity = {}));
13629
- /** Status of the url retrieval. */
13645
+ /** The status of the URL retrieval. */
13630
13646
  var UrlRetrievalStatus;
13631
13647
  (function(UrlRetrievalStatus) {
13632
13648
  /**
@@ -13634,11 +13650,11 @@ var UrlRetrievalStatus;
13634
13650
  */
13635
13651
  UrlRetrievalStatus["URL_RETRIEVAL_STATUS_UNSPECIFIED"] = "URL_RETRIEVAL_STATUS_UNSPECIFIED";
13636
13652
  /**
13637
- * Url retrieval is successful.
13653
+ * The URL was retrieved successfully.
13638
13654
  */
13639
13655
  UrlRetrievalStatus["URL_RETRIEVAL_STATUS_SUCCESS"] = "URL_RETRIEVAL_STATUS_SUCCESS";
13640
13656
  /**
13641
- * Url retrieval is failed due to error.
13657
+ * The URL retrieval failed.
13642
13658
  */
13643
13659
  UrlRetrievalStatus["URL_RETRIEVAL_STATUS_ERROR"] = "URL_RETRIEVAL_STATUS_ERROR";
13644
13660
  /**
@@ -13698,6 +13714,14 @@ var TrafficType;
13698
13714
  */
13699
13715
  TrafficType["ON_DEMAND"] = "ON_DEMAND";
13700
13716
  /**
13717
+ * Type for Priority Pay-As-You-Go traffic.
13718
+ */
13719
+ TrafficType["ON_DEMAND_PRIORITY"] = "ON_DEMAND_PRIORITY";
13720
+ /**
13721
+ * Type for Flex traffic.
13722
+ */
13723
+ TrafficType["ON_DEMAND_FLEX"] = "ON_DEMAND_FLEX";
13724
+ /**
13701
13725
  * Type for Provisioned Throughput traffic.
13702
13726
  */
13703
13727
  TrafficType["PROVISIONED_THROUGHPUT"] = "PROVISIONED_THROUGHPUT";
@@ -13842,6 +13866,102 @@ var JobState;
13842
13866
  */
13843
13867
  JobState["JOB_STATE_PARTIALLY_SUCCEEDED"] = "JOB_STATE_PARTIALLY_SUCCEEDED";
13844
13868
  })(JobState || (JobState = {}));
13869
+ /** Output only. The detail state of the tuning job (while the overall `JobState` is running). This enum is not supported in Gemini API. */
13870
+ var TuningJobState;
13871
+ (function(TuningJobState) {
13872
+ /**
13873
+ * Default tuning job state.
13874
+ */
13875
+ TuningJobState["TUNING_JOB_STATE_UNSPECIFIED"] = "TUNING_JOB_STATE_UNSPECIFIED";
13876
+ /**
13877
+ * Tuning job is waiting for job quota.
13878
+ */
13879
+ TuningJobState["TUNING_JOB_STATE_WAITING_FOR_QUOTA"] = "TUNING_JOB_STATE_WAITING_FOR_QUOTA";
13880
+ /**
13881
+ * Tuning job is validating the dataset.
13882
+ */
13883
+ TuningJobState["TUNING_JOB_STATE_PROCESSING_DATASET"] = "TUNING_JOB_STATE_PROCESSING_DATASET";
13884
+ /**
13885
+ * Tuning job is waiting for hardware capacity.
13886
+ */
13887
+ TuningJobState["TUNING_JOB_STATE_WAITING_FOR_CAPACITY"] = "TUNING_JOB_STATE_WAITING_FOR_CAPACITY";
13888
+ /**
13889
+ * Tuning job is running.
13890
+ */
13891
+ TuningJobState["TUNING_JOB_STATE_TUNING"] = "TUNING_JOB_STATE_TUNING";
13892
+ /**
13893
+ * Tuning job is doing some post processing steps.
13894
+ */
13895
+ TuningJobState["TUNING_JOB_STATE_POST_PROCESSING"] = "TUNING_JOB_STATE_POST_PROCESSING";
13896
+ })(TuningJobState || (TuningJobState = {}));
13897
+ /** Aggregation metric. This enum is not supported in Gemini API. */
13898
+ var AggregationMetric;
13899
+ (function(AggregationMetric) {
13900
+ /**
13901
+ * Unspecified aggregation metric.
13902
+ */
13903
+ AggregationMetric["AGGREGATION_METRIC_UNSPECIFIED"] = "AGGREGATION_METRIC_UNSPECIFIED";
13904
+ /**
13905
+ * Average aggregation metric. Not supported for Pairwise metric.
13906
+ */
13907
+ AggregationMetric["AVERAGE"] = "AVERAGE";
13908
+ /**
13909
+ * Mode aggregation metric.
13910
+ */
13911
+ AggregationMetric["MODE"] = "MODE";
13912
+ /**
13913
+ * Standard deviation aggregation metric. Not supported for pairwise metric.
13914
+ */
13915
+ AggregationMetric["STANDARD_DEVIATION"] = "STANDARD_DEVIATION";
13916
+ /**
13917
+ * Variance aggregation metric. Not supported for pairwise metric.
13918
+ */
13919
+ AggregationMetric["VARIANCE"] = "VARIANCE";
13920
+ /**
13921
+ * Minimum aggregation metric. Not supported for pairwise metric.
13922
+ */
13923
+ AggregationMetric["MINIMUM"] = "MINIMUM";
13924
+ /**
13925
+ * Maximum aggregation metric. Not supported for pairwise metric.
13926
+ */
13927
+ AggregationMetric["MAXIMUM"] = "MAXIMUM";
13928
+ /**
13929
+ * Median aggregation metric. Not supported for pairwise metric.
13930
+ */
13931
+ AggregationMetric["MEDIAN"] = "MEDIAN";
13932
+ /**
13933
+ * 90th percentile aggregation metric. Not supported for pairwise metric.
13934
+ */
13935
+ AggregationMetric["PERCENTILE_P90"] = "PERCENTILE_P90";
13936
+ /**
13937
+ * 95th percentile aggregation metric. Not supported for pairwise metric.
13938
+ */
13939
+ AggregationMetric["PERCENTILE_P95"] = "PERCENTILE_P95";
13940
+ /**
13941
+ * 99th percentile aggregation metric. Not supported for pairwise metric.
13942
+ */
13943
+ AggregationMetric["PERCENTILE_P99"] = "PERCENTILE_P99";
13944
+ })(AggregationMetric || (AggregationMetric = {}));
13945
+ /** Output only. Pairwise metric choice. This enum is not supported in Gemini API. */
13946
+ var PairwiseChoice;
13947
+ (function(PairwiseChoice) {
13948
+ /**
13949
+ * Unspecified prediction choice.
13950
+ */
13951
+ PairwiseChoice["PAIRWISE_CHOICE_UNSPECIFIED"] = "PAIRWISE_CHOICE_UNSPECIFIED";
13952
+ /**
13953
+ * Baseline prediction wins
13954
+ */
13955
+ PairwiseChoice["BASELINE"] = "BASELINE";
13956
+ /**
13957
+ * Candidate prediction wins
13958
+ */
13959
+ PairwiseChoice["CANDIDATE"] = "CANDIDATE";
13960
+ /**
13961
+ * Winner cannot be determined
13962
+ */
13963
+ PairwiseChoice["TIE"] = "TIE";
13964
+ })(PairwiseChoice || (PairwiseChoice = {}));
13845
13965
  /** The tuning task. Either I2V or T2V. This enum is not supported in Gemini API. */
13846
13966
  var TuningTask;
13847
13967
  (function(TuningTask) {
@@ -13954,22 +14074,6 @@ var SafetyFilterLevel;
13954
14074
  SafetyFilterLevel["BLOCK_ONLY_HIGH"] = "BLOCK_ONLY_HIGH";
13955
14075
  SafetyFilterLevel["BLOCK_NONE"] = "BLOCK_NONE";
13956
14076
  })(SafetyFilterLevel || (SafetyFilterLevel = {}));
13957
- /** Enum that controls the generation of people. */
13958
- var PersonGeneration;
13959
- (function(PersonGeneration) {
13960
- /**
13961
- * Block generation of images of people.
13962
- */
13963
- PersonGeneration["DONT_ALLOW"] = "DONT_ALLOW";
13964
- /**
13965
- * Generate images of adults, but not children.
13966
- */
13967
- PersonGeneration["ALLOW_ADULT"] = "ALLOW_ADULT";
13968
- /**
13969
- * Generate images that include adults and children.
13970
- */
13971
- PersonGeneration["ALLOW_ALL"] = "ALLOW_ALL";
13972
- })(PersonGeneration || (PersonGeneration = {}));
13973
14077
  /** Enum that specifies the language of the text in the prompt. */
13974
14078
  var ImagePromptLanguage;
13975
14079
  (function(ImagePromptLanguage) {
@@ -15165,6 +15269,18 @@ function tIsVertexEmbedContentModel(model) {
15165
15269
  * Copyright 2025 Google LLC
15166
15270
  * SPDX-License-Identifier: Apache-2.0
15167
15271
  */
15272
+ function authConfigToMldev$4(fromObject) {
15273
+ const toObject = {};
15274
+ const fromApiKey = getValueByPath(fromObject, ["apiKey"]);
15275
+ if (fromApiKey != null) setValueByPath(toObject, ["apiKey"], fromApiKey);
15276
+ if (getValueByPath(fromObject, ["apiKeyConfig"]) !== void 0) throw new Error("apiKeyConfig parameter is not supported in Gemini API.");
15277
+ if (getValueByPath(fromObject, ["authType"]) !== void 0) throw new Error("authType parameter is not supported in Gemini API.");
15278
+ if (getValueByPath(fromObject, ["googleServiceAccountConfig"]) !== void 0) throw new Error("googleServiceAccountConfig parameter is not supported in Gemini API.");
15279
+ if (getValueByPath(fromObject, ["httpBasicAuthConfig"]) !== void 0) throw new Error("httpBasicAuthConfig parameter is not supported in Gemini API.");
15280
+ if (getValueByPath(fromObject, ["oauthConfig"]) !== void 0) throw new Error("oauthConfig parameter is not supported in Gemini API.");
15281
+ if (getValueByPath(fromObject, ["oidcConfig"]) !== void 0) throw new Error("oidcConfig parameter is not supported in Gemini API.");
15282
+ return toObject;
15283
+ }
15168
15284
  function batchJobDestinationFromMldev(fromObject) {
15169
15285
  const toObject = {};
15170
15286
  const fromFileName = getValueByPath(fromObject, ["responsesFile"]);
@@ -15639,7 +15755,8 @@ function getBatchJobParametersToVertex(apiClient, fromObject) {
15639
15755
  }
15640
15756
  function googleMapsToMldev$4(fromObject) {
15641
15757
  const toObject = {};
15642
- if (getValueByPath(fromObject, ["authConfig"]) !== void 0) throw new Error("authConfig parameter is not supported in Gemini API.");
15758
+ const fromAuthConfig = getValueByPath(fromObject, ["authConfig"]);
15759
+ if (fromAuthConfig != null) setValueByPath(toObject, ["authConfig"], authConfigToMldev$4(fromAuthConfig));
15643
15760
  const fromEnableWidget = getValueByPath(fromObject, ["enableWidget"]);
15644
15761
  if (fromEnableWidget != null) setValueByPath(toObject, ["enableWidget"], fromEnableWidget);
15645
15762
  return toObject;
@@ -15648,8 +15765,8 @@ function googleSearchToMldev$4(fromObject) {
15648
15765
  const toObject = {};
15649
15766
  const fromSearchTypes = getValueByPath(fromObject, ["searchTypes"]);
15650
15767
  if (fromSearchTypes != null) setValueByPath(toObject, ["searchTypes"], fromSearchTypes);
15651
- if (getValueByPath(fromObject, ["excludeDomains"]) !== void 0) throw new Error("excludeDomains parameter is not supported in Gemini API.");
15652
15768
  if (getValueByPath(fromObject, ["blockingConfidence"]) !== void 0) throw new Error("blockingConfidence parameter is not supported in Gemini API.");
15769
+ if (getValueByPath(fromObject, ["excludeDomains"]) !== void 0) throw new Error("excludeDomains parameter is not supported in Gemini API.");
15653
15770
  const fromTimeRangeFilter = getValueByPath(fromObject, ["timeRangeFilter"]);
15654
15771
  if (fromTimeRangeFilter != null) setValueByPath(toObject, ["timeRangeFilter"], fromTimeRangeFilter);
15655
15772
  return toObject;
@@ -15664,6 +15781,7 @@ function imageConfigToMldev$1(fromObject) {
15664
15781
  if (getValueByPath(fromObject, ["prominentPeople"]) !== void 0) throw new Error("prominentPeople parameter is not supported in Gemini API.");
15665
15782
  if (getValueByPath(fromObject, ["outputMimeType"]) !== void 0) throw new Error("outputMimeType parameter is not supported in Gemini API.");
15666
15783
  if (getValueByPath(fromObject, ["outputCompressionQuality"]) !== void 0) throw new Error("outputCompressionQuality parameter is not supported in Gemini API.");
15784
+ if (getValueByPath(fromObject, ["imageOutputOptions"]) !== void 0) throw new Error("imageOutputOptions parameter is not supported in Gemini API.");
15667
15785
  return toObject;
15668
15786
  }
15669
15787
  function inlinedRequestToMldev(apiClient, fromObject) {
@@ -15809,6 +15927,8 @@ function toolToMldev$4(fromObject) {
15809
15927
  if (fromFileSearch != null) setValueByPath(toObject, ["fileSearch"], fromFileSearch);
15810
15928
  const fromGoogleSearch = getValueByPath(fromObject, ["googleSearch"]);
15811
15929
  if (fromGoogleSearch != null) setValueByPath(toObject, ["googleSearch"], googleSearchToMldev$4(fromGoogleSearch));
15930
+ const fromGoogleMaps = getValueByPath(fromObject, ["googleMaps"]);
15931
+ if (fromGoogleMaps != null) setValueByPath(toObject, ["googleMaps"], googleMapsToMldev$4(fromGoogleMaps));
15812
15932
  const fromCodeExecution = getValueByPath(fromObject, ["codeExecution"]);
15813
15933
  if (fromCodeExecution != null) setValueByPath(toObject, ["codeExecution"], fromCodeExecution);
15814
15934
  if (getValueByPath(fromObject, ["enterpriseWebSearch"]) !== void 0) throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");
@@ -15820,10 +15940,9 @@ function toolToMldev$4(fromObject) {
15820
15940
  });
15821
15941
  setValueByPath(toObject, ["functionDeclarations"], transformedList);
15822
15942
  }
15823
- const fromGoogleMaps = getValueByPath(fromObject, ["googleMaps"]);
15824
- if (fromGoogleMaps != null) setValueByPath(toObject, ["googleMaps"], googleMapsToMldev$4(fromGoogleMaps));
15825
15943
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, ["googleSearchRetrieval"]);
15826
15944
  if (fromGoogleSearchRetrieval != null) setValueByPath(toObject, ["googleSearchRetrieval"], fromGoogleSearchRetrieval);
15945
+ if (getValueByPath(fromObject, ["parallelAiSearch"]) !== void 0) throw new Error("parallelAiSearch parameter is not supported in Gemini API.");
15827
15946
  const fromUrlContext = getValueByPath(fromObject, ["urlContext"]);
15828
15947
  if (fromUrlContext != null) setValueByPath(toObject, ["urlContext"], fromUrlContext);
15829
15948
  const fromMcpServers = getValueByPath(fromObject, ["mcpServers"]);
@@ -16442,6 +16561,18 @@ var Batches = class extends BaseModule {
16442
16561
  * Copyright 2025 Google LLC
16443
16562
  * SPDX-License-Identifier: Apache-2.0
16444
16563
  */
16564
+ function authConfigToMldev$3(fromObject) {
16565
+ const toObject = {};
16566
+ const fromApiKey = getValueByPath(fromObject, ["apiKey"]);
16567
+ if (fromApiKey != null) setValueByPath(toObject, ["apiKey"], fromApiKey);
16568
+ if (getValueByPath(fromObject, ["apiKeyConfig"]) !== void 0) throw new Error("apiKeyConfig parameter is not supported in Gemini API.");
16569
+ if (getValueByPath(fromObject, ["authType"]) !== void 0) throw new Error("authType parameter is not supported in Gemini API.");
16570
+ if (getValueByPath(fromObject, ["googleServiceAccountConfig"]) !== void 0) throw new Error("googleServiceAccountConfig parameter is not supported in Gemini API.");
16571
+ if (getValueByPath(fromObject, ["httpBasicAuthConfig"]) !== void 0) throw new Error("httpBasicAuthConfig parameter is not supported in Gemini API.");
16572
+ if (getValueByPath(fromObject, ["oauthConfig"]) !== void 0) throw new Error("oauthConfig parameter is not supported in Gemini API.");
16573
+ if (getValueByPath(fromObject, ["oidcConfig"]) !== void 0) throw new Error("oidcConfig parameter is not supported in Gemini API.");
16574
+ return toObject;
16575
+ }
16445
16576
  function blobToMldev$3(fromObject) {
16446
16577
  const toObject = {};
16447
16578
  const fromData = getValueByPath(fromObject, ["data"]);
@@ -16629,7 +16760,8 @@ function getCachedContentParametersToVertex(apiClient, fromObject) {
16629
16760
  }
16630
16761
  function googleMapsToMldev$3(fromObject) {
16631
16762
  const toObject = {};
16632
- if (getValueByPath(fromObject, ["authConfig"]) !== void 0) throw new Error("authConfig parameter is not supported in Gemini API.");
16763
+ const fromAuthConfig = getValueByPath(fromObject, ["authConfig"]);
16764
+ if (fromAuthConfig != null) setValueByPath(toObject, ["authConfig"], authConfigToMldev$3(fromAuthConfig));
16633
16765
  const fromEnableWidget = getValueByPath(fromObject, ["enableWidget"]);
16634
16766
  if (fromEnableWidget != null) setValueByPath(toObject, ["enableWidget"], fromEnableWidget);
16635
16767
  return toObject;
@@ -16638,8 +16770,8 @@ function googleSearchToMldev$3(fromObject) {
16638
16770
  const toObject = {};
16639
16771
  const fromSearchTypes = getValueByPath(fromObject, ["searchTypes"]);
16640
16772
  if (fromSearchTypes != null) setValueByPath(toObject, ["searchTypes"], fromSearchTypes);
16641
- if (getValueByPath(fromObject, ["excludeDomains"]) !== void 0) throw new Error("excludeDomains parameter is not supported in Gemini API.");
16642
16773
  if (getValueByPath(fromObject, ["blockingConfidence"]) !== void 0) throw new Error("blockingConfidence parameter is not supported in Gemini API.");
16774
+ if (getValueByPath(fromObject, ["excludeDomains"]) !== void 0) throw new Error("excludeDomains parameter is not supported in Gemini API.");
16643
16775
  const fromTimeRangeFilter = getValueByPath(fromObject, ["timeRangeFilter"]);
16644
16776
  if (fromTimeRangeFilter != null) setValueByPath(toObject, ["timeRangeFilter"], fromTimeRangeFilter);
16645
16777
  return toObject;
@@ -16747,6 +16879,8 @@ function toolToMldev$3(fromObject) {
16747
16879
  if (fromFileSearch != null) setValueByPath(toObject, ["fileSearch"], fromFileSearch);
16748
16880
  const fromGoogleSearch = getValueByPath(fromObject, ["googleSearch"]);
16749
16881
  if (fromGoogleSearch != null) setValueByPath(toObject, ["googleSearch"], googleSearchToMldev$3(fromGoogleSearch));
16882
+ const fromGoogleMaps = getValueByPath(fromObject, ["googleMaps"]);
16883
+ if (fromGoogleMaps != null) setValueByPath(toObject, ["googleMaps"], googleMapsToMldev$3(fromGoogleMaps));
16750
16884
  const fromCodeExecution = getValueByPath(fromObject, ["codeExecution"]);
16751
16885
  if (fromCodeExecution != null) setValueByPath(toObject, ["codeExecution"], fromCodeExecution);
16752
16886
  if (getValueByPath(fromObject, ["enterpriseWebSearch"]) !== void 0) throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");
@@ -16758,10 +16892,9 @@ function toolToMldev$3(fromObject) {
16758
16892
  });
16759
16893
  setValueByPath(toObject, ["functionDeclarations"], transformedList);
16760
16894
  }
16761
- const fromGoogleMaps = getValueByPath(fromObject, ["googleMaps"]);
16762
- if (fromGoogleMaps != null) setValueByPath(toObject, ["googleMaps"], googleMapsToMldev$3(fromGoogleMaps));
16763
16895
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, ["googleSearchRetrieval"]);
16764
16896
  if (fromGoogleSearchRetrieval != null) setValueByPath(toObject, ["googleSearchRetrieval"], fromGoogleSearchRetrieval);
16897
+ if (getValueByPath(fromObject, ["parallelAiSearch"]) !== void 0) throw new Error("parallelAiSearch parameter is not supported in Gemini API.");
16765
16898
  const fromUrlContext = getValueByPath(fromObject, ["urlContext"]);
16766
16899
  if (fromUrlContext != null) setValueByPath(toObject, ["urlContext"], fromUrlContext);
16767
16900
  const fromMcpServers = getValueByPath(fromObject, ["mcpServers"]);
@@ -16783,6 +16916,8 @@ function toolToVertex$2(fromObject) {
16783
16916
  if (getValueByPath(fromObject, ["fileSearch"]) !== void 0) throw new Error("fileSearch parameter is not supported in Vertex AI.");
16784
16917
  const fromGoogleSearch = getValueByPath(fromObject, ["googleSearch"]);
16785
16918
  if (fromGoogleSearch != null) setValueByPath(toObject, ["googleSearch"], fromGoogleSearch);
16919
+ const fromGoogleMaps = getValueByPath(fromObject, ["googleMaps"]);
16920
+ if (fromGoogleMaps != null) setValueByPath(toObject, ["googleMaps"], fromGoogleMaps);
16786
16921
  const fromCodeExecution = getValueByPath(fromObject, ["codeExecution"]);
16787
16922
  if (fromCodeExecution != null) setValueByPath(toObject, ["codeExecution"], fromCodeExecution);
16788
16923
  const fromEnterpriseWebSearch = getValueByPath(fromObject, ["enterpriseWebSearch"]);
@@ -16795,10 +16930,10 @@ function toolToVertex$2(fromObject) {
16795
16930
  });
16796
16931
  setValueByPath(toObject, ["functionDeclarations"], transformedList);
16797
16932
  }
16798
- const fromGoogleMaps = getValueByPath(fromObject, ["googleMaps"]);
16799
- if (fromGoogleMaps != null) setValueByPath(toObject, ["googleMaps"], fromGoogleMaps);
16800
16933
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, ["googleSearchRetrieval"]);
16801
16934
  if (fromGoogleSearchRetrieval != null) setValueByPath(toObject, ["googleSearchRetrieval"], fromGoogleSearchRetrieval);
16935
+ const fromParallelAiSearch = getValueByPath(fromObject, ["parallelAiSearch"]);
16936
+ if (fromParallelAiSearch != null) setValueByPath(toObject, ["parallelAiSearch"], fromParallelAiSearch);
16802
16937
  const fromUrlContext = getValueByPath(fromObject, ["urlContext"]);
16803
16938
  if (fromUrlContext != null) setValueByPath(toObject, ["urlContext"], fromUrlContext);
16804
16939
  if (getValueByPath(fromObject, ["mcpServers"]) !== void 0) throw new Error("mcpServers parameter is not supported in Vertex AI.");
@@ -17936,6 +18071,18 @@ var Files = class extends BaseModule {
17936
18071
  * Copyright 2025 Google LLC
17937
18072
  * SPDX-License-Identifier: Apache-2.0
17938
18073
  */
18074
+ function authConfigToMldev$2(fromObject) {
18075
+ const toObject = {};
18076
+ const fromApiKey = getValueByPath(fromObject, ["apiKey"]);
18077
+ if (fromApiKey != null) setValueByPath(toObject, ["apiKey"], fromApiKey);
18078
+ if (getValueByPath(fromObject, ["apiKeyConfig"]) !== void 0) throw new Error("apiKeyConfig parameter is not supported in Gemini API.");
18079
+ if (getValueByPath(fromObject, ["authType"]) !== void 0) throw new Error("authType parameter is not supported in Gemini API.");
18080
+ if (getValueByPath(fromObject, ["googleServiceAccountConfig"]) !== void 0) throw new Error("googleServiceAccountConfig parameter is not supported in Gemini API.");
18081
+ if (getValueByPath(fromObject, ["httpBasicAuthConfig"]) !== void 0) throw new Error("httpBasicAuthConfig parameter is not supported in Gemini API.");
18082
+ if (getValueByPath(fromObject, ["oauthConfig"]) !== void 0) throw new Error("oauthConfig parameter is not supported in Gemini API.");
18083
+ if (getValueByPath(fromObject, ["oidcConfig"]) !== void 0) throw new Error("oidcConfig parameter is not supported in Gemini API.");
18084
+ return toObject;
18085
+ }
17939
18086
  function blobToMldev$2(fromObject) {
17940
18087
  const toObject = {};
17941
18088
  const fromData = getValueByPath(fromObject, ["data"]);
@@ -18048,7 +18195,8 @@ function generationConfigToVertex$1(fromObject) {
18048
18195
  }
18049
18196
  function googleMapsToMldev$2(fromObject) {
18050
18197
  const toObject = {};
18051
- if (getValueByPath(fromObject, ["authConfig"]) !== void 0) throw new Error("authConfig parameter is not supported in Gemini API.");
18198
+ const fromAuthConfig = getValueByPath(fromObject, ["authConfig"]);
18199
+ if (fromAuthConfig != null) setValueByPath(toObject, ["authConfig"], authConfigToMldev$2(fromAuthConfig));
18052
18200
  const fromEnableWidget = getValueByPath(fromObject, ["enableWidget"]);
18053
18201
  if (fromEnableWidget != null) setValueByPath(toObject, ["enableWidget"], fromEnableWidget);
18054
18202
  return toObject;
@@ -18057,8 +18205,8 @@ function googleSearchToMldev$2(fromObject) {
18057
18205
  const toObject = {};
18058
18206
  const fromSearchTypes = getValueByPath(fromObject, ["searchTypes"]);
18059
18207
  if (fromSearchTypes != null) setValueByPath(toObject, ["searchTypes"], fromSearchTypes);
18060
- if (getValueByPath(fromObject, ["excludeDomains"]) !== void 0) throw new Error("excludeDomains parameter is not supported in Gemini API.");
18061
18208
  if (getValueByPath(fromObject, ["blockingConfidence"]) !== void 0) throw new Error("blockingConfidence parameter is not supported in Gemini API.");
18209
+ if (getValueByPath(fromObject, ["excludeDomains"]) !== void 0) throw new Error("excludeDomains parameter is not supported in Gemini API.");
18062
18210
  const fromTimeRangeFilter = getValueByPath(fromObject, ["timeRangeFilter"]);
18063
18211
  if (fromTimeRangeFilter != null) setValueByPath(toObject, ["timeRangeFilter"], fromTimeRangeFilter);
18064
18212
  return toObject;
@@ -18388,6 +18536,8 @@ function toolToMldev$2(fromObject) {
18388
18536
  if (fromFileSearch != null) setValueByPath(toObject, ["fileSearch"], fromFileSearch);
18389
18537
  const fromGoogleSearch = getValueByPath(fromObject, ["googleSearch"]);
18390
18538
  if (fromGoogleSearch != null) setValueByPath(toObject, ["googleSearch"], googleSearchToMldev$2(fromGoogleSearch));
18539
+ const fromGoogleMaps = getValueByPath(fromObject, ["googleMaps"]);
18540
+ if (fromGoogleMaps != null) setValueByPath(toObject, ["googleMaps"], googleMapsToMldev$2(fromGoogleMaps));
18391
18541
  const fromCodeExecution = getValueByPath(fromObject, ["codeExecution"]);
18392
18542
  if (fromCodeExecution != null) setValueByPath(toObject, ["codeExecution"], fromCodeExecution);
18393
18543
  if (getValueByPath(fromObject, ["enterpriseWebSearch"]) !== void 0) throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");
@@ -18399,10 +18549,9 @@ function toolToMldev$2(fromObject) {
18399
18549
  });
18400
18550
  setValueByPath(toObject, ["functionDeclarations"], transformedList);
18401
18551
  }
18402
- const fromGoogleMaps = getValueByPath(fromObject, ["googleMaps"]);
18403
- if (fromGoogleMaps != null) setValueByPath(toObject, ["googleMaps"], googleMapsToMldev$2(fromGoogleMaps));
18404
18552
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, ["googleSearchRetrieval"]);
18405
18553
  if (fromGoogleSearchRetrieval != null) setValueByPath(toObject, ["googleSearchRetrieval"], fromGoogleSearchRetrieval);
18554
+ if (getValueByPath(fromObject, ["parallelAiSearch"]) !== void 0) throw new Error("parallelAiSearch parameter is not supported in Gemini API.");
18406
18555
  const fromUrlContext = getValueByPath(fromObject, ["urlContext"]);
18407
18556
  if (fromUrlContext != null) setValueByPath(toObject, ["urlContext"], fromUrlContext);
18408
18557
  const fromMcpServers = getValueByPath(fromObject, ["mcpServers"]);
@@ -18424,6 +18573,8 @@ function toolToVertex$1(fromObject) {
18424
18573
  if (getValueByPath(fromObject, ["fileSearch"]) !== void 0) throw new Error("fileSearch parameter is not supported in Vertex AI.");
18425
18574
  const fromGoogleSearch = getValueByPath(fromObject, ["googleSearch"]);
18426
18575
  if (fromGoogleSearch != null) setValueByPath(toObject, ["googleSearch"], fromGoogleSearch);
18576
+ const fromGoogleMaps = getValueByPath(fromObject, ["googleMaps"]);
18577
+ if (fromGoogleMaps != null) setValueByPath(toObject, ["googleMaps"], fromGoogleMaps);
18427
18578
  const fromCodeExecution = getValueByPath(fromObject, ["codeExecution"]);
18428
18579
  if (fromCodeExecution != null) setValueByPath(toObject, ["codeExecution"], fromCodeExecution);
18429
18580
  const fromEnterpriseWebSearch = getValueByPath(fromObject, ["enterpriseWebSearch"]);
@@ -18436,10 +18587,10 @@ function toolToVertex$1(fromObject) {
18436
18587
  });
18437
18588
  setValueByPath(toObject, ["functionDeclarations"], transformedList);
18438
18589
  }
18439
- const fromGoogleMaps = getValueByPath(fromObject, ["googleMaps"]);
18440
- if (fromGoogleMaps != null) setValueByPath(toObject, ["googleMaps"], fromGoogleMaps);
18441
18590
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, ["googleSearchRetrieval"]);
18442
18591
  if (fromGoogleSearchRetrieval != null) setValueByPath(toObject, ["googleSearchRetrieval"], fromGoogleSearchRetrieval);
18592
+ const fromParallelAiSearch = getValueByPath(fromObject, ["parallelAiSearch"]);
18593
+ if (fromParallelAiSearch != null) setValueByPath(toObject, ["parallelAiSearch"], fromParallelAiSearch);
18443
18594
  const fromUrlContext = getValueByPath(fromObject, ["urlContext"]);
18444
18595
  if (fromUrlContext != null) setValueByPath(toObject, ["urlContext"], fromUrlContext);
18445
18596
  if (getValueByPath(fromObject, ["mcpServers"]) !== void 0) throw new Error("mcpServers parameter is not supported in Vertex AI.");
@@ -18506,6 +18657,18 @@ function voiceActivityFromVertex(fromObject) {
18506
18657
  * Copyright 2025 Google LLC
18507
18658
  * SPDX-License-Identifier: Apache-2.0
18508
18659
  */
18660
+ function authConfigToMldev$1(fromObject, _rootObject) {
18661
+ const toObject = {};
18662
+ const fromApiKey = getValueByPath(fromObject, ["apiKey"]);
18663
+ if (fromApiKey != null) setValueByPath(toObject, ["apiKey"], fromApiKey);
18664
+ if (getValueByPath(fromObject, ["apiKeyConfig"]) !== void 0) throw new Error("apiKeyConfig parameter is not supported in Gemini API.");
18665
+ if (getValueByPath(fromObject, ["authType"]) !== void 0) throw new Error("authType parameter is not supported in Gemini API.");
18666
+ if (getValueByPath(fromObject, ["googleServiceAccountConfig"]) !== void 0) throw new Error("googleServiceAccountConfig parameter is not supported in Gemini API.");
18667
+ if (getValueByPath(fromObject, ["httpBasicAuthConfig"]) !== void 0) throw new Error("httpBasicAuthConfig parameter is not supported in Gemini API.");
18668
+ if (getValueByPath(fromObject, ["oauthConfig"]) !== void 0) throw new Error("oauthConfig parameter is not supported in Gemini API.");
18669
+ if (getValueByPath(fromObject, ["oidcConfig"]) !== void 0) throw new Error("oidcConfig parameter is not supported in Gemini API.");
18670
+ return toObject;
18671
+ }
18509
18672
  function blobToMldev$1(fromObject, _rootObject) {
18510
18673
  const toObject = {};
18511
18674
  const fromData = getValueByPath(fromObject, ["data"]);
@@ -19665,9 +19828,10 @@ function getModelParametersToVertex(apiClient, fromObject, _rootObject) {
19665
19828
  if (fromModel != null) setValueByPath(toObject, ["_url", "name"], tModel(apiClient, fromModel));
19666
19829
  return toObject;
19667
19830
  }
19668
- function googleMapsToMldev$1(fromObject, _rootObject) {
19831
+ function googleMapsToMldev$1(fromObject, rootObject) {
19669
19832
  const toObject = {};
19670
- if (getValueByPath(fromObject, ["authConfig"]) !== void 0) throw new Error("authConfig parameter is not supported in Gemini API.");
19833
+ const fromAuthConfig = getValueByPath(fromObject, ["authConfig"]);
19834
+ if (fromAuthConfig != null) setValueByPath(toObject, ["authConfig"], authConfigToMldev$1(fromAuthConfig));
19671
19835
  const fromEnableWidget = getValueByPath(fromObject, ["enableWidget"]);
19672
19836
  if (fromEnableWidget != null) setValueByPath(toObject, ["enableWidget"], fromEnableWidget);
19673
19837
  return toObject;
@@ -19676,8 +19840,8 @@ function googleSearchToMldev$1(fromObject, _rootObject) {
19676
19840
  const toObject = {};
19677
19841
  const fromSearchTypes = getValueByPath(fromObject, ["searchTypes"]);
19678
19842
  if (fromSearchTypes != null) setValueByPath(toObject, ["searchTypes"], fromSearchTypes);
19679
- if (getValueByPath(fromObject, ["excludeDomains"]) !== void 0) throw new Error("excludeDomains parameter is not supported in Gemini API.");
19680
19843
  if (getValueByPath(fromObject, ["blockingConfidence"]) !== void 0) throw new Error("blockingConfidence parameter is not supported in Gemini API.");
19844
+ if (getValueByPath(fromObject, ["excludeDomains"]) !== void 0) throw new Error("excludeDomains parameter is not supported in Gemini API.");
19681
19845
  const fromTimeRangeFilter = getValueByPath(fromObject, ["timeRangeFilter"]);
19682
19846
  if (fromTimeRangeFilter != null) setValueByPath(toObject, ["timeRangeFilter"], fromTimeRangeFilter);
19683
19847
  return toObject;
@@ -19692,6 +19856,7 @@ function imageConfigToMldev(fromObject, _rootObject) {
19692
19856
  if (getValueByPath(fromObject, ["prominentPeople"]) !== void 0) throw new Error("prominentPeople parameter is not supported in Gemini API.");
19693
19857
  if (getValueByPath(fromObject, ["outputMimeType"]) !== void 0) throw new Error("outputMimeType parameter is not supported in Gemini API.");
19694
19858
  if (getValueByPath(fromObject, ["outputCompressionQuality"]) !== void 0) throw new Error("outputCompressionQuality parameter is not supported in Gemini API.");
19859
+ if (getValueByPath(fromObject, ["imageOutputOptions"]) !== void 0) throw new Error("imageOutputOptions parameter is not supported in Gemini API.");
19695
19860
  return toObject;
19696
19861
  }
19697
19862
  function imageConfigToVertex(fromObject, _rootObject) {
@@ -19708,6 +19873,8 @@ function imageConfigToVertex(fromObject, _rootObject) {
19708
19873
  if (fromOutputMimeType != null) setValueByPath(toObject, ["imageOutputOptions", "mimeType"], fromOutputMimeType);
19709
19874
  const fromOutputCompressionQuality = getValueByPath(fromObject, ["outputCompressionQuality"]);
19710
19875
  if (fromOutputCompressionQuality != null) setValueByPath(toObject, ["imageOutputOptions", "compressionQuality"], fromOutputCompressionQuality);
19876
+ const fromImageOutputOptions = getValueByPath(fromObject, ["imageOutputOptions"]);
19877
+ if (fromImageOutputOptions != null) setValueByPath(toObject, ["imageOutputOptions"], fromImageOutputOptions);
19711
19878
  return toObject;
19712
19879
  }
19713
19880
  function imageFromMldev(fromObject, _rootObject) {
@@ -20115,6 +20282,8 @@ function toolToMldev$1(fromObject, rootObject) {
20115
20282
  if (fromFileSearch != null) setValueByPath(toObject, ["fileSearch"], fromFileSearch);
20116
20283
  const fromGoogleSearch = getValueByPath(fromObject, ["googleSearch"]);
20117
20284
  if (fromGoogleSearch != null) setValueByPath(toObject, ["googleSearch"], googleSearchToMldev$1(fromGoogleSearch));
20285
+ const fromGoogleMaps = getValueByPath(fromObject, ["googleMaps"]);
20286
+ if (fromGoogleMaps != null) setValueByPath(toObject, ["googleMaps"], googleMapsToMldev$1(fromGoogleMaps));
20118
20287
  const fromCodeExecution = getValueByPath(fromObject, ["codeExecution"]);
20119
20288
  if (fromCodeExecution != null) setValueByPath(toObject, ["codeExecution"], fromCodeExecution);
20120
20289
  if (getValueByPath(fromObject, ["enterpriseWebSearch"]) !== void 0) throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");
@@ -20126,10 +20295,9 @@ function toolToMldev$1(fromObject, rootObject) {
20126
20295
  });
20127
20296
  setValueByPath(toObject, ["functionDeclarations"], transformedList);
20128
20297
  }
20129
- const fromGoogleMaps = getValueByPath(fromObject, ["googleMaps"]);
20130
- if (fromGoogleMaps != null) setValueByPath(toObject, ["googleMaps"], googleMapsToMldev$1(fromGoogleMaps));
20131
20298
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, ["googleSearchRetrieval"]);
20132
20299
  if (fromGoogleSearchRetrieval != null) setValueByPath(toObject, ["googleSearchRetrieval"], fromGoogleSearchRetrieval);
20300
+ if (getValueByPath(fromObject, ["parallelAiSearch"]) !== void 0) throw new Error("parallelAiSearch parameter is not supported in Gemini API.");
20133
20301
  const fromUrlContext = getValueByPath(fromObject, ["urlContext"]);
20134
20302
  if (fromUrlContext != null) setValueByPath(toObject, ["urlContext"], fromUrlContext);
20135
20303
  const fromMcpServers = getValueByPath(fromObject, ["mcpServers"]);
@@ -20151,6 +20319,8 @@ function toolToVertex(fromObject, rootObject) {
20151
20319
  if (getValueByPath(fromObject, ["fileSearch"]) !== void 0) throw new Error("fileSearch parameter is not supported in Vertex AI.");
20152
20320
  const fromGoogleSearch = getValueByPath(fromObject, ["googleSearch"]);
20153
20321
  if (fromGoogleSearch != null) setValueByPath(toObject, ["googleSearch"], fromGoogleSearch);
20322
+ const fromGoogleMaps = getValueByPath(fromObject, ["googleMaps"]);
20323
+ if (fromGoogleMaps != null) setValueByPath(toObject, ["googleMaps"], fromGoogleMaps);
20154
20324
  const fromCodeExecution = getValueByPath(fromObject, ["codeExecution"]);
20155
20325
  if (fromCodeExecution != null) setValueByPath(toObject, ["codeExecution"], fromCodeExecution);
20156
20326
  const fromEnterpriseWebSearch = getValueByPath(fromObject, ["enterpriseWebSearch"]);
@@ -20163,10 +20333,10 @@ function toolToVertex(fromObject, rootObject) {
20163
20333
  });
20164
20334
  setValueByPath(toObject, ["functionDeclarations"], transformedList);
20165
20335
  }
20166
- const fromGoogleMaps = getValueByPath(fromObject, ["googleMaps"]);
20167
- if (fromGoogleMaps != null) setValueByPath(toObject, ["googleMaps"], fromGoogleMaps);
20168
20336
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, ["googleSearchRetrieval"]);
20169
20337
  if (fromGoogleSearchRetrieval != null) setValueByPath(toObject, ["googleSearchRetrieval"], fromGoogleSearchRetrieval);
20338
+ const fromParallelAiSearch = getValueByPath(fromObject, ["parallelAiSearch"]);
20339
+ if (fromParallelAiSearch != null) setValueByPath(toObject, ["parallelAiSearch"], fromParallelAiSearch);
20170
20340
  const fromUrlContext = getValueByPath(fromObject, ["urlContext"]);
20171
20341
  if (fromUrlContext != null) setValueByPath(toObject, ["urlContext"], fromUrlContext);
20172
20342
  if (getValueByPath(fromObject, ["mcpServers"]) !== void 0) throw new Error("mcpServers parameter is not supported in Vertex AI.");
@@ -20520,7 +20690,7 @@ var CONTENT_TYPE_HEADER = "Content-Type";
20520
20690
  var SERVER_TIMEOUT_HEADER = "X-Server-Timeout";
20521
20691
  var USER_AGENT_HEADER = "User-Agent";
20522
20692
  var GOOGLE_API_CLIENT_HEADER = "x-goog-api-client";
20523
- var LIBRARY_LABEL = `google-genai-sdk/1.43.0`;
20693
+ var LIBRARY_LABEL = `google-genai-sdk/1.44.0`;
20524
20694
  var VERTEX_AI_API_DEFAULT_VERSION = "v1beta1";
20525
20695
  var GOOGLE_AI_API_DEFAULT_VERSION = "v1beta";
20526
20696
  var DEFAULT_RETRY_ATTEMPTS = 5;
@@ -20535,6 +20705,9 @@ var DEFAULT_RETRY_HTTP_STATUS_CODES = [
20535
20705
  /**
20536
20706
  * The ApiClient class is used to send requests to the Gemini API or Vertex AI
20537
20707
  * endpoints.
20708
+ *
20709
+ * WARNING: This is an internal API and may change without notice. Direct usage
20710
+ * is not supported and may break your application.
20538
20711
  */
20539
20712
  var ApiClient = class {
20540
20713
  constructor(opts) {
@@ -20561,10 +20734,7 @@ var ApiClient = class {
20561
20734
  else if (this.clientOptions.project && this.clientOptions.location) initHttpOptions.baseUrl = `https://${this.clientOptions.location}-aiplatform.googleapis.com/`;
20562
20735
  initHttpOptions.apiVersion = (_b = this.clientOptions.apiVersion) !== null && _b !== void 0 ? _b : VERTEX_AI_API_DEFAULT_VERSION;
20563
20736
  } else {
20564
- if (!this.clientOptions.apiKey) throw new ApiError({
20565
- message: "API key must be set when using the Gemini API.",
20566
- status: 403
20567
- });
20737
+ if (!this.clientOptions.apiKey) console.warn("API key should be set when using the Gemini API.");
20568
20738
  initHttpOptions.apiVersion = (_c = this.clientOptions.apiVersion) !== null && _c !== void 0 ? _c : GOOGLE_AI_API_DEFAULT_VERSION;
20569
20739
  initHttpOptions.baseUrl = `https://generativelanguage.googleapis.com/`;
20570
20740
  }
@@ -23211,6 +23381,18 @@ var Operations = class extends BaseModule {
23211
23381
  * Copyright 2025 Google LLC
23212
23382
  * SPDX-License-Identifier: Apache-2.0
23213
23383
  */
23384
+ function authConfigToMldev(fromObject) {
23385
+ const toObject = {};
23386
+ const fromApiKey = getValueByPath(fromObject, ["apiKey"]);
23387
+ if (fromApiKey != null) setValueByPath(toObject, ["apiKey"], fromApiKey);
23388
+ if (getValueByPath(fromObject, ["apiKeyConfig"]) !== void 0) throw new Error("apiKeyConfig parameter is not supported in Gemini API.");
23389
+ if (getValueByPath(fromObject, ["authType"]) !== void 0) throw new Error("authType parameter is not supported in Gemini API.");
23390
+ if (getValueByPath(fromObject, ["googleServiceAccountConfig"]) !== void 0) throw new Error("googleServiceAccountConfig parameter is not supported in Gemini API.");
23391
+ if (getValueByPath(fromObject, ["httpBasicAuthConfig"]) !== void 0) throw new Error("httpBasicAuthConfig parameter is not supported in Gemini API.");
23392
+ if (getValueByPath(fromObject, ["oauthConfig"]) !== void 0) throw new Error("oauthConfig parameter is not supported in Gemini API.");
23393
+ if (getValueByPath(fromObject, ["oidcConfig"]) !== void 0) throw new Error("oidcConfig parameter is not supported in Gemini API.");
23394
+ return toObject;
23395
+ }
23214
23396
  function blobToMldev(fromObject) {
23215
23397
  const toObject = {};
23216
23398
  const fromData = getValueByPath(fromObject, ["data"]);
@@ -23277,7 +23459,8 @@ function functionCallToMldev(fromObject) {
23277
23459
  }
23278
23460
  function googleMapsToMldev(fromObject) {
23279
23461
  const toObject = {};
23280
- if (getValueByPath(fromObject, ["authConfig"]) !== void 0) throw new Error("authConfig parameter is not supported in Gemini API.");
23462
+ const fromAuthConfig = getValueByPath(fromObject, ["authConfig"]);
23463
+ if (fromAuthConfig != null) setValueByPath(toObject, ["authConfig"], authConfigToMldev(fromAuthConfig));
23281
23464
  const fromEnableWidget = getValueByPath(fromObject, ["enableWidget"]);
23282
23465
  if (fromEnableWidget != null) setValueByPath(toObject, ["enableWidget"], fromEnableWidget);
23283
23466
  return toObject;
@@ -23286,8 +23469,8 @@ function googleSearchToMldev(fromObject) {
23286
23469
  const toObject = {};
23287
23470
  const fromSearchTypes = getValueByPath(fromObject, ["searchTypes"]);
23288
23471
  if (fromSearchTypes != null) setValueByPath(toObject, ["searchTypes"], fromSearchTypes);
23289
- if (getValueByPath(fromObject, ["excludeDomains"]) !== void 0) throw new Error("excludeDomains parameter is not supported in Gemini API.");
23290
23472
  if (getValueByPath(fromObject, ["blockingConfidence"]) !== void 0) throw new Error("blockingConfidence parameter is not supported in Gemini API.");
23473
+ if (getValueByPath(fromObject, ["excludeDomains"]) !== void 0) throw new Error("excludeDomains parameter is not supported in Gemini API.");
23291
23474
  const fromTimeRangeFilter = getValueByPath(fromObject, ["timeRangeFilter"]);
23292
23475
  if (fromTimeRangeFilter != null) setValueByPath(toObject, ["timeRangeFilter"], fromTimeRangeFilter);
23293
23476
  return toObject;
@@ -23431,6 +23614,8 @@ function toolToMldev(fromObject) {
23431
23614
  if (fromFileSearch != null) setValueByPath(toObject, ["fileSearch"], fromFileSearch);
23432
23615
  const fromGoogleSearch = getValueByPath(fromObject, ["googleSearch"]);
23433
23616
  if (fromGoogleSearch != null) setValueByPath(toObject, ["googleSearch"], googleSearchToMldev(fromGoogleSearch));
23617
+ const fromGoogleMaps = getValueByPath(fromObject, ["googleMaps"]);
23618
+ if (fromGoogleMaps != null) setValueByPath(toObject, ["googleMaps"], googleMapsToMldev(fromGoogleMaps));
23434
23619
  const fromCodeExecution = getValueByPath(fromObject, ["codeExecution"]);
23435
23620
  if (fromCodeExecution != null) setValueByPath(toObject, ["codeExecution"], fromCodeExecution);
23436
23621
  if (getValueByPath(fromObject, ["enterpriseWebSearch"]) !== void 0) throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");
@@ -23442,10 +23627,9 @@ function toolToMldev(fromObject) {
23442
23627
  });
23443
23628
  setValueByPath(toObject, ["functionDeclarations"], transformedList);
23444
23629
  }
23445
- const fromGoogleMaps = getValueByPath(fromObject, ["googleMaps"]);
23446
- if (fromGoogleMaps != null) setValueByPath(toObject, ["googleMaps"], googleMapsToMldev(fromGoogleMaps));
23447
23630
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, ["googleSearchRetrieval"]);
23448
23631
  if (fromGoogleSearchRetrieval != null) setValueByPath(toObject, ["googleSearchRetrieval"], fromGoogleSearchRetrieval);
23632
+ if (getValueByPath(fromObject, ["parallelAiSearch"]) !== void 0) throw new Error("parallelAiSearch parameter is not supported in Gemini API.");
23449
23633
  const fromUrlContext = getValueByPath(fromObject, ["urlContext"]);
23450
23634
  if (fromUrlContext != null) setValueByPath(toObject, ["urlContext"], fromUrlContext);
23451
23635
  const fromMcpServers = getValueByPath(fromObject, ["mcpServers"]);
@@ -24228,131 +24412,6 @@ var sleep$1 = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
24228
24412
  * Copyright 2025 Google LLC
24229
24413
  * SPDX-License-Identifier: Apache-2.0
24230
24414
  */
24231
- var VERSION = "0.0.1";
24232
- /**
24233
- * @license
24234
- * Copyright 2025 Google LLC
24235
- * SPDX-License-Identifier: Apache-2.0
24236
- */
24237
- /**
24238
- * Note this does not detect 'browser'; for that, use getBrowserInfo().
24239
- */
24240
- function getDetectedPlatform() {
24241
- if (typeof Deno !== "undefined" && Deno.build != null) return "deno";
24242
- if (typeof EdgeRuntime !== "undefined") return "edge";
24243
- if (Object.prototype.toString.call(typeof globalThis.process !== "undefined" ? globalThis.process : 0) === "[object process]") return "node";
24244
- return "unknown";
24245
- }
24246
- var getPlatformProperties = () => {
24247
- var _a, _b, _c, _d, _e;
24248
- const detectedPlatform = getDetectedPlatform();
24249
- if (detectedPlatform === "deno") return {
24250
- "X-Stainless-Lang": "js",
24251
- "X-Stainless-Package-Version": VERSION,
24252
- "X-Stainless-OS": normalizePlatform(Deno.build.os),
24253
- "X-Stainless-Arch": normalizeArch(Deno.build.arch),
24254
- "X-Stainless-Runtime": "deno",
24255
- "X-Stainless-Runtime-Version": typeof Deno.version === "string" ? Deno.version : (_b = (_a = Deno.version) === null || _a === void 0 ? void 0 : _a.deno) !== null && _b !== void 0 ? _b : "unknown"
24256
- };
24257
- if (typeof EdgeRuntime !== "undefined") return {
24258
- "X-Stainless-Lang": "js",
24259
- "X-Stainless-Package-Version": VERSION,
24260
- "X-Stainless-OS": "Unknown",
24261
- "X-Stainless-Arch": `other:${EdgeRuntime}`,
24262
- "X-Stainless-Runtime": "edge",
24263
- "X-Stainless-Runtime-Version": globalThis.process.version
24264
- };
24265
- if (detectedPlatform === "node") return {
24266
- "X-Stainless-Lang": "js",
24267
- "X-Stainless-Package-Version": VERSION,
24268
- "X-Stainless-OS": normalizePlatform((_c = globalThis.process.platform) !== null && _c !== void 0 ? _c : "unknown"),
24269
- "X-Stainless-Arch": normalizeArch((_d = globalThis.process.arch) !== null && _d !== void 0 ? _d : "unknown"),
24270
- "X-Stainless-Runtime": "node",
24271
- "X-Stainless-Runtime-Version": (_e = globalThis.process.version) !== null && _e !== void 0 ? _e : "unknown"
24272
- };
24273
- const browserInfo = getBrowserInfo();
24274
- if (browserInfo) return {
24275
- "X-Stainless-Lang": "js",
24276
- "X-Stainless-Package-Version": VERSION,
24277
- "X-Stainless-OS": "Unknown",
24278
- "X-Stainless-Arch": "unknown",
24279
- "X-Stainless-Runtime": `browser:${browserInfo.browser}`,
24280
- "X-Stainless-Runtime-Version": browserInfo.version
24281
- };
24282
- return {
24283
- "X-Stainless-Lang": "js",
24284
- "X-Stainless-Package-Version": VERSION,
24285
- "X-Stainless-OS": "Unknown",
24286
- "X-Stainless-Arch": "unknown",
24287
- "X-Stainless-Runtime": "unknown",
24288
- "X-Stainless-Runtime-Version": "unknown"
24289
- };
24290
- };
24291
- function getBrowserInfo() {
24292
- if (typeof navigator === "undefined" || !navigator) return null;
24293
- for (const { key, pattern } of [
24294
- {
24295
- key: "edge",
24296
- pattern: /Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/
24297
- },
24298
- {
24299
- key: "ie",
24300
- pattern: /MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/
24301
- },
24302
- {
24303
- key: "ie",
24304
- pattern: /Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/
24305
- },
24306
- {
24307
- key: "chrome",
24308
- pattern: /Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/
24309
- },
24310
- {
24311
- key: "firefox",
24312
- pattern: /Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/
24313
- },
24314
- {
24315
- key: "safari",
24316
- pattern: /(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/
24317
- }
24318
- ]) {
24319
- const match = pattern.exec(navigator.userAgent);
24320
- if (match) return {
24321
- browser: key,
24322
- version: `${match[1] || 0}.${match[2] || 0}.${match[3] || 0}`
24323
- };
24324
- }
24325
- return null;
24326
- }
24327
- var normalizeArch = (arch) => {
24328
- if (arch === "x32") return "x32";
24329
- if (arch === "x86_64" || arch === "x64") return "x64";
24330
- if (arch === "arm") return "arm";
24331
- if (arch === "aarch64" || arch === "arm64") return "arm64";
24332
- if (arch) return `other:${arch}`;
24333
- return "unknown";
24334
- };
24335
- var normalizePlatform = (platform) => {
24336
- platform = platform.toLowerCase();
24337
- if (platform.includes("ios")) return "iOS";
24338
- if (platform === "android") return "Android";
24339
- if (platform === "darwin") return "MacOS";
24340
- if (platform === "win32") return "Windows";
24341
- if (platform === "freebsd") return "FreeBSD";
24342
- if (platform === "openbsd") return "OpenBSD";
24343
- if (platform === "linux") return "Linux";
24344
- if (platform) return `Other:${platform}`;
24345
- return "Unknown";
24346
- };
24347
- var _platformHeaders;
24348
- var getPlatformHeaders = () => {
24349
- return _platformHeaders !== null && _platformHeaders !== void 0 ? _platformHeaders : _platformHeaders = getPlatformProperties();
24350
- };
24351
- /**
24352
- * @license
24353
- * Copyright 2025 Google LLC
24354
- * SPDX-License-Identifier: Apache-2.0
24355
- */
24356
24415
  function getDefaultFetch() {
24357
24416
  if (typeof fetch !== "undefined") return fetch;
24358
24417
  throw new Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new GeminiNextGenAPIClient({ fetch })` or polyfill the global, `globalThis.fetch = fetch`");
@@ -24443,6 +24502,12 @@ var FallbackEncoder = ({ headers, body }) => {
24443
24502
  * Copyright 2025 Google LLC
24444
24503
  * SPDX-License-Identifier: Apache-2.0
24445
24504
  */
24505
+ var VERSION = "0.0.1";
24506
+ /**
24507
+ * @license
24508
+ * Copyright 2025 Google LLC
24509
+ * SPDX-License-Identifier: Apache-2.0
24510
+ */
24446
24511
  var checkFileSupport = () => {
24447
24512
  var _a;
24448
24513
  if (typeof File === "undefined") {
@@ -24709,14 +24774,16 @@ var LineDecoder = class {
24709
24774
  constructor() {
24710
24775
  this.buffer = new Uint8Array();
24711
24776
  this.carriageReturnIndex = null;
24777
+ this.searchIndex = 0;
24712
24778
  }
24713
24779
  decode(chunk) {
24780
+ var _a;
24714
24781
  if (chunk == null) return [];
24715
24782
  const binaryChunk = chunk instanceof ArrayBuffer ? new Uint8Array(chunk) : typeof chunk === "string" ? encodeUTF8(chunk) : chunk;
24716
24783
  this.buffer = concatBytes([this.buffer, binaryChunk]);
24717
24784
  const lines = [];
24718
24785
  let patternIndex;
24719
- while ((patternIndex = findNewlineIndex(this.buffer, this.carriageReturnIndex)) != null) {
24786
+ while ((patternIndex = findNewlineIndex(this.buffer, (_a = this.carriageReturnIndex) !== null && _a !== void 0 ? _a : this.searchIndex)) != null) {
24720
24787
  if (patternIndex.carriage && this.carriageReturnIndex == null) {
24721
24788
  this.carriageReturnIndex = patternIndex.index;
24722
24789
  continue;
@@ -24725,6 +24792,7 @@ var LineDecoder = class {
24725
24792
  lines.push(decodeUTF8(this.buffer.subarray(0, this.carriageReturnIndex - 1)));
24726
24793
  this.buffer = this.buffer.subarray(this.carriageReturnIndex);
24727
24794
  this.carriageReturnIndex = null;
24795
+ this.searchIndex = 0;
24728
24796
  continue;
24729
24797
  }
24730
24798
  const endIndex = this.carriageReturnIndex !== null ? patternIndex.preceding - 1 : patternIndex.preceding;
@@ -24732,7 +24800,9 @@ var LineDecoder = class {
24732
24800
  lines.push(line);
24733
24801
  this.buffer = this.buffer.subarray(patternIndex.index);
24734
24802
  this.carriageReturnIndex = null;
24803
+ this.searchIndex = 0;
24735
24804
  }
24805
+ this.searchIndex = Math.max(0, this.buffer.length - 1);
24736
24806
  return lines;
24737
24807
  }
24738
24808
  flush() {
@@ -24754,29 +24824,23 @@ LineDecoder.NEWLINE_REGEXP = /\r\n|[\n\r]/g;
24754
24824
  function findNewlineIndex(buffer, startIndex) {
24755
24825
  const newline = 10;
24756
24826
  const carriage = 13;
24757
- for (let i = startIndex !== null && startIndex !== void 0 ? startIndex : 0; i < buffer.length; i++) {
24758
- if (buffer[i] === newline) return {
24759
- preceding: i,
24760
- index: i + 1,
24761
- carriage: false
24762
- };
24763
- if (buffer[i] === carriage) return {
24764
- preceding: i,
24765
- index: i + 1,
24766
- carriage: true
24767
- };
24768
- }
24769
- return null;
24770
- }
24771
- function findDoubleNewlineIndex(buffer) {
24772
- const newline = 10;
24773
- const carriage = 13;
24774
- for (let i = 0; i < buffer.length - 1; i++) {
24775
- if (buffer[i] === newline && buffer[i + 1] === newline) return i + 2;
24776
- if (buffer[i] === carriage && buffer[i + 1] === carriage) return i + 2;
24777
- if (buffer[i] === carriage && buffer[i + 1] === newline && i + 3 < buffer.length && buffer[i + 2] === carriage && buffer[i + 3] === newline) return i + 4;
24778
- }
24779
- return -1;
24827
+ const start = startIndex !== null && startIndex !== void 0 ? startIndex : 0;
24828
+ const nextNewline = buffer.indexOf(newline, start);
24829
+ const nextCarriage = buffer.indexOf(carriage, start);
24830
+ if (nextNewline === -1 && nextCarriage === -1) return null;
24831
+ let i;
24832
+ if (nextNewline !== -1 && nextCarriage !== -1) i = Math.min(nextNewline, nextCarriage);
24833
+ else i = nextNewline !== -1 ? nextNewline : nextCarriage;
24834
+ if (buffer[i] === newline) return {
24835
+ preceding: i,
24836
+ index: i + 1,
24837
+ carriage: false
24838
+ };
24839
+ return {
24840
+ preceding: i,
24841
+ index: i + 1,
24842
+ carriage: true
24843
+ };
24780
24844
  }
24781
24845
  /**
24782
24846
  * @license
@@ -25022,7 +25086,7 @@ function _iterSSEMessages(response, controller) {
25022
25086
  const lineDecoder = new LineDecoder();
25023
25087
  const iter = ReadableStreamToAsyncIterable(response.body);
25024
25088
  try {
25025
- for (var _d = true, _e = __asyncValues(iterSSEChunks(iter)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
25089
+ for (var _d = true, _e = __asyncValues(iterBinaryChunks(iter)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
25026
25090
  _c = _f.value;
25027
25091
  _d = false;
25028
25092
  const sseChunk = _c;
@@ -25047,29 +25111,19 @@ function _iterSSEMessages(response, controller) {
25047
25111
  });
25048
25112
  }
25049
25113
  /**
25050
- * Given an async iterable iterator, iterates over it and yields full
25051
- * SSE chunks, i.e. yields when a double new-line is encountered.
25114
+ * Given an async iterable iterator, normalizes each chunk to a
25115
+ * Uint8Array and yields it.
25052
25116
  */
25053
- function iterSSEChunks(iterator) {
25054
- return __asyncGenerator(this, arguments, function* iterSSEChunks_1() {
25117
+ function iterBinaryChunks(iterator) {
25118
+ return __asyncGenerator(this, arguments, function* iterBinaryChunks_1() {
25055
25119
  var _a, e_5, _b, _c;
25056
- let data = new Uint8Array();
25057
25120
  try {
25058
25121
  for (var _d = true, iterator_3 = __asyncValues(iterator), iterator_3_1; iterator_3_1 = yield __await(iterator_3.next()), _a = iterator_3_1.done, !_a; _d = true) {
25059
25122
  _c = iterator_3_1.value;
25060
25123
  _d = false;
25061
25124
  const chunk = _c;
25062
25125
  if (chunk == null) continue;
25063
- const binaryChunk = chunk instanceof ArrayBuffer ? new Uint8Array(chunk) : typeof chunk === "string" ? encodeUTF8(chunk) : chunk;
25064
- let newData = new Uint8Array(data.length + binaryChunk.length);
25065
- newData.set(data);
25066
- newData.set(binaryChunk, data.length);
25067
- data = newData;
25068
- let patternIndex;
25069
- while ((patternIndex = findDoubleNewlineIndex(data)) !== -1) {
25070
- yield yield __await(data.slice(0, patternIndex));
25071
- data = data.slice(patternIndex);
25072
- }
25126
+ yield yield __await(chunk instanceof ArrayBuffer ? new Uint8Array(chunk) : typeof chunk === "string" ? encodeUTF8(chunk) : chunk);
25073
25127
  }
25074
25128
  } catch (e_5_1) {
25075
25129
  e_5 = { error: e_5_1 };
@@ -25080,7 +25134,6 @@ function iterSSEChunks(iterator) {
25080
25134
  if (e_5) throw e_5.error;
25081
25135
  }
25082
25136
  }
25083
- if (data.length > 0) yield yield __await(data);
25084
25137
  });
25085
25138
  }
25086
25139
  var SSEDecoder = class {
@@ -25641,11 +25694,10 @@ var BaseGeminiNextGenAPIClient = class BaseGeminiNextGenAPIClient {
25641
25694
  const authHeaders = await this.authHeaders(options);
25642
25695
  let headers = buildHeaders([
25643
25696
  idempotencyHeaders,
25644
- Object.assign(Object.assign({
25697
+ {
25645
25698
  Accept: "application/json",
25646
- "User-Agent": this.getUserAgent(),
25647
- "X-Stainless-Retry-Count": String(retryCount)
25648
- }, options.timeout ? { "X-Stainless-Timeout": String(Math.trunc(options.timeout / 1e3)) } : {}), getPlatformHeaders()),
25699
+ "User-Agent": this.getUserAgent()
25700
+ },
25649
25701
  this._options.defaultHeaders,
25650
25702
  bodyHeaders,
25651
25703
  options.headers,
@@ -26274,8 +26326,18 @@ function tuningJobFromVertex(fromObject, _rootObject) {
26274
26326
  if (fromPartnerModelTuningSpec != null) setValueByPath(toObject, ["partnerModelTuningSpec"], fromPartnerModelTuningSpec);
26275
26327
  const fromCustomBaseModel = getValueByPath(fromObject, ["customBaseModel"]);
26276
26328
  if (fromCustomBaseModel != null) setValueByPath(toObject, ["customBaseModel"], fromCustomBaseModel);
26329
+ const fromEvaluateDatasetRuns = getValueByPath(fromObject, ["evaluateDatasetRuns"]);
26330
+ if (fromEvaluateDatasetRuns != null) {
26331
+ let transformedList = fromEvaluateDatasetRuns;
26332
+ if (Array.isArray(transformedList)) transformedList = transformedList.map((item) => {
26333
+ return item;
26334
+ });
26335
+ setValueByPath(toObject, ["evaluateDatasetRuns"], transformedList);
26336
+ }
26277
26337
  const fromExperiment = getValueByPath(fromObject, ["experiment"]);
26278
26338
  if (fromExperiment != null) setValueByPath(toObject, ["experiment"], fromExperiment);
26339
+ const fromFullFineTuningSpec = getValueByPath(fromObject, ["fullFineTuningSpec"]);
26340
+ if (fromFullFineTuningSpec != null) setValueByPath(toObject, ["fullFineTuningSpec"], fromFullFineTuningSpec);
26279
26341
  const fromLabels = getValueByPath(fromObject, ["labels"]);
26280
26342
  if (fromLabels != null) setValueByPath(toObject, ["labels"], fromLabels);
26281
26343
  const fromOutputUri = getValueByPath(fromObject, ["outputUri"]);
@@ -26286,6 +26348,8 @@ function tuningJobFromVertex(fromObject, _rootObject) {
26286
26348
  if (fromServiceAccount != null) setValueByPath(toObject, ["serviceAccount"], fromServiceAccount);
26287
26349
  const fromTunedModelDisplayName = getValueByPath(fromObject, ["tunedModelDisplayName"]);
26288
26350
  if (fromTunedModelDisplayName != null) setValueByPath(toObject, ["tunedModelDisplayName"], fromTunedModelDisplayName);
26351
+ const fromTuningJobState = getValueByPath(fromObject, ["tuningJobState"]);
26352
+ if (fromTuningJobState != null) setValueByPath(toObject, ["tuningJobState"], fromTuningJobState);
26289
26353
  const fromVeoTuningSpec = getValueByPath(fromObject, ["veoTuningSpec"]);
26290
26354
  if (fromVeoTuningSpec != null) setValueByPath(toObject, ["veoTuningSpec"], fromVeoTuningSpec);
26291
26355
  return toObject;
@@ -26974,7 +27038,7 @@ var GoogleGenAI = class {
26974
27038
  this.apiKey = (_c = options.apiKey) !== null && _c !== void 0 ? _c : envApiKey;
26975
27039
  this.project = (_d = options.project) !== null && _d !== void 0 ? _d : envProject;
26976
27040
  this.location = (_e = options.location) !== null && _e !== void 0 ? _e : envLocation;
26977
- if (!this.vertexai && !this.apiKey) throw new Error("API key must be set when using the Gemini API.");
27041
+ if (!this.vertexai && !this.apiKey) console.warn("API key should be set when using the Gemini API.");
26978
27042
  if (options.vertexai) {
26979
27043
  if ((_f = options.googleAuthOptions) === null || _f === void 0 ? void 0 : _f.credentials) {
26980
27044
  console.debug("The user provided Google Cloud credentials will take precedence over the API key from the environment variable.");