{"record":{"id":"871a80ea61068565","repo":"Significant-Gravitas/AutoGPT","slug":"otto-service-is-not-configured","errorCode":null,"errorMessage":"Otto service is not configured","messagePattern":"Otto service is not configured","errorType":"http","errorClass":"HTTPException","httpStatus":503,"severity":"error","filePath":"autogpt_platform/backend/backend/api/features/otto/service.py","lineNumber":76,"sourceCode":"            return GraphData(\n                nodes=nodes_data,\n                edges=[],\n                graph_name=graph.name,\n                graph_description=graph.description,\n            )\n        except Exception as e:\n            logger.error(f\"Failed to fetch graph data: {str(e)}\")\n            return None\n\n    @staticmethod\n    async def ask(request: ChatRequest, user_id: str) -> ApiResponse:\n        \"\"\"\n        Send request to Otto API and handle the response.\n        \"\"\"\n        # Check if Otto API URL is configured\n        if not OTTO_API_URL:\n            logger.error(\"Otto API URL is not configured\")\n            raise HTTPException(\n                status_code=503, detail=\"Otto service is not configured\"\n            )\n\n        try:\n            async with aiohttp.ClientSession() as session:\n                headers = {\n                    \"Content-Type\": \"application/json\",\n                    \"Accept\": \"application/json\",\n                }\n\n                # If graph data is requested, fetch it\n                graph_data = await OttoService._fetch_graph_data(request, user_id)\n\n                # Prepare the payload with optional graph data\n                payload = {\n                    \"query\": request.query,\n                    \"conversation_history\": [\n                        msg.model_dump() for msg in request.conversation_history","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/backend/backend/api/features/otto/service.py#L58-L94","documentation":"Thrown by OttoService.ask when the OTTO_API_URL setting is empty — the backend cannot proxy chat requests to Otto because no upstream endpoint is configured. It is a 503 signalling server-side misconfiguration, not a client error.","triggerScenarios":"Calling the Otto chat endpoint on a deployment where the OTTO_API_URL environment variable / setting was never set, was cleared during a config refactor, or where the settings loader failed to read it (e.g. .env not loaded in the container).","commonSituations":"Local dev environments without Otto configured; staging/production deployments missing the env var after infra changes; the secret/settings provider returning None for the key.","solutions":["Set OTTO_API_URL in the backend environment (.env or deployment config) to the Otto API endpoint.","Restart/redeploy the backend so settings are re-read.","Verify with a quick settings dump or log check that the value is non-empty at startup.","If Otto is intentionally disabled in an environment, disable/hide the chat UI so users don't hit the 503."],"exampleFix":"# before — env missing\n# OTTO_API_URL=\n# after\nOTTO_API_URL=https://otto.internal.example.com/chat","handlingStrategy":"validation","validationCode":"import { settings } from '@/config';\nexport function assertOttoConfigured() {\n  if (!settings.OTTO_API_URL) throw new Error('OTTO_API_URL is not set — Otto chat disabled');\n}","typeGuard":"const ottoConfigured = (): boolean => Boolean(process.env.OTTO_API_URL);","tryCatchPattern":"try { await otto.ask(req); }\ncatch (e) {\n  if (e.status === 503 && e.detail === 'Otto service is not configured') {\n    hideOttoUi(); // feature legitimately unavailable here\n  } else throw e;\n}","preventionTips":["Add a startup check that logs a loud warning when OTTO_API_URL is empty.","Gates the chat UI behind a feature flag tied to Otto being configured.","Include Otto config in deployment checklists/env templates."],"tags":["configuration","http-503","otto","environment"],"backgroundTag":null,"analyzedSha":"9c8bb5550f446ba5d3046b78896578742495b3cf","analyzedAt":"2026-08-14T17:17:21.957Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}