odysseus-dev/odysseus · error · HTTPException

fastembed is not installed

Error message

fastembed is not installed

What it means

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.

Solutions

  1. Install fastembed into the server Python environment: pip install fastembed.
  2. Install the embedding dependencies from the project's requirements file and restart.
Defensive patterns

Strategy: fallback

When it happens

Trigger: 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.

Common situations: See trigger scenarios.


AI-assisted analysis of odysseus-dev/odysseus@f9235ebbf1 (2026-08-14). Data as JSON: /api/errors/95c5fc743e25cfb7. Report an issue: GitHub.

Appendix: source

Thrown at routes/embedding_routes.py:121

        pass
    return {}


def _save_custom_endpoint(data: dict):
    Path(_ENDPOINT_FILE).parent.mkdir(parents=True, exist_ok=True)
    Path(_ENDPOINT_FILE).write_text(json.dumps(data, indent=2), encoding="utf-8")


def setup_embedding_routes():
    router = APIRouter(prefix="/api/embeddings", dependencies=[Depends(require_admin)])

    @router.get("/models")
    def list_models():
        """List all available fastembed models with download status."""
        try:
            from fastembed import TextEmbedding
        except ImportError:
            raise HTTPException(503, "fastembed is not installed")

        active = _active_model()
        catalog = TextEmbedding.list_supported_models()
        result = []

        for m in catalog:
            hf_src = m.get("sources", {}).get("hf", "")
            downloaded = _is_downloaded(hf_src) if hf_src else False

            cached_size = None
            if downloaded and hf_src:
                try:
                    cached_size = _dir_size_mb(str(_model_cache_path(hf_src)))
                except ValueError:
                    cached_size = None

            result.append({
                "model": m["model"],

View on GitHub (pinned to f9235ebbf1)