From 38067eb15671b4027619e096d4d57c8d24c3fc54 Mon Sep 17 00:00:00 2001 From: Kyle Kelley Date: Wed, 5 Nov 2025 06:34:01 -0800 Subject: [PATCH] update supported models and dont reprocess newlines --- packages/ai/groq-client.ts | 56 +++++++++++++++++++++++++++++++----- packages/ai/tool-registry.ts | 15 ++-------- 2 files changed, 51 insertions(+), 20 deletions(-) diff --git a/packages/ai/groq-client.ts b/packages/ai/groq-client.ts index a336961..fb44ae3 100644 --- a/packages/ai/groq-client.ts +++ b/packages/ai/groq-client.ts @@ -38,21 +38,21 @@ Groq API key not found. Please set \`GROQ_API_KEY\` environment variable.`; }, { provider: "groq", - name: "llama3-8b-8192", - displayName: "Llama 3.1 8B", + name: "qwen/qwen3-32b", + displayName: "Qwen 3 32B", capabilities: ["completion", "tools", "thinking"], }, { provider: "groq", - name: "llama3-70b-8192", - displayName: "Llama 3.1 70B", + name: "llama-3.1-8b-instant", + displayName: "Llama 3.1 8B Instant", capabilities: ["completion", "tools", "thinking"], }, { provider: "groq", - name: "mixtral-8x7b-32768", - displayName: "Mixtral 8x7B", - capabilities: ["completion", "tools"], + name: "openai/gpt-oss-120b", + displayName: "GPT OSS 120B", + capabilities: ["completion", "tools", "thinking"], }, { provider: "groq", @@ -61,6 +61,48 @@ Groq API key not found. Please set \`GROQ_API_KEY\` environment variable.`; capabilities: ["completion", "tools"], decomissioned: true, }, + { + provider: "groq", + name: "groq/compound-mini", + displayName: "Groq Compound Mini", + capabilities: ["completion", "thinking"], + }, + { + provider: "groq", + name: "groq/compound", + displayName: "Groq Compound", + capabilities: ["completion", "tools", "thinking"], + }, + { + provider: "groq", + name: "meta-llama/llama-4-scout-17b-16e-instruct", + displayName: "Llama 4 Scout 17B", + capabilities: ["completion", "tools", "thinking"], + }, + { + provider: "groq", + name: "meta-llama/llama-4-maverick-17b-128e-instruct", + displayName: "Llama 4 Maverick 17B", + capabilities: ["completion", "tools", "thinking"], + }, + { + provider: "groq", + name: "openai/gpt-oss-20b", + displayName: "GPT OSS 20B", + capabilities: ["completion", "tools", "thinking"], + }, + { + provider: "groq", + name: "llama-3.3-70b-versatile", + displayName: "Llama 3.3 70B Versatile", + capabilities: ["completion", "tools", "thinking"], + }, + { + provider: "groq", + name: "allam-2-7b", + displayName: "Allam 2 7B", + capabilities: ["completion"], + }, ]; return Promise.resolve(groqModels); } diff --git a/packages/ai/tool-registry.ts b/packages/ai/tool-registry.ts index c3be45e..bbe4a84 100644 --- a/packages/ai/tool-registry.ts +++ b/packages/ai/tool-registry.ts @@ -231,17 +231,6 @@ export async function getAllTools(): Promise { */ export const NOTEBOOK_TOOLS_EXPORT = NOTEBOOK_TOOLS; -/** - * Convert escaped newlines and other common escape sequences to their actual characters - */ -function unescapeContent(content: string): string { - return content - .replace(/\\n/g, "\n") // Convert \n to actual newlines - .replace(/\\t/g, "\t") // Convert \t to actual tabs - .replace(/\\r/g, "\r") // Convert \r to actual carriage returns - .replace(/\\\\/g, "\\"); // Convert \\ to single backslash -} - export function createCell( store: Store, sessionId: string, @@ -250,7 +239,7 @@ export function createCell( ) { const cellType = String(args.cellType || "code"); const rawContent = String(args.source || args.content || ""); // Check source first, then content - const content = unescapeContent(rawContent); // Process escaped characters + const content = rawContent; const afterId = String(args.after_id); // Now required // Get ordered cells with fractional indices @@ -501,7 +490,7 @@ export async function handleToolCallWithResult( case "modify_cell": { const cellId = String(args.cellId || ""); const rawContent = String(args.source || args.content || ""); - const content = unescapeContent(rawContent); // Process escaped characters + const content = rawContent; if (!cellId) { logger.error("modify_cell: cellId is required");