Fix terminal tool passed to claude 3.7 sonnet as anthropic operator

This commit is contained in:
Debanjum
2025-06-01 16:55:17 -07:00
parent ddf028f7af
commit 3fb8f77cd5

View File

@@ -505,7 +505,7 @@ class AnthropicOperatorAgent(OperatorAgent):
elif tool_type == "editor": elif tool_type == "editor":
return {"name": "str_replace_editor", "type": "text_editor_20250124"} return {"name": "str_replace_editor", "type": "text_editor_20250124"}
elif tool_type == "terminal": elif tool_type == "terminal":
return {"name": "bash_20250124", "type": "bash"} return {"name": "bash", "type": "bash_20250124"}
elif self.vision_model.name.startswith("claude-sonnet-4") or self.vision_model.name.startswith("claude-opus-4"): elif self.vision_model.name.startswith("claude-sonnet-4") or self.vision_model.name.startswith("claude-opus-4"):
if tool_type == "computer": if tool_type == "computer":
return {"name": "computer", "type": "computer_20250124"} return {"name": "computer", "type": "computer_20250124"}