{"record":{"id":"aea3d66f2295ef66","repo":"odysseus-dev/odysseus","slug":"model-endpoint-error-message-base-url-ping","errorCode":null,"errorMessage":"_model_endpoint_error_message(base_url, ping)","messagePattern":"_model_endpoint_error_message\\(base_url, ping\\)","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"routes/model_routes.py","lineNumber":2144,"sourceCode":"                        getattr(existing, \"hidden_models\", None),\n                        existing.pinned_models,\n                    ),\n                    \"pinned_models\": _existing_pinned,\n                    \"online\": True,\n                    \"status\": \"online\",\n                    \"existing\": True,\n                    \"endpoint_kind\": existing_kind,\n                    \"category\": _classify_endpoint(existing.base_url, existing_kind),\n                }\n        finally:\n            _db_dedup.close()\n\n        model_ids = _probe_endpoint(base_url, api_key.strip() or None, timeout=explicit_timeout) if should_probe else []\n        ping = {\"reachable\": False, \"error\": None}\n        if (should_probe or requested_kind in (\"api\", \"proxy\")) and not model_ids:\n            ping = _ping_endpoint(base_url, api_key.strip() or None, timeout=min(explicit_timeout, 10.0))\n        if require_model_list and not model_ids:\n            raise HTTPException(400, _model_endpoint_error_message(base_url, ping))\n\n        ep_id = str(uuid.uuid4())[:8]\n        db = SessionLocal()\n        try:\n            _st_raw = (supports_tools or \"\").strip().lower()\n            _st = True if _st_raw in (\"true\", \"1\", \"yes\") else (False if _st_raw in (\"false\", \"0\", \"no\") else None)\n            _pinned = _normalize_model_ids(pinned_models)\n            # Stamp owner so the picker only shows this endpoint to the admin\n            # who added it. Pass `shared=true` to mark it null-owner (visible\n            # to all users), preserving the pre-fix \"everyone sees everything\"\n            # behaviour for endpoints the admin explicitly intends to share.\n            from src.auth_helpers import get_current_user as _gcu\n            _shared_flag = (shared or \"\").strip().lower() in (\"true\", \"1\", \"yes\")\n            _owner_val = None if _shared_flag else (_gcu(request) or None)\n            ep = ModelEndpoint(\n                id=ep_id,\n                name=name.strip(),\n                base_url=base_url,","sourceCodeStart":2126,"sourceCodeEnd":2162,"githubUrl":"https://github.com/odysseus-dev/odysseus/blob/f9235ebbf13f693a6fd29ce70b097f6ec83705bf/routes/model_routes.py#L2126-L2162","documentation":"Error \"_model_endpoint_error_message(base_url, ping)\" 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":["Fix the endpoint according to the ping error message returned.","Verify the endpoint URL, credentials, and that the server is running."],"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"}