{"record":{"id":"888497573609d9e7","repo":"HKUDS/nanobot","slug":"response-failed-str-detail-500","errorCode":null,"errorMessage":"Response failed: {str(detail)[:500]}","messagePattern":"Response failed: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"nanobot/providers/openai_responses/parsing.py","lineNumber":556,"sourceCode":"            if terminal_refusal:\n                refusal_seen = True\n                remaining_text = _remaining_refusal_text(\n                    emitted_refusal_text,\n                    terminal_refusal_text,\n                )\n                content += remaining_text\n                emitted_refusal_text += remaining_text\n                if on_content_delta and remaining_text:\n                    await on_content_delta(remaining_text)\n            if not reasoning_content:\n                summary = _extract_reasoning_summary_from_output(response_obj.get(\"output\"))\n                if summary:\n                    reasoning_content = summary\n                    if on_reasoning_delta:\n                        await on_reasoning_delta(summary)\n        elif event_type in {\"error\", \"response.failed\"}:\n            detail = event.get(\"error\") or event.get(\"message\") or event\n            raise RuntimeError(f\"Response failed: {str(detail)[:500]}\")\n\n    if refusal_seen:\n        finish_reason = \"refusal\"\n    return content, tool_calls, finish_reason, usage, reasoning_content\n\n\ndef _extract_reasoning_summary_from_output(output: object) -> str | None:\n    parts: list[str] = []\n    for item in _response_object_list(output):\n        if item.get(\"type\") != \"reasoning\":\n            continue\n        content = item.get(\"content\")\n        if isinstance(content, str) and content:\n            parts.append(content)\n        elif isinstance(content, list):\n            for block in _response_object_list(cast(list[object], content)):\n                text = block.get(\"text\")\n                if isinstance(text, str) and text:","sourceCodeStart":538,"sourceCodeEnd":574,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/providers/openai_responses/parsing.py#L538-L574","documentation":"Error \"Response failed: {str(detail)[:500]}\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/providers/openai_responses/parsing.py:556 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"42f37dc4c0e409eac7818a82d165c5f2757bc075","analyzedAt":"2026-08-26T00:18:52.276Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}