You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
AI and offline fix
Fixes
Using an AI key no longer makes the app show offline when the AI service has a problem. Errors from the AI service (it's down, can't be reached, or sends an empty answer) now come back as a normal message. Before, a proxy such as Cloudflare could turn them into its own error page, which the app read as the server being down.
The app checks before showing offline: when a proxy answers with an error page, the app first asks the server's health check, and only shows offline if that fails too.
Slow AI answers: rewriting text, transcribing recordings, making flashcards and quizzes, and AI-filled properties now run in the background. The app checks on them until they're done, so a proxy's time limit (Cloudflare's is 100 seconds) can't cut them off. Other AI requests stop after 90 seconds with "The AI service took too long to answer".
For people running a server
New setting AI_TIMEOUT_MS (default 90000): how long one AI answer may take while a request waits for it. Keep it under your reverse proxy's limit.