odysseus-dev/odysseus · error · HTTPException

Not authenticated

Error message

Not authenticated

What it means

Error "Not authenticated" thrown in odysseus-dev/odysseus.

Source

Thrown at routes/research/research_routes.py:221

            pass
    if not ep_model:
        return None
    return build_chat_url(base), ep_model, build_headers(api_key, base)


def setup_research_routes(research_handler, session_manager=None) -> APIRouter:
    router = APIRouter(tags=["research"])

    def _require_user(request: Request) -> str:
        """All research endpoints require an authenticated user. Research
        data isn't owner-scoped in the on-disk JSON yet, so we at least
        block anonymous access. Multi-tenant deploys should additionally
        verify the session belongs to this user."""
        user = get_current_user(request)
        if not user:
            if _auth_disabled():
                return ""
            raise HTTPException(401, "Not authenticated")
        return user

    def _owns_in_memory(session_id: str, user: str) -> bool:
        """Ownership check for an in-flight (in-memory) research task.
        Falls back to the on-disk JSON if the task has already finished."""
        entry = research_handler._active_tasks.get(session_id)
        if entry is not None:
            return entry.get("owner", "") == user
        # Task no longer in memory — check the persisted JSON.
        try:
            return _find_owned_research_path(session_id, user) is not None
        except HTTPException:
            return False

    def _require_owned_or_active_research_path(session_id: str, user: str) -> Path | None:
        """Validate ownership once and return the completed on-disk path.

        Active running research has no completed disk path yet. Completed

View on GitHub (pinned to f9235ebbf1)

Solutions

  1. Log in and retry the request.
  2. Refresh the page if the session expired.

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.

Understand the failure class


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