“Empty response from provider” / connection errors
Symptom
Generation fails with "Connection error", "API error (code)", or "Empty response from provider", and no SEO is produced.
Cause
AISA's API callers return a result plus an error, and surface three distinct cases: a transport failure (WordPress is_wp_error) shows as "Connection error"; a non-200 HTTP status shows as "API error (code)"; and a successful call that returns no text shows as "Empty response from provider". Common roots are a wrong or unconfigured API key, no outbound internet from the server, the provider being down or rate-limiting, or a model that returned nothing (notably some Gemini Flash models spending their whole budget on hidden reasoning).
Fix
- Connection error — check that your server has outbound internet to the provider and that the key is set in Settings → API keys; use the provider's Test button.
- API error (code) — read the code: 401/403 means a bad key, 429 means rate limit (lower Turbo or add keys), 5xx means the provider is down — retry later.
- Empty response — try another provider; if it's Gemini, update to 1.99.826+ (which sets
thinkingBudgetto 0 and usesgemini-2.5-flash) so the model returns actual text.
The debug log at wp-content/debug.log records the exact failure.
Questions people ask
Empty response on Gemini specifically — what now? Update to 1.99.826+; the empty-output case is a Gemini thinkingBudget issue fixed there.
It works locally but fails in generation — is the key wrong? Use the Test button on the API keys page; 401/403 confirms a key problem, 429 a rate limit.
Related
- Gemini errors (deprecated model / empty output)
- Rate limit / 429 errors
- Works on localhost and staging
