🙌 OpenHands: AI-Driven Development
Add claude-sonnet-latest to supported models lists (#8365)
Graham Neubig4ff43d1d9931
diff --git a/.github/workflows/openhands-resolver.yml b/.github/workflows/openhands-resolver.ymlindex cb2e784bb9..a320881d1a 100644--- a/.github/workflows/openhands-resolver.yml+++ b/.github/workflows/openhands-resolver.yml@@ -232,11 +232,11 @@ jobs:// Perform package installationif (isExperimentalLabel || isIssueCommentExperimental || isReviewCommentExperimental) {console.log("Installing experimental OpenHands...");-+await exec.exec("pip install git+https://github.com/all-hands-ai/openhands.git");} else {console.log("Installing from requirements.txt...");-+await exec.exec("pip install -r /tmp/requirements.txt");}diff --git a/docs/README.md b/docs/README.mdindex eed11fe822..45d2bf681c 100644--- a/docs/README.md+++ b/docs/README.md@@ -12,7 +12,7 @@ $ npm install$ npm run start```-This command starts a local development server and opens up a browser window.+This command starts a local development server and opens up a browser window.Most changes are reflected live without having to restart the server.Alternatively, you can pass a `--locale` argument to render a specific language in dev mode as in:diff --git a/docs/modules/usage/cloud/cloud-api.md b/docs/modules/usage/cloud/cloud-api.mdindex f7a5630b28..6d805a20b8 100644--- a/docs/modules/usage/cloud/cloud-api.md+++ b/docs/modules/usage/cloud/cloud-api.md@@ -1,6 +1,6 @@# OpenHands Cloud API-OpenHands Cloud provides a REST API that allows you to programmatically interact with the service. This is useful if+OpenHands Cloud provides a REST API that allows you to programmatically interact with the service. This is useful ifyou want to kick off your own jobs from your programs in a flexible way.This guide explains how to obtain an API key and use the API to start conversations.diff --git a/docs/modules/usage/how-to/cli-mode.md b/docs/modules/usage/how-to/cli-mode.mdindex 9d0d524613..35a16e12f9 100644--- a/docs/modules/usage/how-to/cli-mode.md+++ b/docs/modules/usage/how-to/cli-mode.md@@ -1,6 +1,6 @@# CLI Mode-CLI mode provides a powerful interactive Command-Line Interface (CLI) that lets you engage with OpenHands directly+CLI mode provides a powerful interactive Command-Line Interface (CLI) that lets you engage with OpenHands directlyfrom your terminal.This mode is different from the [headless mode](headless-mode), which is non-interactive and better for scripting.@@ -52,12 +52,12 @@ The `-e SANDBOX_USER_ID=$(id -u)` ensures files created by the agent in your wor### What is CLI Mode?-CLI mode enables real-time interaction with OpenHands agents. You can type natural language tasks, use interactive+CLI mode enables real-time interaction with OpenHands agents. You can type natural language tasks, use interactivecommands, and receive instant feedback—all inside your terminal.### Starting a Conversation-When you start the CLI, you'll see a welcome message and a prompt (`>`). Enter your first task or type a command to+When you start the CLI, you'll see a welcome message and a prompt (`>`). Enter your first task or type a command tobegin your conversation.### Available Commands@@ -76,7 +76,7 @@ You can use the following commands whenever the prompt (`>`) is displayed:#### Settings and Configuration-You can update your model, API key, agent, and other preferences interactively using the `/settings` command. Just+You can update your model, API key, agent, and other preferences interactively using the `/settings` command. Justfollow the prompts:- **Basic settings**: Choose a model/provider and enter your API key.@@ -86,12 +86,12 @@ Settings can also be managed via the `config.toml` file.#### Repository Initialization-The `/init` command helps the agent understand your project by creating a `.openhands/microagents/repo.md` file with+The `/init` command helps the agent understand your project by creating a `.openhands/microagents/repo.md` file withproject details and structure. Use this when onboarding the agent to a new codebase.#### Agent Pause/Resume Feature-You can pause the agent while it is running by pressing `Ctrl-P`. To continue the conversation after pausing, simply+You can pause the agent while it is running by pressing `Ctrl-P`. To continue the conversation after pausing, simplytype `/resume` at the prompt.## Tips and Troubleshootingdiff --git a/docs/modules/usage/mcp.md b/docs/modules/usage/mcp.mdindex 466b45654b..a91fe34015 100644--- a/docs/modules/usage/mcp.md+++ b/docs/modules/usage/mcp.md@@ -1,14 +1,14 @@# Model Context Protocol (MCP):::note-This page outlines how to configure and use the Model Context Protocol (MCP) in OpenHands, allowing you to extend the+This page outlines how to configure and use the Model Context Protocol (MCP) in OpenHands, allowing you to extend theagent's capabilities with custom tools.:::## Overview-Model Context Protocol (MCP) is a mechanism that allows OpenHands to communicate with external tool servers. These-servers can provide additional functionality to the agent, such as specialized data processing, external API access,+Model Context Protocol (MCP) is a mechanism that allows OpenHands to communicate with external tool servers. These+servers can provide additional functionality to the agent, such as specialized data processing, external API access,or custom tools. MCP is based on the open standard defined at [modelcontextprotocol.io](https://modelcontextprotocol.io).## Configurationdiff --git a/docs/modules/usage/troubleshooting/troubleshooting.md b/docs/modules/usage/troubleshooting/troubleshooting.mdindex f69e8812c1..a9c461f2ca 100644--- a/docs/modules/usage/troubleshooting/troubleshooting.md+++ b/docs/modules/usage/troubleshooting/troubleshooting.md@@ -40,7 +40,7 @@ On initial prompt, an error is seen with `Permission Denied` or `PermissionError**Description**-When accessing OpenHands through a non-localhost URL (such as a LAN IP address), the VS Code tab shows a "Forbidden"+When accessing OpenHands through a non-localhost URL (such as a LAN IP address), the VS Code tab shows a "Forbidden"error, while other parts of the UI work fine.**Resolution**diff --git a/openhands/llm/llm.py b/openhands/llm/llm.pyindex 5b9d5807b9..504eb6c8b2 100644--- a/openhands/llm/llm.py+++ b/openhands/llm/llm.py@@ -49,6 +49,7 @@ LLM_RETRY_EXCEPTIONS: tuple[type[Exception], ...] = (# remove this when we gemini and deepseek are supportedCACHE_PROMPT_SUPPORTED_MODELS = ['claude-3-7-sonnet-20250219',+ 'claude-sonnet-3-7-latest','claude-3-5-sonnet-20241022','claude-3-5-sonnet-20240620','claude-3-5-haiku-20241022',@@ -59,6 +60,7 @@ CACHE_PROMPT_SUPPORTED_MODELS = [# function calling supporting modelsFUNCTION_CALLING_SUPPORTED_MODELS = ['claude-3-7-sonnet-20250219',+ 'claude-sonnet-3-7-latest','claude-3-5-sonnet','claude-3-5-sonnet-20240620','claude-3-5-sonnet-20241022',