Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 49 additions & 7 deletions packages/ai/groq-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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);
}
Expand Down
15 changes: 2 additions & 13 deletions packages/ai/tool-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,17 +231,6 @@ export async function getAllTools(): Promise<NotebookTool[]> {
*/
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,
Expand All @@ -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
Expand Down Expand Up @@ -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");
Expand Down