mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 13:53:15 +00:00
- Root cause: LLM occasionally generates strings like '1, 80' or '170, "limit": 60' for integer fields, causing a Pydantic ValidationError and wasting an LLM turn - Change: add SanitizeToolInputsMiddleware in agent/middleware/sanitize_tool_inputs.py that extracts the leading integer from any string value in offset/limit before the call reaches Pydantic validation; registered before ToolErrorMiddleware in server.py - Verified: 14 unit tests covering all three production trace patterns pass Co-authored-by: LangSmith Forge <forge-agent@langsmith.ai> Co-authored-by: Johannes du Plessis <johannes@langchain.dev> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| check_message_queue.py | ||
| ensure_no_empty_msg.py | ||
| notify_step_limit.py | ||
| open_pr.py | ||
| sanitize_tool_inputs.py | ||
| tool_error_handler.py | ||