open-swe/agent
langsmith-forge[bot] 48965a82a6
fix: coerce malformed integer strings in read_file offset/limit params (#1216)
- 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>
2026-05-01 14:29:48 -07:00
..
integrations fix: lower default LangSmith sandbox size to fit "large" tier (#1226) 2026-04-30 13:24:15 -07:00
middleware fix: coerce malformed integer strings in read_file offset/limit params (#1216) 2026-05-01 14:29:48 -07:00
tools fix: warn against using http_request for GitHub PR creation (#1203) 2026-05-01 14:14:44 -07:00
utils fix: update existing PR title and body when create returns 422 (#1163) 2026-05-01 14:02:39 -07:00
encryption.py chore: Drop monorepo (#1029) 2026-03-06 16:10:34 -08:00
prompt.py fix: warn against using http_request for GitHub PR creation (#1203) 2026-05-01 14:14:44 -07:00
server.py fix: coerce malformed integer strings in read_file offset/limit params (#1216) 2026-05-01 14:29:48 -07:00
webapp.py feat: give agent ability to read cross-posted Slack message links [closes OPE-37] (#1200) 2026-04-29 17:42:27 -07:00