{"record":{"id":"9edbd7c04c3c71c9","repo":"odysseus-dev/odysseus","slug":"no-available-model-endpoint-for-auto-sort","errorCode":null,"errorMessage":"No available model endpoint for auto-sort","messagePattern":"No available model endpoint for auto-sort","errorType":"http","errorClass":"HTTPException","httpStatus":503,"severity":"error","filePath":"routes/session_routes.py","lineNumber":1204,"sourceCode":"        if len(session_list) < 2:\n            if deleted_empty or deleted_throwaway:\n                return {\n                    \"status\": \"ok\",\n                    \"updated\": 0,\n                    \"folders\": [],\n                    \"deleted_empty\": deleted_empty,\n                    \"deleted_throwaway\": deleted_throwaway,\n                    \"unfiled_remaining\": unfiled_total,\n                }\n            return {\"status\": \"skipped\", \"reason\": \"No unfiled sessions to sort\"}\n\n        # Pick an endpoint — prefer admin-configured task endpoint\n        from src.task_endpoint import resolve_task_endpoint\n        url, model, headers = resolve_task_endpoint(owner=user)\n        if not url:\n            url, model, headers = _pick_endpoint_for_sort(owner=user)\n        if not url:\n            raise HTTPException(503, \"No available model endpoint for auto-sort\")\n\n        # Build prompt\n        names_text = \"\\n\".join(f'  \"{s[\"id\"][:8]}\": \"{s[\"name\"]}\"' for s in session_list)\n        prompt = (\n            \"You are a session organizer. Group these chat sessions into folders by topic.\\n\\n\"\n            \"Rules:\\n\"\n            \"- Be aggressive about grouping — put EVERY session in a folder\\n\"\n            \"- Use short folder names (2-4 words max)\\n\"\n            \"- Use the 8-char ID prefixes exactly as given\\n\"\n            \"- Output ONLY raw JSON, no markdown fences, no explanation\\n\\n\"\n            \"Required JSON format:\\n\"\n            '{\"folders\": {\"Folder Name\": [\"id_prefix1\", \"id_prefix2\"], \"Other Folder\": [\"id_prefix3\"]}}\\n\\n'\n            f\"Sessions (id_prefix: name):\\n{{\\n{names_text}\\n}}\"\n        )\n\n        try:\n            logger.info(f\"Auto-sort: using model={model} at {url}\")\n            # 16384 (was 4096): with many chats the folder JSON is large, and a","sourceCodeStart":1186,"sourceCodeEnd":1222,"githubUrl":"https://github.com/odysseus-dev/odysseus/blob/f9235ebbf13f693a6fd29ce70b097f6ec83705bf/routes/session_routes.py#L1186-L1222","documentation":"Error \"No available model endpoint for auto-sort\" thrown in odysseus-dev/odysseus.","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":["Configure a utility model for auto-sort in Settings.","Add and enable a model endpoint that auto-sort can use."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f9235ebbf13f693a6fd29ce70b097f6ec83705bf","analyzedAt":"2026-08-14T21:47:48.359Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}