{"record":{"id":"95c5fc743e25cfb7","repo":"odysseus-dev/odysseus","slug":"fastembed-is-not-installed","errorCode":null,"errorMessage":"fastembed is not installed","messagePattern":"fastembed is not installed","errorType":"http","errorClass":"HTTPException","httpStatus":503,"severity":"error","filePath":"routes/embedding_routes.py","lineNumber":121,"sourceCode":"        pass\n    return {}\n\n\ndef _save_custom_endpoint(data: dict):\n    Path(_ENDPOINT_FILE).parent.mkdir(parents=True, exist_ok=True)\n    Path(_ENDPOINT_FILE).write_text(json.dumps(data, indent=2), encoding=\"utf-8\")\n\n\ndef setup_embedding_routes():\n    router = APIRouter(prefix=\"/api/embeddings\", dependencies=[Depends(require_admin)])\n\n    @router.get(\"/models\")\n    def list_models():\n        \"\"\"List all available fastembed models with download status.\"\"\"\n        try:\n            from fastembed import TextEmbedding\n        except ImportError:\n            raise HTTPException(503, \"fastembed is not installed\")\n\n        active = _active_model()\n        catalog = TextEmbedding.list_supported_models()\n        result = []\n\n        for m in catalog:\n            hf_src = m.get(\"sources\", {}).get(\"hf\", \"\")\n            downloaded = _is_downloaded(hf_src) if hf_src else False\n\n            cached_size = None\n            if downloaded and hf_src:\n                try:\n                    cached_size = _dir_size_mb(str(_model_cache_path(hf_src)))\n                except ValueError:\n                    cached_size = None\n\n            result.append({\n                \"model\": m[\"model\"],","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/odysseus-dev/odysseus/blob/f9235ebbf13f693a6fd29ce70b097f6ec83705bf/routes/embedding_routes.py#L103-L139","documentation":"503 dependency guard in list_models: the optional fastembed package is not installed in the environment, so the embeddings feature cannot enumerate supported models. It is an availability signal (HTTP 503), telling the client to install the optional embedding dependencies rather than a request error.","triggerScenarios":"Triggered when the corresponding server-side validation or runtime check at the recorded location rejects the request or operation and returns this error message to the caller.","commonSituations":"See trigger scenarios.","solutions":["Install fastembed into the server Python environment: pip install fastembed.","Install the embedding dependencies from the project's requirements file and restart."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f9235ebbf13f693a6fd29ce70b097f6ec83705bf","analyzedAt":"2026-08-14T21:47:48.359Z","contentChangedAt":"2026-08-14T21:47:48.359Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}