Checkpoint rendered cases before solving

This commit is contained in:
2026-09-23 00:27:30 +08:00
parent afcd6c614e
commit b645190ea5
5 changed files with 31 additions and 4 deletions
+4 -3
View File
@@ -2,6 +2,7 @@ from __future__ import annotations
import json
import os
import socket
import urllib.error
import urllib.request
from dataclasses import dataclass
@@ -109,7 +110,7 @@ class LLMClient:
{"role": "system", "content": system},
{"role": "user", "content": user},
],
"max_output_tokens": 1200,
"max_output_tokens": 512,
}
else:
path = "/chat/completions"
@@ -119,7 +120,7 @@ class LLMClient:
{"role": "system", "content": system},
{"role": "user", "content": user},
],
"max_tokens": 1200,
"max_tokens": 512,
}
return self._post(path, body)
@@ -141,7 +142,7 @@ class LLMClient:
raise RuntimeError(f"LLM API returned HTTP {exc.code}: {detail}") from exc
except urllib.error.URLError as exc:
raise RuntimeError(f"LLM API request failed: {exc.reason}") from exc
except TimeoutError as exc:
except (TimeoutError, socket.timeout) as exc:
raise RuntimeError(
f"LLM API request timed out after {self.config.timeout_seconds} seconds"
) from exc