AI Copilot error — “400 Invalid JSON format in tool call arguments” on every model (Wappler 7.3.6 macOS M1)

Hi everyone,

I’m currently facing a recurring issue with the new AI Copilot in Wappler version 7.3.6 on macOS (Apple Silicon M1).

Whenever I try to send a prompt to any of the available AI models, I immediately get the following error:

400 Invalid JSON format in tool call arguments

This happens even with very simple text prompts (no special characters, no new lines).
For example, this prompt always triggers the error:

I have this old website built in PHP that I’d like to improve, both in terms of backend structure and visual interface. Please analyze it and describe what you would improve and how — focusing on code architecture, security, performance, and database handling on the backend, as well as design, usability, and responsiveness on the frontend. Your goal is to suggest a clear modernization plan to make the site look and work like a modern web app, but do not rewrite the code yet — only provide a detailed analysis and recommendations.

The AI Copilot responds:

I'll analyze your PHP website to provide a comprehensive modernization plan. Let me start by examining the project structure and key files.
400 Invalid JSON format in tool call arguments

It happens with all models listed in Copilot, including OpenAI and local models.
I already tried restarting Wappler, clearing cache, and even using shorter one-line prompts, but the error persists.

Could anyone confirm if they’re experiencing the same issue with version 7.3.6 on macOS M1?
Is this a known bug in how Wappler serializes AI prompts into JSON?

Thanks in advance for any feedback or workaround!
— Roberto

Edit: The problem is only for PHP website. in Node.js it works properly