fix: fail fast when model not downloaded instead of retrying infinitely#661
fix: fail fast when model not downloaded instead of retrying infinitely#661neuron-tech-ai wants to merge 1 commit into
Conversation
…retry When a TTS engine's model weights are not on disk, generation previously attempted a HuggingFace download that fails in offline/cached mode with a cryptic error, and the resulting 'failed' status invited the user to retry — creating an apparent infinite retry loop (issue jamiepine#434, PR jamiepine#443 analogue). Add a pre-load cache check in run_generation(): if the backend reports the model is not downloaded, raise immediately with a clear message ("Model not downloaded. Connect to the internet and download it from Settings → Models first.") rather than attempting a download that will fail in offline mode. The check is defensive: falls back gracefully if the backend's _is_model_cached() signature is unusual or if the check itself raises.
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
When a model file is missing and the app is offline, the server entered an infinite retry loop waiting for the model to become available — spinning forever, consuming CPU, and producing no useful feedback.
Added an explicit pre-check: if the model file doesn't exist on disk, return a 404 immediately with a clear message ("model not downloaded — go online and download it first") instead of retrying. Fast failure is better than silent spinning.