How to fix blank or truncated AI output
Occasionally the Generate button returns an empty field, or a value that is much shorter than expected. The cause is almost always one of three things: the AI provider rejected the request, the prompt's stop sequence cut the answer, or the request never left the browser. Work through the checks below in order.
1. Read the error notification
- When a request to the AI provider fails, the extension shows an error notification in the admin panel. The most common reasons are an invalid API key, an exhausted credit balance on the provider account, a provider rate limit, and a request that exceeded the Request timeout.
- Check the provider account first - a depleted credit balance is the single most frequent cause, and the value the provider returns is not always shown in full in the notification.
- The same errors are recorded in
var/log/mirasvit_ai.log, together with the provider name, the model, and the reason.
For the complete request and response of every call, set Debug mode to Yes at Stores -> Configuration -> Mirasvit extensions -> Developer -> AI configuration, reproduce the problem, then read var/log/mirasvit_ai.log. Turn Debug mode back to No afterwards - it logs sensitive data and slows requests down.
2. If the value is cut short, check the stop sequence
- Open the prompt at System -> AI Assistant -> Prompts and look at the Stop sequences field.
- The built-in Meta title, Meta keywords and Meta description prompts ship with
\n, which keeps the answer to a single line. If the model opens its answer with an introductory sentence, the stop sequence cuts everything after that sentence, and only the opening phrase reaches the field. - Two ways to fix it, either is enough:
- Keep an instruction such as "Output only the value on a single line. Do not add any preamble, explanation, quotes, or label." in the prompt text. This is how the built-in prompts are written.
- Clear the Stop sequences field for that prompt.
- See Prompts for the full description of the field.
3. If nothing happens at all - no value and no error
Nothing in var/log/mirasvit_ai.log at the time of the attempt means the request never reached the store, so the cause is between the browser and Magento.
- CDN or firewall. If the store runs behind Cloudflare or another WAF, a security rule may drop the admin request. Check the firewall's event log for blocked requests at the time of the attempt, and add a bypass rule for the URL path that contains
/assistant/api/text- that is the endpoint the extension calls when generating content. - Browser console. Open the browser developer tools (
F12), switch to the Console tab and click Generate again. Errors reported there tell you whether another script on the page is preventing the request.
If the checks above do not identify the cause, contact our Support team with a screenshot of the Console and Network tabs taken at the moment the field stays blank, and the relevant lines from var/log/mirasvit_ai.log.