diff --git a/vibn-frontend/app/api/chat/route.ts b/vibn-frontend/app/api/chat/route.ts index 518d43ab..318fc0cb 100644 --- a/vibn-frontend/app/api/chat/route.ts +++ b/vibn-frontend/app/api/chat/route.ts @@ -787,12 +787,10 @@ export async function POST(request: Request) { if (aborted) break; round++; - // On round 1, withhold tools if the message looks conversational. - // The model must answer in text first; tools unlock from round 2. - const toolDefs = - mcp_token && !(round === 1 && firstMessageIsConversational) - ? VIBN_TOOL_DEFINITIONS - : []; + // Keep tool definitions active in the schema to avoid model confusion and + // MALFORMED_FUNCTION_CALL gateway crashes, but let our system instructions + // guide the model to respond in plain text for conversational inputs. + const toolDefs = mcp_token ? VIBN_TOOL_DEFINITIONS : []; // Every 8 silent rounds or 12 tool calls, gently nudge the model to surface a one-liner // status before continuing. This is the user's only signal of