{"record":{"id":"8498e26ea38ba189","repo":"ZhuLinsen/daily_stock_analysis","slug":"unsafe-config-8498e2","errorCode":"unsafe_config","errorMessage":"unsafe_config at configuration for backend {backend}","messagePattern":"unsafe_config at configuration for backend (.+?)","errorType":"error_code","errorClass":"GenerationError","httpStatus":null,"severity":"error","filePath":"src/services/generation_backend_status_service.py","lineNumber":368,"sourceCode":"    ) -> _SmokeRequest:\n        config = self._build_backend_config()\n        requested_backend = normalize_backend_id(backend_id, default=resolve_generation_backend_id(config))\n        if requested_backend not in SUPPORTED_GENERATION_BACKENDS:\n            raise GenerationError(\n                error_code=GenerationErrorCode.BACKEND_NOT_CONFIGURED,\n                stage=\"configuration\",\n                retryable=False,\n                fallbackable=False,\n                backend=requested_backend,\n                details={\n                    \"field\": \"backend_id\",\n                    \"requested_backend\": requested_backend,\n                    \"supported_backends\": sorted(SUPPORTED_GENERATION_BACKENDS),\n                },\n            )\n        normalized_mode = str(mode or \"json\").strip().lower() or \"json\"\n        if normalized_mode not in {\"text\", \"json\"}:\n            raise GenerationError(\n                error_code=GenerationErrorCode.UNSAFE_CONFIG,\n                stage=\"configuration\",\n                retryable=False,\n                fallbackable=False,\n                backend=requested_backend,\n                details={\"field\": \"mode\", \"requested_mode\": mode, \"supported_modes\": [\"text\", \"json\"]},\n            )\n        timeout = _parse_smoke_timeout(timeout_seconds, backend_id=requested_backend)\n        return _SmokeRequest(backend_id=requested_backend, mode=normalized_mode, timeout_seconds=timeout)\n\n    def _run_smoke(self, request: _SmokeRequest) -> None:\n        config = self.build_effective_config(\n            backend_id=request.backend_id,\n            timeout_seconds=request.timeout_seconds,\n        )\n        preflight_error = self._cheap_check_error(request.backend_id, config)\n        if preflight_error is not None:\n            raise preflight_error","sourceCodeStart":350,"sourceCodeEnd":386,"githubUrl":"https://github.com/ZhuLinsen/daily_stock_analysis/blob/5159bd72e8373d215492dff122acc9d389e219c9/src/services/generation_backend_status_service.py#L350-L386","documentation":"Error \"unsafe_config at configuration for backend {backend}\" thrown in ZhuLinsen/daily_stock_analysis.","triggerScenarios":"Thrown at src/services/generation_backend_status_service.py:368 when the library encounters an invalid state.","commonSituations":"Reported when a generation backend configuration fails the safety checks (non-loopback URL, embedded credentials, etc.); occurs when an unsafe endpoint is configured for that backend.","solutions":["Review the backend configuration for unsafe values (non-loopback hosts, embedded credentials, invalid ports) and correct them.","Point BASE_URL at an allowed loopback address such as http://127.0.0.1:PORT/v1 if this is a local backend.","Remove userinfo, query strings, and fragments from the configured URL."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5159bd72e8373d215492dff122acc9d389e219c9","analyzedAt":"2026-08-15T01:59:36.292Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}