OpenHands
Open-source autonomous software engineering agent (formerly OpenDevin) executing full sandboxed terminal, browser, and GitHub workflows.
https://api.bf16.ai/v1openai-completionsWho this is for
Teams running headless CI issue resolution and multi-hour sandboxed SWE loops where stock API costs skyrocket.
Architecture & Why Pair with bf16.ai
OpenHands executes dozens to hundreds of sandboxed shell commands, test suites, and browser inspections per GitHub issue. Because each step resends the full trajectory, token bills on commercial flagship APIs quickly exceed $5–$20 per task.
Pairing OpenHands with DeepSeek V4.1 Flash Uncensored ($0.26 in / $0.045 cached / $1.00 out) cuts autonomous SWE run costs by 80–90% while maintaining 1M-token context and zero refusal interruptions during security or low-level systems debugging.
Commands show $BF16_API_KEY. Sign in to fill in your own key automatically.
One-Command OpenHands Headless Config
Exports the exact OpenHands LLM environment variables for headless CLI or Docker runs.
export BF16_API_KEY="sk-bf16-v1-..."
export LLM_API_KEY="$BF16_API_KEY"
export LLM_BASE_URL="https://api.bf16.ai/v1"
export LLM_MODEL="openai/deepseek/deepseek-v4.1-flash-uncensored-fast"
curl https://api.bf16.ai/v1/models -H "Authorization: Bearer $BF16_API_KEY"- 1
Enable Advanced LLM Settings in OpenHands
Open OpenHands Settings → LLM → toggle Advanced, or pass environment variables into your Docker container.
- 2
Set Custom Model with openai/ prefix and Base URL
Enter openai/deepseek/deepseek-v4.1-flash-uncensored-fast as Custom Model and https://api.bf16.ai/v1 as Base URL.
LLM_MODEL=openai/deepseek/deepseek-v4.1-flash-uncensored-fast LLM_BASE_URL=https://api.bf16.ai/v1 LLM_API_KEY=$BF16_API_KEY
Exact Field-by-Field Reference
openai/deepseek/deepseek-v4.1-flash-uncensored-fastLeading openai/ tells OpenHands’ LiteLLM router to use OpenAI-compatible wire format
https://api.bf16.ai/v1sk-bf16-v1-••••••••••••Automatic ($0.045–$0.055/1M read)Recommended Uncensored Model Tiering
Route complex planning to Flagship models and high-frequency subagents or screenshots to Flash.
| Workflow Role | Model ID | Why This Model | USD / 1M Tokens |
|---|---|---|---|
| Autonomous Issue Solving & CI Loops | deepseek/deepseek-v4.1-flash-uncensored | $0.045/1M cached input reads make 80-step OpenHands trajectories remarkably economical. | $0.26 in / $0.045 cached / $1.00 out |
| High-Speed Interactive Sandboxes | deepseek/deepseek-v4.1-flash-uncensored-fast | Cuts wall-clock latency across iterative build-test-fix loops. | $0.28 in / $0.055 cached / $1.12 out |
How to know it worked
- OpenHands starts a sandbox task and completes its initial repository inspection without model-routing errors.
- curl https://api.bf16.ai/v1/models -H "Authorization: Bearer $BF16_API_KEY"
Production Guardrails & Budget Isolation
- Always set max_iterations and a per-key daily USD cap in /dashboard/keys for unattended OpenHands batch jobs.