add qwen docs

This commit is contained in:
Sarina Li
2025-11-26 15:23:48 -05:00
parent 6bd304e7ee
commit 8bcb836cd8
4 changed files with 735 additions and 701 deletions

View File

@@ -77,10 +77,10 @@ async for _ in agent.run("Open Firefox and navigate to github.com"):
Qwen3 VL family:
- `openrouter/qwen/qwen3-vl-235b-a22b-instruct`
- `cua/qwen/qwen3-vl-235b` (via CUA VLM Router - recommended)
```python
agent = ComputerAgent("openrouter/qwen/qwen3-vl-235b-a22b-instruct", tools=[computer])
agent = ComputerAgent("cua/qwen/qwen3-vl-235b", tools=[computer])
async for _ in agent.run("Open Firefox and navigate to github.com"):
pass
```

View File

@@ -55,10 +55,12 @@ async for result in agent.run(messages):
The CUA VLM Router currently supports these models:
| Model ID | Provider | Description | Best For |
| --------------------------------- | --------- | ----------------- | ---------------------------------- |
| `cua/anthropic/claude-sonnet-4.5` | Anthropic | Claude Sonnet 4.5 | General-purpose tasks, recommended |
| `cua/anthropic/claude-haiku-4.5` | Anthropic | Claude Haiku 4.5 | Fast responses, cost-effective |
| Model ID | Provider | Description | Best For |
| --------------------------------- | --------- | ----------------- | --------------------------------------- |
| `cua/anthropic/claude-sonnet-4.5` | Anthropic | Claude Sonnet 4.5 | General-purpose tasks, recommended |
| `cua/anthropic/claude-opus-4.5` | Anthropic | Claude Opus 4.5 | Enhanced agentic and computer-use tasks |
| `cua/anthropic/claude-haiku-4.5` | Anthropic | Claude Haiku 4.5 | Fast responses, cost-effective |
| `cua/qwen/qwen3-vl-235b` | Qwen | Qwen3 VL 235B | Large-scale vision-language tasks |
## How It Works
@@ -347,6 +349,52 @@ agent = ComputerAgent(
)
```
### Using Qwen3 VL 235B
```python
from agent import ComputerAgent
from computer import Computer
computer = Computer(os_type="linux", provider_type="docker")
agent = ComputerAgent(
model="cua/qwen/qwen3-vl-235b",
tools=[computer],
only_n_most_recent_images=3
)
messages = [{"role": "user", "content": "Open a browser and search for Python tutorials"}]
async for result in agent.run(messages):
print(result)
```
### Using Claude Opus 4.5
```python
from agent import ComputerAgent
from computer import Computer
computer = Computer(
os_type="linux",
provider_type="cloud",
name="your-container-name",
api_key="your-cua-api-key"
)
agent = ComputerAgent(
model="cua/anthropic/claude-opus-4.5",
tools=[computer],
instructions="You are a helpful assistant that can control computers",
only_n_most_recent_images=3
)
messages = [{"role": "user", "content": "Open a browser and search for Python tutorials"}]
async for result in agent.run(messages):
print(result)
```
## Migration from Direct Provider Access
Switching from direct provider access (BYOK) to CUA VLM Router is simple:

View File

@@ -367,7 +367,9 @@ Choose how you want to access vision-language models for your agent:
**Available CUA models:**
- `cua/anthropic/claude-sonnet-4.5` - Claude Sonnet 4.5 (recommended)
- `cua/anthropic/claude-haiku-4.5` - Claude Haiku 4.5 (faster)
- `cua/anthropic/claude-opus-4.5` - Claude Opus 4.5 (enhanced agentic capabilities)
- `cua/anthropic/claude-haiku-4.5` - Claude Haiku 4.5 (faster, cost-effective)
- `cua/qwen/qwen3-vl-235b` - Qwen3 VL 235B (large-scale vision-language tasks)
**Benefits:**
- Single API key for multiple providers

File diff suppressed because it is too large Load Diff