OpenHands
Run the OpenHands agent on RouterPlex models.
OpenHands (formerly OpenDevin) uses LiteLLM under the hood, so it understands openai/-prefixed custom endpoints.
In the OpenHands UI: Settings → LLM → Advanced:
Custom Model: openai/claude-sonnet-4-6Base URL: https://api.routerplex.com/v1API Key: sk-... # your RouterPlex key
Or with environment variables when self-hosting:
export LLM_MODEL="openai/claude-sonnet-4-6"export LLM_BASE_URL="https://api.routerplex.com/v1"export LLM_API_KEY="sk-..."
The openai/ prefix selects the OpenAI wire format; the part after the slash is the RouterPlex model ID verbatim.
Verify before a long task #
Start OpenHands with a small read-only task and confirm the request appears in RouterPlex key logs under the expected model. If authentication fails, verify the environment variables are available inside the OpenHands container or process, not only in the host shell. If the model is rejected, use the exact case-sensitive ID from the model catalog.
Cap autonomous usage #
OpenHands can continue planning, coding, and retrying without another human message. Create a dedicated key, set a hard budget, and allowlist only the models you have tested with its tool loop. RouterPlex enforces the cap server-side, so the agent cannot spend beyond it even if the local process keeps retrying. Increase the cap only after reviewing a representative task's token use and logs.