tinyhumansai/openhuman · error · Error
OpenAI Responses API timed out after ${timeoutMs}ms
Error message
OpenAI Responses API timed out after ${timeoutMs}ms What it means
The fetch() to https://api.openai.com/v1/responses was aborted by the script's own AbortController after 300_000 ms (5 minutes); the resulting AbortError is caught and rethrown as this timeout error. Note the payload is already bounded to MAX_PROMPT_CHARS = 120_000, so this is wall-clock latency, not unbounded input.
Source
Thrown at scripts/release/generate-release-notes.mjs:492
}
const timeoutMs = 300_000;
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), timeoutMs);
let response;
try {
response = await fetch('https://api.openai.com/v1/responses', {
method: 'POST',
signal: controller.signal,
headers: {
Authorization: `Bearer ${key}`,
'Content-Type': 'application/json',
},
body: JSON.stringify(request),
});
} catch (error) {
if (error?.name === 'AbortError') {
throw new Error(`OpenAI Responses API timed out after ${timeoutMs}ms`);
}
throw error;
} finally {
clearTimeout(timeout);
}
const body = await response.text();
let json = null;
try {
json = JSON.parse(body);
} catch {
// Keep the raw body in the error below.
}
if (!response.ok) {
const message = json?.error?.message || body;
throw new Error(`OpenAI Responses API failed (${response.status}): ${message}`);
}View on GitHub (pinned to a221052e0d)
Solutions
- Re-run — transient stalls are the most common cause
- Shrink the range: --from a more recent tag so fewer PRs are summarized
- Use --no-ai to render deterministic notes without calling OpenAI
- Check https://status.openai.com if it reproducibly times out on small ranges
Example fix
# before node scripts/release/generate-release-notes.mjs --from v0.50.0 # 300s timeout over a huge range # after node scripts/release/generate-release-notes.mjs --from v0.58.0 # smaller window # or node scripts/release/generate-release-notes.mjs --from v0.50.0 --no-ai
Defensive patterns
Strategy: retry
Validate before calling
# bound the work before calling the API — huge ranges are the usual timeout cause
count=$(git rev-list --count "${FROM}..${TO}")
if [ "$count" -gt 300 ]; then
echo "$count commits — using --no-ai" >&2
exec node scripts/release/generate-release-notes.mjs --from "$FROM" --to "$TO" --no-ai
fi Try / catch
for attempt in 1 2; do
node scripts/release/generate-release-notes.mjs --from "$FROM" && break
[ "$attempt" -eq 2 ] && { echo 'generation failed twice' >&2; exit 1; }
echo 'retrying after timeout...' >&2; sleep 60
done Prevention
- keep release ranges small; cut releases more often
- default to --no-ai in latency-sensitive CI lanes
- wrap invocation in a bounded retry with backoff
When it happens
Trigger: A large release range producing a long generation that exceeds 5 minutes; a network stall between the runner and api.openai.com; OpenAI-side degradation on long completions.
Common situations: Big-bang merges producing hundreds of PRs in one range; CI runners with constrained or proxied egress; retrying during an OpenAI incident window.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- Request timed out. Please try again.
- [transport:cloud] ${method} timed out after ${this.timeoutMs
- [transport:lan] ${method} timed out after ${this.timeoutMs}m
- RPC ${method} timed out after ${timeoutMs}ms
- RPC ${method} timed out after ${timeoutMs}ms
AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16).
Data as JSON: /api/errors/9af5522732511730.
Report an issue: GitHub.