# OpenHands

Use Tensorix models with [OpenHands](https://docs.openhands.dev/), the open-source AI software developer.

## Prerequisites

OpenHands runs as a Docker container. Ensure you have Docker installed and running.

## Quick Start

1. Pull and run OpenHands:

```bash
docker pull docker.openhands.dev/openhands/runtime:1.0-nikolaik
docker run -it --rm --pull=always \
    -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.openhands.dev/openhands/runtime:1.0-nikolaik \
    -e LOG_ALL_EVENTS=true \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v ~/.openhands:/.openhands \
    -p 3000:3000 \
    --add-host host.docker.internal:host-gateway \
    --name openhands-app \
    docker.openhands.dev/openhands/openhands:1.0
```

2. Open `http://localhost:3000` in your browser

## Configuration

1. When prompted, click **"see advanced settings"** to open the LLM Settings page
2. Enable the **Advanced** toggle at the top
3. Configure the following:

| Setting      | Value                        |
| ------------ | ---------------------------- |
| Custom Model | `openai/z-ai/glm-5.1`        |
| Base URL     | `https://api.tensorix.ai/v1` |
| API Key      | Your Tensorix API key        |

4. Click **Save Settings**

{% hint style="info" %}
**Note:** The Custom Model format is `openai/<model-id>`. The `openai/` prefix tells OpenHands to use the OpenAI-compatible API format.
{% endhint %}

## Available Models

| Model        | Custom Model Value            |
| ------------ | ----------------------------- |
| GLM-5.1 ⭐    | `openai/z-ai/glm-5.1`         |
| MiniMax-M2.5 | `openai/minimax/minimax-m2.5` |
| Kimi-K2.5    | `openai/moonshotai/kimi-k2.5` |
| MiniMax-M2   | `openai/minimax/minimax-m2`   |

## Tips

* **Model selection**: GLM-5.1 is recommended for OpenHands due to strong tool calling support
* **Context size**: OpenHands requires a large context size to work properly
* **Cost management**: OpenHands will issue many prompts - monitor your usage

## Troubleshooting

| Issue                 | Solution                                        |
| --------------------- | ----------------------------------------------- |
| Empty responses       | Check model ID is correct with `openai/` prefix |
| Connection errors     | Verify Base URL is `https://api.tensorix.ai/v1` |
| Authentication errors | Verify your API key is correct                  |

## Resources

* [OpenHands Documentation](https://docs.openhands.dev/)
* [OpenHands LLM Configuration](https://docs.openhands.dev/openhands/usage/llms/llms)
* [Tensorix API Reference](/api-reference/overview.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tensorix.ai/ai-coding-assistants/openhands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
