跳转到主要内容
AgentCompass 在每次 run 中传入模型连接配置。Direct runtime 不要求全局 model registry 或 LLM gateway。

环境变量

使用带下划线的 shell 变量名:
export MODEL_BASE_URL="http://localhost:8000/v1"
export MODEL_API_KEY="EMPTY"
不要使用 model-base-url 这类带 hyphen 的名字,它不是合法 shell 变量。如果本地 GLM-5.2 endpoint 启用了鉴权,请把 EMPTY 换成真实 key。

OpenAI-Compatible Chat Endpoint

agentcompass run \
  swebench_verified \
  mini_swe_agent \
  glm-5.2 \
  --env docker \
  --benchmark-params '{"sample_ids":["astropy__astropy-12907"]}' \
  --model-base-url "$MODEL_BASE_URL" \
  --model-api-key "$MODEL_API_KEY" \
  --model-api-protocol openai-chat \
  --model-params '{"temperature":0}' \
  --task-concurrency 1

支持的 Protocol

用 live list 查看当前支持情况:
agentcompass list dump
当前 protocol id 也记录在 Supported Components。Harness 会从 model spec 中选择兼容协议。

Judge Model

LLM-as-judge benchmark 通过 --benchmark-params 接收 judge model。
agentcompass run \
  browsecomp \
  researchharness \
  your-model \
  --env host_process \
  --benchmark-params '{
    "judge_model": {
      "id": "judge-model",
      "base_url": "https://judge-endpoint/v1",
      "api_key": "sk-...",
      "api_protocol": "openai-chat",
      "params": {"temperature": 0}
    }
  }' \
  --model-base-url "$MODEL_BASE_URL" \
  --model-api-key "$MODEL_API_KEY"

常见错误

现象检查
Provider not found显式设置 --model-api-protocol
401 或鉴权失败确认当前 shell 中已导出 MODEL_API_KEY
Model not found确认 model id 和 MODEL_BASE_URL 匹配。
Unsupported protocol查看 Supported Components 中的 harness/protocol 组合。