fix: use _request_raw error handling for version endpoint

This commit is contained in:
ravivarmanr26
2026-04-13 23:45:49 +05:30
parent dbf9e4405d
commit 40ca3c9300
-7
View File
@@ -634,9 +634,6 @@ class Client(BaseClient):
'GET', 'GET',
'/api/version' '/api/version'
) )
if r.status_code != 200:
raise Exception(f"Request failed: {r.status_code}")
return r.json().get('version', '') return r.json().get('version', '')
def delete(self, model: str) -> StatusResponse: def delete(self, model: str) -> StatusResponse:
@@ -1285,10 +1282,6 @@ class AsyncClient(BaseClient):
'GET', 'GET',
'/api/version', '/api/version',
) )
if r.status_code != 200:
raise Exception(f"Request failed: {r.status_code}")
return r.json().get('version', '') return r.json().get('version', '')