メインコンテンツへスキップ
すべてのクライアント
Autonomous SWE Agent · Docker & CLI1M Context · ZDR

OpenHands

サンドボックス端末・ブラウザ・GitHub Issue を自律処理するオープンソース SWE エージェント。

ベースURL
https://api.bf16.ai/v1
プロトコル
openai-completions

対象ユーザー
長時間の自律コード修正コストを 80% 以上削減したいエンジニアリングチーム。

アーキテクチャと bf16.ai 連携の利点

OpenHands Docker and CLI autonomous SWE agent calling https://api.bf16.ai/v1 with 1M context and cached prefixes
OpenHands uses LiteLLM under the hood — prefix bf16 model IDs with openai/ and set LLM_BASE_URL=https://api.bf16.ai/v1.

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.

コマンドには $BF16_API_KEY と表示されています。サインインすると自分のキーが自動入力されます。

ワンコマンド設定

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. 1

    bf16.ai API キーを設定する

    Open OpenHands Settings → LLM → toggle Advanced, or pass environment variables into your Docker container.

  2. 2

    bf16.ai エンドポイントと 1M 無検閲モデルを接続する

    ページ上部の Base URL と API キーを設定するだけで、1M コンテキスト・ゼロ保持(ZDR)の全モデルが利用できます。

    LLM_MODEL=openai/deepseek/deepseek-v4.1-flash-uncensored-fast
    LLM_BASE_URL=https://api.bf16.ai/v1
    LLM_API_KEY=$BF16_API_KEY
OpenHands — Settings → LLM (Advanced / Custom Model)
設定フィールド一覧
Settings / LLM / Custom Model (OpenAI-Compatible)

入力パラメータ早見表

Custom Model
openai/deepseek/deepseek-v4.1-flash-uncensored-fast

Leading openai/ tells OpenHands’ LiteLLM router to use OpenAI-compatible wire format

Base URL
https://api.bf16.ai/v1
API Key
sk-bf16-v1-••••••••••••
Prompt Caching
Automatic ($0.045–$0.055/1M read)
Works identically in OpenHands Web UI, Docker compose, and headless CLI evaluations.

用途別おすすめモデル構成

設計・監査には Flagship モデル、並列サブタスクや画面認識には Flash モデルを組み合わせます。

役割モデル ID選定理由USD / 1M トークン
Autonomous Issue Solving & CI Loopsdeepseek/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 Sandboxesdeepseek/deepseek-v4.1-flash-uncensored-fastCuts wall-clock latency across iterative build-test-fix loops.$0.28 in / $0.055 cached / $1.12 out

正しく動いているか確認する方法

  • テスト送信後、bf16.ai ダッシュボードのリクエストログにリアルタイムで記録されます。
  • curl https://api.bf16.ai/v1/models -H "Authorization: Bearer $BF16_API_KEY"

本番運用の安全策と予算上限

  • Always set max_iterations and a per-key daily USD cap in /dashboard/keys for unattended OpenHands batch jobs.

よくあるエラー

症状
接続テストで 404 または認証エラーが発生する。
原因
エンドポイント URL の末尾に余分な /v1 や /chat/completions が含まれています。
対処法
本ページに記載の Base URL をそのままコピーして設定してください。