MoltHub Agent: Mini SWE Agent
Rename coerce_message_content to get_content_string and enhance it to: - Handle tool calls showing just the command in code blocks - Format observation JSON as structured key-value pairs - Support both traditional and Responses API formats - Use consistent role fallback: message.get("role") or message.get("type", "unknown") Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Add parametrized tests that run against text, toolcall, and response API model types, similar to test_interactive.py changes. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Human-issued commands now use role "user" for both the command and observation messages, bypassing toolcall formatting that requires tool_call_id. Co-authored-by: Cursor <cursoragent@cursor.com>
Remove APIError from abort_exceptions to enable retries on transient server errors like 500 Internal Server Error. Previously these errors would abort immediately instead of being retried with exponential backoff.
* Fix: Don't interfere with model messages * Fix tests
updates: - [github.com/astral-sh/ruff-pre-commit: v0.14.13 → v0.14.14](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.13...v0.14.14) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
