tinyhumansai/openhuman · error · Error

OpenAI response did not contain output text

Error message

OpenAI response did not contain output text

What it means

OpenAI returned HTTP 2xx but extractResponseText() found no usable text: output_text is not a string and no output[].content[].text entries exist, so there is nothing to turn into release notes. The parser is intentionally loose, so schema drift or non-text responses surface here rather than as a parse crash.

Source

Thrown at scripts/release/generate-release-notes.mjs:514

    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}`);
  }

  const text = extractResponseText(json);
  if (!text) {
    throw new Error('OpenAI response did not contain output text');
  }
  return text;
}

export function renderDeterministicNotes({ title, payload }) {
  const newContributors = payload.contributors.filter((contributor) => contributor.isNew);
  const newContributorsSection = newContributors.length
    ? `
## New Contributors 🌟

${newContributors.map((contributor) => renderNewContributorLine(contributor, payload.pullRequests)).join('\n')}

Hope you join the Discord for exclusive roles and contributor rewards!
`
    : '';
  const contributorLinks = payload.contributors.map((contributor) => {
    const prList = contributor.prs.map((number) => `#${number}`).join(', ');
    return `- ${contributor.name}${prList ? ` (${prList})` : ''}`;

View on GitHub (pinned to a221052e0d)

Solutions

  1. Re-run once — usually a one-off model behavior
  2. Capture the request with --dry-run and replay it (curl) to inspect the raw response shape
  3. Fall back to --no-ai for deterministic notes
  4. Pin --model to a variant known to return plain text output

Example fix

# before
node scripts/release/generate-release-notes.mjs --from v1.2.3   # 200 OK, but 'did not contain output text'

# after — deterministic output, no OpenAI dependency
node scripts/release/generate-release-notes.mjs --from v1.2.3 --no-ai
Defensive patterns

Strategy: fallback

Try / catch

markdown=$(node scripts/release/generate-release-notes.mjs --from "$FROM" 2>&1) || \
  markdown=$(node scripts/release/generate-release-notes.mjs --from "$FROM" --no-ai 2>&1) || \
  { echo 'both AI and deterministic generation failed' >&2; exit 1; }
printf '%s\n' "$markdown"

Prevention

When it happens

Trigger: The model responded with only non-text output items (reasoning-only, refusal phrasing, or an empty output array); the Responses API changed its item shape; a truncated response dropped the text items.

Common situations: A new default model emitting different item structures; rare one-off model behavior; API evolution after an OpenAI deploy — the request succeeded but the shape is not what the script extracts.

Related errors


AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16). Data as JSON: /api/errors/ef967a241e011653. Report an issue: GitHub.