Connect Agent / CLI tools
OpenHands(开源自主 Agent 平台)
OpenHands(原 OpenDevin)底层用 LiteLLM 路由 LLM,设 LLM_BASE_URL + LLM_MODEL=openai/nexevo-auto 一行接入。
curl
bash
# OpenHands(原 OpenDevin)是 All Hands AI 开源的自主编程 Agent,自带
# 沙箱 + 终端 + 浏览器。底层走 LiteLLM,所以接入 Nexevo 用 OpenAI-compat
# 写法,model 名前缀加 openai/ 就行。
# ── 方法 1:Docker 一行起(最常见)──
docker run -it --rm --pull=always \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.x-nikolaik \
-e LLM_API_KEY="sk-xc-你的-Nexevo-key" \
-e LLM_BASE_URL="https://api.nexevo.ai/v1" \
-e LLM_MODEL="openai/nexevo-auto" \
-v /var/run/docker.sock:/var/run/docker.sock \
-p 3000:3000 \
--add-host host.docker.internal:host-gateway \
--name openhands \
docker.all-hands.dev/all-hands-ai/openhands:0.x
# 浏览器打开 http://localhost:3000 → 直接对话开任务
# ── 方法 2:config.toml(本地常驻 / 多次启动)──
cat > config.toml <<'EOF'
[core]
workspace_base = "./workspace"
[llm]
model = "openai/nexevo-auto"
base_url = "https://api.nexevo.ai/v1"
api_key = "sk-xc-你的-Nexevo-key"
EOF
# 再起容器时 mount 进去:-v $PWD/config.toml:/app/config.toml
# ── 方法 3:Settings UI 配(首次启动后)──
# 1) 容器起来 → 浏览器 http://localhost:3000
# 2) 右上 ⚙ Settings → LLM Provider 选 "Custom"
# 3) Model = openai/nexevo-auto
# Base URL = https://api.nexevo.ai/v1
# API Key = sk-xc-你的-Nexevo-key
# 4) Save → 回主页开任务
# ── 锁特定模型 ──
# LLM_MODEL 可以是 Nexevo 任何 chat 模型,前缀 openai/:
# openai/nexevo-auto 智能选(推荐,平均省 60%)
# openai/gpt-5
# openai/claude-sonnet-4-6
# openai/deepseek-v4-pro
# openai/qwen3-max-32b
# ── 拿到的好处 ──
# - Agent 多步推理一次任务跑几十次 LLM call,nexevo-auto 把简单 step
# 路由到便宜模型 → 比直连 GPT/Claude 平均省 ~60%
# - 单 provider 故障自动 fallback,Agent 跑通率高
# - 用量在 /admin/financial 一处对账(不用看 4 张账单)
# - prompt caching:相同 system prompt 的多步 step 触发命中,1 折结算
#
# 注:OpenHands 自己也有 Agent 编排,跟我们的 /v1/agents endpoint 是
# 平行关系 — OpenHands 自带沙箱跑代码;我们的 /v1/agents 是 API-only,
# 适合嵌入到你自己产品里。选哪个看你需要 UI 还是 API。