change default model

This commit is contained in:
Sarina Li
2025-11-11 15:52:47 -05:00
parent 2f64c11966
commit a8d21ae77b
11 changed files with 35 additions and 38 deletions

View File

@@ -117,7 +117,7 @@ from agent import ComputerAgent
# ComputerAgent works with any computer initialized with the Computer SDK
agent = ComputerAgent(
model="anthropic/claude-3-5-sonnet-20241022",
model="anthropic/claude-sonnet-4-5-20250929",
tools=[computer],
max_trajectory_budget=5.0
)

View File

@@ -268,7 +268,7 @@ from agent import ComputerAgent
async def run_multi_task_workflow():
async with Computer() as macos_computer:
agent = ComputerAgent(
model="anthropic/claude-3-5-sonnet-20241022",
model="anthropic/claude-sonnet-4-5-20250929",
tools=[macos_computer]
)

View File

@@ -34,7 +34,7 @@ You can then use this as a tool for your agent:
from agent import ComputerAgent
agent = ComputerAgent(
model="anthropic/claude-3-5-sonnet-20241022",
model="anthropic/claude-sonnet-4-5-20250929",
tools=[custom_computer],
)
@@ -122,7 +122,7 @@ class MyCustomComputer(AsyncComputerHandler):
custom_computer = MyCustomComputer()
agent = ComputerAgent(
model="anthropic/claude-3-5-sonnet-20241022",
model="anthropic/claude-sonnet-4-5-20250929",
tools=[custom_computer],
)

View File

@@ -16,7 +16,7 @@ def calculate(a: int, b: int) -> int:
# Use with agent
agent = ComputerAgent(
model="anthropic/claude-3-5-sonnet-20241022",
model="anthropic/claude-sonnet-4-5-20250929",
tools=[computer, calculate]
)
```
@@ -43,7 +43,7 @@ from computer import Computer
computer = Computer(...)
agent = ComputerAgent(
model="anthropic/claude-3-5-sonnet-20241022",
model="anthropic/claude-sonnet-4-5-20250929",
tools=[computer, read_file],
)
```

View File

@@ -65,16 +65,31 @@ computer = Computer(telemetry_enabled=False)
```python
from agent import ComputerAgent
import os
# Basic telemetry - performance metrics only (opt-out, enabled by default)
agent = ComputerAgent(
model="claude-sonnet-4-5-20250929",
telemetry_enabled=True # Default is True
)
# Enable telemetry with full conversation trajectory logging (opt-in)
agent = ComputerAgent(
model="claude-sonnet-4-5-20250929",
telemetry_enabled={
"log_trajectory": True # Logs full conversation items
}
)
# Disable completely
agent = ComputerAgent(
model="claude-3-5-sonnet-20241022",
model="claude-sonnet-4-5-20250929",
telemetry_enabled=False
)
# Enable trajectory logging (opt-in)
agent = ComputerAgent(
model="claude-3-5-sonnet-20241022",
model="claude-sonnet-4-5-20250929",
telemetry_enabled={"log_trajectory": True}
)
```

View File

