mirror of
https://github.com/exo-explore/exo.git
synced 2026-09-12 21:38:59 -04:00
## Motivation Partially fixes [this](https://github.com/exo-explore/exo/issues/2098) issue. Removed erroneous logic for telling user to download when they already downloaded. Could not figure out about the "spontaneous crashes" in that issue, author should consolidate more logs and open a new issue dedicated to that. I believe [this](https://github.com/exo-explore/exo/commit/74e9fe15e62fe189dc7e019db86e75c83eca2721) commit solved some EventRouter-related crashes, which was mentioned in [this](https://github.com/exo-explore/exo/issues/2098) issue, so it may have already been solved. If not, should be re-submitted as a new issue. ## Changes - Consolidated _resolve_and_validate_text_model and _validate_image_model into one function: _validate_model_has_instance; - + They already had virtually identical logic, it being different seems to be an artifact of history - + Added logic to ensure that _trigger_notify_user_to_download_model is only called when no such model is downloaded, not just if there is no instance of it - Added a new `/instance/await` SSE streaming endpoint to wait for when a model has an instance available. Complements instance-placement API, so we can wait till that is done without client-side polling. - Updated docs and a /tmp script to reflect some of the changes - Updated dashboard `getModelForRequest` to only return model ID if an instance exists for it, and updated bits to use `handleChatSend` instead of `sendMessage` because that checks for if a model instance exists first. ## Why It Works The problem was that there was erroneous logging for model not downloaded. I fixed that logic. The rest is extra.