Skip to content

🙌 OpenHands: AI-Driven Development

Docs for OpenHands LLM Provider (#9751)

mamoodi4c39e92351d0
diff --git a/docs/docs.json b/docs/docs.json
index 7a74cbcc66..ea65e61d3a 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -69,6 +69,7 @@
"usage/llms/litellm-proxy",
"usage/llms/moonshot",
"usage/llms/openai-llms",
+ "usage/llms/openhands-llms",
"usage/llms/openrouter"
]
}
diff --git a/docs/static/img/openhands-llm-api-key.png b/docs/static/img/openhands-llm-api-key.png
new file mode 100644
index 0000000000..67efda8ab6
Binary files /dev/null and b/docs/static/img/openhands-llm-api-key.png differ
diff --git a/docs/static/img/openhands-provider-cli.png b/docs/static/img/openhands-provider-cli.png
new file mode 100644
index 0000000000..30437589e9
Binary files /dev/null and b/docs/static/img/openhands-provider-cli.png differ
diff --git a/docs/usage/how-to/cli-mode.mdx b/docs/usage/how-to/cli-mode.mdx
index 8af4c8d7e9..aa9f579de8 100644
--- a/docs/usage/how-to/cli-mode.mdx
+++ b/docs/usage/how-to/cli-mode.mdx
@@ -123,7 +123,8 @@ docker run -it \
This launches the CLI in Docker, allowing you to interact with OpenHands.
-The `-e SANDBOX_USER_ID=$(id -u)` ensures files created by the agent in your workspace have the correct permissions.
+The `-e SANDBOX_USER_ID=$(id -u)` is passed to the Docker command to ensure the sandbox user matches the host user’s
+permissions. This prevents the agent from creating root-owned files in the mounted workspace.
The conversation history will be saved in `~/.openhands/sessions`.
diff --git a/docs/usage/how-to/headless-mode.mdx b/docs/usage/how-to/headless-mode.mdx
index 307cf74dd2..4de398aa85 100644
--- a/docs/usage/how-to/headless-mode.mdx
+++ b/docs/usage/how-to/headless-mode.mdx
@@ -80,6 +80,7 @@ docker run -it \
> **Note**: If you used OpenHands before version 0.44, run `mv ~/.openhands-state ~/.openhands` to migrate your conversation history.
The `-e SANDBOX_USER_ID=$(id -u)` is passed to the Docker command to ensure the sandbox user matches the host user’s
+permissions. This prevents the agent from creating root-owned files in the mounted workspace.
## Additional Options
@@ -90,6 +91,6 @@ Common command-line options:
- `-b 10.0` - Set budget limit (USD)
- `--no-auto-continue` - Interactive mode
-Run `poetry run python -m openhands.core.main --help` for all options, or use a [`config.toml` file](https://github.com/All-Hands-AI/OpenHands/blob/main/config.template.toml) for more flexibility.
+Run `poetry run python -m openhands.core.main --help` for all options.
Set `export LOG_ALL_EVENTS=true` to log all agent actions.
diff --git a/docs/usage/llms/llms.mdx b/docs/usage/llms/llms.mdx
index de62ba76ba..030ca17d84 100644
--- a/docs/usage/llms/llms.mdx
+++ b/docs/usage/llms/llms.mdx
@@ -10,7 +10,8 @@ This section is for users who want to connect OpenHands to different LLMs.
## Model Recommendations
Based on our evaluations of language models for coding tasks (using the SWE-bench dataset), we can provide some
-recommendations for model selection. Our latest benchmarking results can be found in [this spreadsheet](https://docs.google.com/spreadsheets/d/1wOUdFCMyY6Nt0AIqF705KN4JKOWgeI4wUGUP60krXXs/edit?gid=0).
+recommendations for model selection. Our latest benchmarking results can be found in
+[this spreadsheet](https://docs.google.com/spreadsheets/d/1wOUdFCMyY6Nt0AIqF705KN4JKOWgeI4wUGUP60krXXs/edit?gid=0).
Based on these findings and community feedback, these are the latest models that have been verified to work reasonably well with OpenHands:
@@ -73,16 +74,18 @@ We have a few guides for running OpenHands with specific model providers:
- [LiteLLM Proxy](/usage/llms/litellm-proxy)
- [Moonshot AI](/usage/llms/moonshot)
- [OpenAI](/usage/llms/openai-llms)
+- [OpenHands](/usage/llms/openhands-llms)
- [OpenRouter](/usage/llms/openrouter)
## Model Customization
LLM providers have specific settings that can be customized to optimize their performance with OpenHands, such as:
-- **Custom Tokenizers**: For specialized models, you can add a suitable tokenizer
-- **Native Tool Calling**: Toggle native function/tool calling capabilities
+- **Custom Tokenizers**: For specialized models, you can add a suitable tokenizer.
+- **Native Tool Calling**: Toggle native function/tool calling capabilities.
-For detailed information about model customization, see [LLM Configuration Options](configuration-options#llm-customization).
+For detailed information about model customization, see
+[LLM Configuration Options](/usage/configuration-options#llm-configuration).
### API retries and rate limits
diff --git a/docs/usage/llms/openhands-llms.mdx b/docs/usage/llms/openhands-llms.mdx
new file mode 100644
index 0000000000..92840f24c3
--- /dev/null
+++ b/docs/usage/llms/openhands-llms.mdx
@@ -0,0 +1,34 @@
+---
+title: OpenHands
+description: OpenHands LLM provider with access to state-of-the-art (SOTA) agentic coding models.
+---
+
+## Obtain Your OpenHands LLM API Key
+
+1. [Log in to OpenHands Cloud](/usage/cloud/openhands-cloud).
+2. Go to the Settings page and navigate to the `API Keys` tab.
+3. Copy your `LLM API Key`.
+
+![OpenHands LLM API Key](/static/img/openhands-llm-api-key.png)
+
+## Configuration
+
+When running OpenHands, you'll need to set the following in the OpenHands UI through the Settings under the `LLM` tab:
+- `LLM Provider` to `OpenHands`
+- `LLM Model` to the model you will be using (e.g. claude-sonnet-4-20250514)
+- `API Key` to your OpenHands LLM API key copied from above
+
+## Using OpenHands LLM Provider in the CLI
+
+1. [Run OpenHands CLI](/usage/how-to/cli-mode).
+2. To select OpenHands as the LLM provider:
+ - If this is your first time running the CLI, choose `openhands` and then select the model that you would like to use.
+ - If you have previously run the CLI, run the `/settings` command and select to modify the `Basic` settings. Then
+ choose `openhands` and finally the model.
+
+![OpenHands Provider in CLI](/static/img/openhands-provider-cli.png)
+
+## Pricing
+
+Pricing follows official API provider rates.
+[You can view model prices here.](https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json)