Skip to main content

OpenHands

OpenHands (formerly OpenDevin) is an open-source, AI-driven software development platform. It supports one-click deployment via Docker, offers both Web UI and CLI interaction modes, and can autonomously complete development tasks such as code writing, debugging, and terminal operations.

Prerequisites

  • You have activated a TCB environment and obtained the environment ID cloudBaseEnvID
  • Enable the required model in the AI console
  • Obtain the Base URL and API Key in the AI console
Base URLhttps://<ENV_ID>.api.tcloudbasegateway.com/v1/ai/cloudbase

codebuddy

Configuration Steps

OpenHands supports connecting custom models through Docker environment variables or the config.toml configuration file.

Configuration Field Mapping Table

FieldExplanation
modelThe large model ID. Copy the identifier of an enabled large model from the model list in the AI console and enter it here.
base_urlThe Base URL for the large model. Obtain it from the AI console.
api_keyThe API Key for calling the large model, which is obtained in the AI console.

Pass the environment variables through the -e parameter:

docker run -it --rm --pull=always \
-e LLM_MODEL="hy3-preview" \
-e LLM_API_KEY="eyJhbGciOiJSUzI1N..." \
-e LLM_BASE_URL="https://{{cloudBaseEnvID}}.api.tcloudbasegateway.com/v1/ai/cloudbase" \
-p 3000:3000 \
--add-host host.docker.internal:host-gateway \
-v /var/run/docker.sock:/var/run/docker.sock \
ghcr.io/openhandsai/openhands:main

After startup, access http://localhost:3000 to use it.

Common Error Troubleshooting

Error MessageSolution
404 Model Not FoundThe Base URL is entered incorrectly. Go to the AI console to copy the correct Base URL.
401 Authentication FailedThe API Key is entered incorrectly or may have been deleted.
429 Token usage exceeded quotaAn incorrect large model name is configured, or the large model is not enabled in the AI console.