OpenHands calls models through LiteLLM, so it accepts any OpenAI-compatible API, including one that serves uncensored, abliterated models. We ran the OpenHands CLI 1.16.0 on CommentLLM's abliterated DeepSeek V4.1 Flash model and it fixed a real bug.
The short version: set LLM_MODEL to openai/deepseek-v4.1-flash-abliterated, LLM_BASE_URL to https://api.commentllm.com/v1 and LLM_API_KEY to your CommentLLM key, then run openhands --override-with-envs. The openai/ prefix is required.

What you need
- The OpenHands CLI. We used version 1.16.0, installed with
uv tool install openhands --python 3.12. - A CommentLLM API key. Create one under Keys in the console after you sign up and add credit.
Step 1: install, and fix the authlib crash
uv tool install openhands --python 3.12
Our fresh install crashed at start with ModuleNotFoundError: No module named 'authlib'. Installing again with the missing package fixed it:
uv tool install --force openhands --with authlib
An AuthlibDeprecationWarning printed afterwards is harmless.
Step 2: set the model variables
export LLM_MODEL="openai/deepseek-v4.1-flash-abliterated"
export LLM_BASE_URL="https://api.commentllm.com/v1"
export LLM_API_KEY="cllm_..."
| Variable | Why |
|---|---|
LLM_MODEL |
The model ID with an openai/ prefix, which tells LiteLLM to use the OpenAI Chat Completions format |
LLM_BASE_URL |
Where to send requests |
LLM_API_KEY |
Your CommentLLM key |
Step 3: start OpenHands
openhands --override-with-envs
--override-with-envs makes OpenHands use the variables instead of its saved settings. Startup took about 20 seconds for us while it loaded its skills. You can instead type /settings inside OpenHands, open the advanced settings and enter the custom model and base URL there.

Step 4: give it a task
Our test project had a log-triage script with a bug: it counted failed SSH logins by username instead of by source address, so both tests failed. We asked:
The test suite fails. Run the tests, find the bug in auth_triage.py and fix it. Then run the tests again.
OpenHands asks you to confirm actions before it runs them, with yes, no, always, and options to approve low or medium risk actions automatically.

It listed the folder, checked git status, read the script, ran pytest and saw the failure, edited one line and ran pytest again: 2 passed.

openhands --always-approve skips the confirmations. Use it in a sandbox.
Common problems and fixes
| What you see | Why | Fix |
|---|---|---|
ModuleNotFoundError: No module named 'authlib' |
The package was missing from a fresh install of 1.16.0 | uv tool install --force openhands --with authlib |
AuthlibDeprecationWarning |
A notice from that package | Harmless |
Cost shows $0.00 |
OpenHands has no prices for the model | Read usage in the CommentLLM console |
| A large banner at start | The SDK prints it | export OPENHANDS_SUPPRESS_BANNER=1 |
Which model to use
Start with deepseek-v4.1-flash-abliterated, the model that fixed the bug here. glm-5.3-abliterated is the one to try for harder reasoning. Both take text only, so image input does not work. If the agent feels slow, switch the model ID to deepseek-v4.1-flash-abliterated-fast: it is the same model served about five times faster, at the same input and output rates and a higher cached-input rate. The pricing page lists every model and its rate.
Run it in a sandbox
Abliterated models refuse far fewer requests than standard ones, and that includes commands an agent should not run on your machine. Try it first in a throwaway project, as we did, and review what the model writes before you ship it.
Setting up a different agent? Uncensored coding AI lists every agent we tested, with a guide for each.
Questions
Can OpenHands use uncensored or abliterated models?
Yes. OpenHands accepts any OpenAI-compatible API through LiteLLM. We ran the OpenHands CLI 1.16.0 on DeepSeek V4.1 Flash Abliterated through CommentLLM, and it fixed a failing test.
How do I use a custom OpenAI-compatible API with OpenHands?
Set LLM_MODEL to the model ID with an openai/ prefix, LLM_BASE_URL to the API's base URL and LLM_API_KEY to your key, then start the CLI with openhands --override-with-envs.
How do I fix No module named authlib in OpenHands?
Reinstall with the package added: uv tool install --force openhands --with authlib. That fixed the crash on OpenHands 1.16.0.
Why does the OpenHands model name need an openai/ prefix?
OpenHands sends requests through LiteLLM, which picks the API format from the prefix. openai/ selects the OpenAI Chat Completions format that CommentLLM serves at /v1.
