Skip to content

Commit be1465f

Browse files
Update openhands-sdk/openhands/sdk/agent/agent.py
Co-authored-by: OpenHands Bot <contact@all-hands.dev>
1 parent f4a8219 commit be1465f

File tree

1 file changed

+6
-6
lines changed
  • openhands-sdk/openhands/sdk/agent

1 file changed

+6
-6
lines changed

openhands-sdk/openhands/sdk/agent/agent.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -877,12 +877,12 @@ def _get_action_event(
877877
action: Action = tool.action_from_arguments(arguments)
878878
except (json.JSONDecodeError, ValidationError, ValueError) as e:
879879
# Build concise error message with parameter names only (not values)
880-
# to avoid wasting LLM context on large payloads
881-
keys = list(parsed_args.keys()) if isinstance(parsed_args, dict) else None
882-
params = (
883-
f"Parameters provided: {keys}"
884-
if keys
885-
else "Arguments: unparseable JSON"
880+
keys = list(parsed_args.keys()) if isinstance(parsed_args, dict) else None
881+
params = (
882+
f"Parameters provided: {keys}"
883+
if keys is not None
884+
else "Arguments: unparseable JSON"
885+
)
886886
)
887887
err = f"Error validating tool '{tool.name}': {e}. {params}"
888888
# Persist assistant function_call so next turn has matching call_id

0 commit comments

Comments
 (0)