Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Train nov8-a: a non-text groupId with no group_id is still refused, as on main

milind-soni99bb38362a7d
diff --git a/server/drivers/agents-call.ts b/server/drivers/agents-call.ts
index aac15461cc..58b115c40f 100644
--- a/server/drivers/agents-call.ts
+++ b/server/drivers/agents-call.ts
@@ -268,7 +268,8 @@ export async function callTool(called: string, input: Json, context: ToolCallCon
// nonblank groupId from an older tool list.
const snakeBlank = canonical.group_id === undefined || canonical.group_id === null
|| (typeof canonical.group_id === "string" && canonical.group_id.trim() === "");
- if (snakeBlank && typeof args.groupId === "string" && args.groupId.trim() !== "") canonical.group_id = args.groupId;
+ // A non-text groupId still fails the check below, as it always has.
+ if (snakeBlank && args.groupId != null && !(typeof args.groupId === "string" && args.groupId.trim() === "")) canonical.group_id = args.groupId;
if (canonical.done_when === undefined) canonical.done_when = args.doneWhen;
const ids = canonical.bot_ids;
const optional = (key: string, type: "boolean" | "string") => canonical[key] === undefined || typeof canonical[key] === type;