neuralos 3.7.2 → 3.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/gybackend.cjs CHANGED
@@ -363386,6 +363386,15 @@ function getEnabledBuiltInTools(allTools, enabledMap) {
363386
363386
  return enabled !== false;
363387
363387
  });
363388
363388
  }
363389
+ function dedupeToolsByName(tools2) {
363390
+ const seen = /* @__PURE__ */ new Set();
363391
+ return tools2.filter((tool2) => {
363392
+ const name = tool2?.function?.name ?? tool2?.name;
363393
+ if (!name || seen.has(name)) return false;
363394
+ seen.add(name);
363395
+ return true;
363396
+ });
363397
+ }
363389
363398
 
363390
363399
  // ../../packages/backend/src/services/AgentHelper/utils/runtime.ts
363391
363400
  function isAbortError3(error40) {
@@ -363538,6 +363547,10 @@ var AgentHelpers = class {
363538
363547
  getEnabledBuiltInTools(allTools, enabledMap) {
363539
363548
  return getEnabledBuiltInTools(allTools, enabledMap);
363540
363549
  }
363550
+ /** Dedupe tool definitions by name before bindTools (v3.7.3 duplicate-tool fix). */
363551
+ dedupeToolsByName(tools2) {
363552
+ return dedupeToolsByName(tools2);
363553
+ }
363541
363554
  isAbortError(error40) {
363542
363555
  return isAbortError3(error40);
363543
363556
  }
@@ -365757,7 +365770,6 @@ var AgentService_v2 = class {
365757
365770
  compactionItem?.apiKey ? compactionItem.profile : void 0
365758
365771
  );
365759
365772
  const toolsForModel = buildToolsForModel(readFileSupport);
365760
- const allToolsForModel = [...toolsForModel, ...this.pluginToolSchemas];
365761
365773
  return {
365762
365774
  profileId,
365763
365775
  model,
@@ -365772,7 +365784,7 @@ var AgentService_v2 = class {
365772
365784
  compactionModelSupportsStructuredOutput,
365773
365785
  compactionModelSupportsObjectToolChoice,
365774
365786
  readFileSupport,
365775
- toolsForModel: allToolsForModel,
365787
+ toolsForModel,
365776
365788
  globalMaxTokens: typeof globalItem.maxTokens === "number" ? globalItem.maxTokens : 2e5,
365777
365789
  thinkingMaxTokens: typeof thinkingItem?.maxTokens === "number" ? thinkingItem.maxTokens : typeof globalItem.maxTokens === "number" ? globalItem.maxTokens : 2e5,
365778
365790
  compactionMaxTokens: typeof compactionItem?.maxTokens === "number" ? compactionItem.maxTokens : typeof thinkingItem?.maxTokens === "number" ? thinkingItem.maxTokens : typeof globalItem.maxTokens === "number" ? globalItem.maxTokens : 2e5
@@ -366149,11 +366161,13 @@ var AgentService_v2 = class {
366149
366161
  );
366150
366162
  const baseModel = shouldUseThinkingModelOnThisPass ? sessionBinding.thinkingModel || sessionBinding.model : sessionBinding.model;
366151
366163
  const pluginOpenAiTools = this.pluginToolSchemas;
366152
- const modelWithTools = baseModel.bindTools([
366153
- ...builtInTools,
366154
- ...mcpTools,
366155
- ...pluginOpenAiTools
366156
- ]);
366164
+ const modelWithTools = baseModel.bindTools(
366165
+ this.helpers.dedupeToolsByName([
366166
+ ...builtInTools,
366167
+ ...mcpTools,
366168
+ ...pluginOpenAiTools
366169
+ ])
366170
+ );
366157
366171
  const messageId = v4_default();
366158
366172
  let partialText = "";
366159
366173
  let reasoningContent = "";
@@ -366188,11 +366202,13 @@ var AgentService_v2 = class {
366188
366202
  shouldUseThinkingModelOnThisPass ? 0.2 : 0.7,
366189
366203
  null
366190
366204
  );
366191
- modelToUse = fallbackChat.bindTools([
366192
- ...builtInTools,
366193
- ...mcpTools,
366194
- ...pluginOpenAiTools
366195
- ]);
366205
+ modelToUse = fallbackChat.bindTools(
366206
+ this.helpers.dedupeToolsByName([
366207
+ ...builtInTools,
366208
+ ...mcpTools,
366209
+ ...pluginOpenAiTools
366210
+ ])
366211
+ );
366196
366212
  }
366197
366213
  return await invokeWithRetryAndSanitizedInput({
366198
366214
  helpers: this.helpers,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neuralos",
3
- "version": "3.7.2",
3
+ "version": "3.7.3",
4
4
  "description": "Standalone neuralOS backend (rterm-backend): AI-native terminal & agentic-AI operations platform.",
5
5
  "keywords": [
6
6
  "forward-deployed-engineer",
Binary file