@@ -76,7 +76,7 @@ verbosity=logging.INFO,
) as computer:
agent = ComputerAgent(
model="anthropic/claude-3-5-sonnet-20241022",
model="anthropic/claude-sonnet-4-5-20250929",
tools=[computer],
only_n_most_recent_images=3,
verbosity=logging.INFO,
@@ -189,7 +189,7 @@ verbosity=logging.INFO,
) as computer:
agent = ComputerAgent(
model="anthropic/claude-3-5-sonnet-20241022",
model="anthropic/claude-sonnet-4-5-20250929",
tools=[computer],
only_n_most_recent_images=3,
verbosity=logging.INFO,
@@ -293,7 +293,7 @@ verbosity=logging.INFO,
) as computer:
agent = ComputerAgent(
model="anthropic/claude-3-5-sonnet-20241022",
model="anthropic/claude-sonnet-4-5-20250929",
tools=[computer],
only_n_most_recent_images=3,
verbosity=logging.INFO,
@@ -400,7 +400,7 @@ verbosity=logging.INFO,
) as computer:
agent = ComputerAgent(
model="anthropic/claude-3-5-sonnet-20241022",
model="anthropic/claude-sonnet-4-5-20250929",
tools=[computer],
only_n_most_recent_images=3,
verbosity=logging.INFO,

View File

@@ -303,7 +303,7 @@ Then, use the `ComputerAgent` object:
from agent import ComputerAgent
agent = ComputerAgent(
model="anthropic/claude-3-5-sonnet-20241022",
model="anthropic/claude-sonnet-4-5-20250929",
tools=[computer],
max_trajectory_budget=5.0
)

View File

@@ -45,7 +45,7 @@ async def run_agent_example():
# model="anthropic/claude-opus-4-20250514",
# model="anthropic/claude-sonnet-4-20250514",
# model="anthropic/claude-3-7-sonnet-20250219",
# model="anthropic/claude-3-5-sonnet-20241022",
# model="anthropic/claude-sonnet-4-5-20250929",
# == UI-TARS ==
# model="huggingface-local/ByteDance-Seed/UI-TARS-1.5-7B",
# model="mlx/mlx-community/UI-TARS-1.5-7B-6bit",

View File

@@ -6,7 +6,7 @@ Usage:
Examples:
python -m agent.cli openai/computer-use-preview
python -m agent.cli anthropic/claude-3-5-sonnet-20241022
python -m agent.cli anthropic/claude-sonnet-4-5-20250929
python -m agent.cli omniparser+anthropic/claude-3-5-sonnet-20241022
"""
@@ -232,7 +232,7 @@ async def main():
epilog="""
Examples:
python -m agent.cli openai/computer-use-preview
python -m agent.cli anthropic/claude-3-5-sonnet-20241022
python -m agent.cli anthropic/claude-sonnet-4-5-20250929
python -m agent.cli omniparser+anthropic/claude-3-5-sonnet-20241022
python -m agent.cli huggingface-local/ByteDance-Seed/UI-TARS-1.5-7B
""",
@@ -240,7 +240,7 @@ Examples:
parser.add_argument(
"model",
help="Model string (e.g., 'openai/computer-use-preview', 'anthropic/claude-3-5-sonnet-20241022')",
help="Model string (e.g., 'openai/computer-use-preview', 'anthropic/claude-sonnet-4-5-20250929')",
)
parser.add_argument(

View File

@@ -430,14 +430,7 @@
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"anthropic_agent = ComputerAgent(\n",
" tools=[computer],\n",
" model=\"anthropic/claude-3-5-sonnet-20241022\",\n",
" trajectory_dir=str(Path(\"trajectories\")),\n",
" verbosity=logging.INFO\n",
")\n"
]
"source": "anthropic_agent = ComputerAgent(\n tools=[computer],\n model=\"anthropic/claude-sonnet-4-5-20250929\",\n trajectory_dir=str(Path(\"trajectories\")),\n verbosity=logging.INFO\n)\n"
},
{
"cell_type": "markdown",

View File

@@ -148,18 +148,7 @@
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from agent.callbacks import ImageRetentionCallback, TrajectorySaverCallback\n",
"\n",
"agent_with_callbacks = ComputerAgent(\n",
" model=\"anthropic/claude-3-5-sonnet-20241022\",\n",
" tools=[computer],\n",
" callbacks=[\n",
" ImageRetentionCallback(only_n_most_recent_images=3),\n",
" TrajectorySaverCallback(\"./trajectories\"),\n",
" ],\n",
")\n"
]
"source": "from agent.callbacks import ImageRetentionCallback, TrajectorySaverCallback\n\nagent_with_callbacks = ComputerAgent(\n model=\"anthropic/claude-sonnet-4-5-20250929\",\n tools=[computer],\n callbacks=[\n ImageRetentionCallback(only_n_most_recent_images=3),\n TrajectorySaverCallback(\"./trajectories\"),\n ],\n)\n"
},
{
"cell_type": "markdown",
@@ -198,4 +187,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}