Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ The following table shows which capabilities are supported by each model:
| [Gemini CU Preview](https://ai.google.dev/gemini-api/docs/computer-use) | 🖥️ | 🎯 | | 👁️ |
| [InternVL](https://huggingface.co/OpenGVLab/InternVL3_5-1B) | 🖥️ | 🎯 | 🛠️ | 👁️ |
| [UI-TARS](https://huggingface.co/ByteDance-Seed/UI-TARS-1.5-7B) | 🖥️ | 🎯 | 🛠️ | 👁️ |
| [UI-TARS-2](https://cua.ai/dashboard/vlm-router) | 🖥️ | 🎯 | 🛠️ | 👁️ |
| [OpenCUA](https://huggingface.co/xlangai/OpenCUA-7B) | | 🎯 | | |
| [GTA](https://huggingface.co/HelloKKMe/GTA1-7B) | | 🎯 | | |
| [Holo](https://huggingface.co/Hcompany/Holo1.5-3B) | | 🎯 | | |
Expand Down Expand Up @@ -264,6 +265,7 @@ agent = ComputerAgent(model="moondream3+openai/gpt-4o")
| [Gemini CU Preview](https://ai.google.dev/gemini-api/docs/computer-use) | `gemini-2.5-computer-use-preview` |
| [InternVL](https://huggingface.co/OpenGVLab/InternVL3_5-1B) | `huggingface-local/OpenGVLab/InternVL3_5-{1B,2B,4B,8B,...}` |
| [UI-TARS](https://huggingface.co/ByteDance-Seed/UI-TARS-1.5-7B) | `huggingface-local/ByteDance-Seed/UI-TARS-1.5-7B` |
| [UI-TARS-2](https://cua.ai/dashboard/vlm-router) | `cua/bytedance/ui-tars-2` |
| [OpenCUA](https://huggingface.co/xlangai/OpenCUA-7B) | `huggingface-local/xlangai/OpenCUA-{7B,32B}` |
| [GTA](https://huggingface.co/HelloKKMe/GTA1-7B) | `huggingface-local/HelloKKMe/GTA1-{7B,32B,72B}` |
| [Holo](https://huggingface.co/Hcompany/Holo1.5-3B) | `huggingface-local/Hcompany/Holo1.5-{3B,7B,72B}` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,18 @@ async for _ in agent.run("Open the settings menu and change the theme to dark mo
pass
```

## UI-TARS-2

Next‑generation UI‑TARS via Cua Router:

- `cua/bytedance/ui-tars-2`

```python
agent = ComputerAgent("cua/bytedance/ui-tars-2", tools=[computer])
async for _ in agent.run("Open a browser and search for Python tutorials"):
pass
```

---

CUAs also support direct click prediction. See [Grounding Models](./grounding-models) for details on `predict_click()`.
Expand Down
40 changes: 19 additions & 21 deletions libs/python/agent/agent/adapters/cua_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,28 @@ def _normalize_model(self, model: str) -> str:
return model.split("/", 1)[1] if model and model.startswith("cua/") else model

def completion(self, *args, **kwargs) -> ModelResponse:
params = dict(kwargs)
inner_model = self._normalize_model(params.get("model", ""))
params.update(
{
"model": f"openai/{inner_model}",
"api_base": self.base_url,
"api_key": self.api_key,
"stream": False,
}
)
params = {
"model": f"openai/{self._normalize_model(kwargs.get("model", ""))}",
"messages": kwargs.get("messages", []),
"api_base": self.base_url,
"api_key": self.api_key,
"stream": False,
}

return completion(**params) # type: ignore

async def acompletion(self, *args, **kwargs) -> ModelResponse:
params = dict(kwargs)
inner_model = self._normalize_model(params.get("model", ""))
params.update(
{
"model": f"openai/{inner_model}",
"api_base": self.base_url,
"api_key": self.api_key,
"stream": False,
}
)
return await acompletion(**params) # type: ignore
params = {
"model": f"openai/{self._normalize_model(kwargs.get("model", ""))}",
"messages": kwargs.get("messages", []),
"api_base": self.base_url,
"api_key": self.api_key,
"stream": False,
}

response = await acompletion(**params) # type: ignore

return response

def streaming(self, *args, **kwargs) -> Iterator[GenericStreamingChunk]:
params = dict(kwargs)
Expand Down
2 changes: 2 additions & 0 deletions libs/python/agent/agent/loops/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
qwen,
uiins,
uitars,
uitars2,
)

__all__ = [
Expand All @@ -37,4 +38,5 @@
"qwen",
"uiins",
"gelato",
"uitars2",
]
2 changes: 1 addition & 1 deletion libs/python/agent/agent/loops/uitars.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ def convert_uitars_messages_to_litellm(messages: Messages) -> List[Dict[str, Any
return litellm_messages


@register_agent(models=r"(?i).*ui-?tars.*")
@register_agent(models=r"(?i).*ui-?tars.*", priority=-1)
class UITARSConfig:
"""
UITARS agent configuration using liteLLM for ByteDance-Seed/UI-TARS-1.5-7B model.
Expand Down
Loading
Loading