Commit 9eeab48
committed
fix: extract alias target from normalize_tool_call error for consistent tool names
When normalize_tool_call raises a 'Cannot infer' error (e.g., for
file_editor with empty arguments), the error message contains the
alias target name (e.g., 'file_editor'), not the original tool name
(e.g., 'str_replace'). Previously, the validation error path would
show the wrong tool name because it used the requested_tool_name.
Now we extract the alias target from the error message and use it
consistently in error messages, fixing the mismatch on the validation
error / retry path.
Co-authored-by: openhands <openhands@all-hands.dev>1 parent 8d35dee commit 9eeab48
1 file changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
913 | 914 | | |
914 | 915 | | |
915 | 916 | | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
916 | 928 | | |
917 | 929 | | |
918 | 930 | | |
919 | 931 | | |
920 | 932 | | |
921 | 933 | | |
922 | | - | |
923 | 934 | | |
924 | 935 | | |
925 | 936 | | |
| |||
0 commit comments