{"record":{"id":"eee061e7d4ae46b4","repo":"exo-explore/exo","slug":"failed-to-fetch-model-exc","errorCode":null,"errorMessage":"Failed to fetch model: {exc}","messagePattern":"Failed to fetch model: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"src/exo/api/main.py","lineNumber":1826,"sourceCode":"                    tasks=[task.value for task in card.tasks],\n                    is_custom=card.is_custom,\n                    family=card.family,\n                    quantization=card.quantization,\n                    base_model=card.base_model,\n                    capabilities=card.capabilities,\n                    reasoning_dialect=card.reasoning_dialect,\n                    context_length=card.context_length,\n                )\n                for card in cards\n            ]\n        )\n\n    async def add_custom_model(self, payload: AddCustomModelParams) -> ModelListModel:\n        \"\"\"Fetch a model from HuggingFace and save as a custom model card, then sync across the cluster.\"\"\"\n        try:\n            card = await ModelCard.fetch_from_hf(payload.model_id)\n        except Exception as exc:\n            raise HTTPException(\n                status_code=400, detail=f\"Failed to fetch model: {exc}\"\n            ) from exc\n\n        await self.command_sender.send(\n            ForwarderCommand(\n                origin=self._system_id,\n                command=AddCustomModelCard(model_card=card),\n            )\n        )\n\n        # Immediately update the local cache so the subsequent GET /models\n        # returns the new model without waiting for the event round-trip.\n        model_cards.card_cache.cc[card.model_id] = card\n\n        return ModelListModel(\n            id=card.model_id,\n            hugging_face_id=card.model_id,\n            name=card.model_id.short(),","sourceCodeStart":1808,"sourceCodeEnd":1844,"githubUrl":"https://github.com/exo-explore/exo/blob/21a54c5ea0230a3bec1e1a786d200126c7e34ec6/src/exo/api/main.py#L1808-L1844","documentation":"Error \"Failed to fetch model: {exc}\" thrown in exo-explore/exo.","triggerScenarios":"Thrown at src/exo/api/main.py:1826 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"}