{"record":{"id":"ac3f6ce43ba8b645","repo":"exo-explore/exo","slug":"no-instance-found-for-model-model-id","errorCode":null,"errorMessage":"No instance found for model {model_id}","messagePattern":"No instance found for model (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"src/exo/api/main.py","lineNumber":1008,"sourceCode":"\n\n        Raises HTTPException 404 if no instance is found for the model.\n        \"\"\"\n        if not any(\n            instance.shard_assignments.model_id == model_id\n            for instance in self.state.instances.values()\n        ):\n            # Check if model is actually downloaded\n            model_is_downloaded = any(\n                isinstance(download, DownloadCompleted)\n                and download.shard_metadata.model_card.model_id == model_id\n                for node_downloads in self.state.downloads.values()\n                for download in node_downloads\n            )\n            if not model_is_downloaded:\n                await self._trigger_notify_user_to_download_model(model_id)\n\n            raise HTTPException(\n                status_code=404, detail=f\"No instance found for model {model_id}\"\n            )\n        return model_id\n\n    def stream_events(self) -> StreamingResponse:\n        def _generate_json_array(events: Iterable[Event]) -> Iterable[str]:\n            yield \"[\"\n            first = True\n            for event in events:\n                if not first:\n                    yield \",\"\n                first = False\n                yield event.model_dump_json()\n            yield \"]\"\n\n        return StreamingResponse(\n            _generate_json_array(self._event_log.read_all()),\n            media_type=\"application/json\",","sourceCodeStart":990,"sourceCodeEnd":1026,"githubUrl":"https://github.com/exo-explore/exo/blob/21a54c5ea0230a3bec1e1a786d200126c7e34ec6/src/exo/api/main.py#L990-L1026","documentation":"Error \"No instance found for model {model_id}\" thrown in exo-explore/exo.","triggerScenarios":"Thrown at src/exo/api/main.py:1008 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"21a54c5ea0230a3bec1e1a786d200126c7e34ec6","analyzedAt":"2026-08-26T00:02:16.033Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}