From 55b973ebc26714c4614e761a6d5774b0cb3d6521 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Wed, 25 Mar 2026 16:10:11 -0700 Subject: [PATCH] fix(blender): use correct Ollama model (qwen2.5-coder:7b) qwen2.5:14b doesn't exist on the server, causing silent 404 from Ollama and 502 to the client. Also added error logging for non-ok Ollama responses. Co-Authored-By: Claude Opus 4.6 --- server/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/index.ts b/server/index.ts index fd3aba1..b3ccb3b 100644 --- a/server/index.ts +++ b/server/index.ts @@ -1594,7 +1594,7 @@ app.post("/api/blender-gen", async (c) => { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ - model: process.env.OLLAMA_MODEL || "qwen2.5:14b", + model: process.env.OLLAMA_MODEL || "qwen2.5-coder:7b", prompt: `Generate a Blender Python script that creates: ${prompt}\n\nThe script should:\n- Import bpy\n- Clear the default scene\n- Create the described objects with materials\n- Set up basic lighting and camera\n- Render to /tmp/render.png at 1024x1024\n\nOnly output the Python code, no explanations.`, stream: false, }), @@ -1606,6 +1606,9 @@ app.post("/api/blender-gen", async (c) => { // Extract code block if wrapped in markdown const codeMatch = script.match(/```(?:python)?\n([\s\S]*?)```/); if (codeMatch) script = codeMatch[1].trim(); + } else { + const errText = await llmRes.text().catch(() => ""); + console.error(`[blender-gen] Ollama ${llmRes.status}: ${errText}`); } } catch (e) { console.error("[blender-gen] LLM error:", e);