Refactor API client to remove unsupported endpoints and improve error handling for unexpected response types

This commit is contained in:
techartdev
2026-02-20 13:35:23 +02:00
parent e9cd5e1fff
commit 65e6336f80
4 changed files with 39 additions and 72 deletions
+3 -2
View File
@@ -53,7 +53,8 @@ ATTR_MODEL = "model"
ATTR_TIMESTAMP = "timestamp"
# API endpoints
API_STATUS = "/api/status"
API_SESSIONS = "/api/sessions"
# The OpenClaw gateway exposes only the OpenAI-compatible endpoints.
# /api/status and /api/sessions do not exist — the gateway returns its SPA
# home page (text/html) for any unrecognised route.
API_MODELS = "/v1/models"
API_CHAT_COMPLETIONS = "/v1/chat/completions"