-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable computer tool support in claude-3-7-sonnet. #1413
base: main
Are you sure you want to change the base?
Conversation
@@ -226,6 +226,7 @@ def model_call() -> ModelCall: | |||
extra_headers = headers | {HttpxTimeTracker.REQUEST_ID_HEADER: request_id} | |||
if computer_use: | |||
betas.append("computer-use-2024-10-22") | |||
betas.append("computer-use-2025-01-24") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probably make this conditional based on self.is_thinking_model()
(or do be more paranoid add an is_claude_3_7()
method to match the is_claude_3_5()
one we have).
# check for compatible 'computer' tool | ||
if tool.name == "computer" and ( | ||
sorted(tool.parameters.properties.keys()) | ||
== sorted(["action", "coordinate", "text"]) | ||
): | ||
return ComputerUseToolParam( | ||
type="computer_20241022", | ||
type="computer_20250124" | ||
if model.startswith("claude-3-7-sonnet") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we could pass self
and use our accessors to sort out versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol. it's a class. 🤦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, notice though all the functions are NOT members! (that would have been too gross)
With this change the old tool signature + description is still used in the transcript. ![]() ![]() I guess it comes from the docstring in src/inspect_ai/tool/_tools/_computer/_computer.py. I can't think of an elegant solution (maybe @jjallaire-aisi can 😁). It's not critical as it doesn't impact behaviour as far as I can tell. |
@AlexLloyd0 That should either: (a) Not appear at all for Claude 3.7 (since we use their tool definition); or We'll sort this out. |
This PR contains:
What is the current behavior? (You can also link to an open issue here)
What is the new behavior?
hold_key
left_mouse_down
left_mouse_up
triple_click
scroll
wait
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
Other information: