跳转到主要内容

Documentation Index

Fetch the complete documentation index at: https://docs.llmeasy.ru/llms.txt

Use this file to discover all available pages before exploring further.

Droid 是 Factory AI 的 CLI 编程助手。通过 BYOK 配置,可以将 LLMEasy 作为自定义 OpenAI 兼容提供商接入。

前置条件

  • 已获取 LLMEasy API Key(注册并获取 (https://www.llmeasy.ru/register))

安装 Droid

curl -fsSL https://app.factory.ai/cli | sh

配置步骤

1

清除冲突的环境变量

unset OPENAI_API_KEY
unset OPENAI_BASE_URL
2

设置 LLMEasy API Key

export LLMEASY_API_KEY="YOUR_API_KEY"
3

编辑 Droid 配置文件

配置文件路径:~/.factory/settings.json
{
  "customModels": [
    {
      "displayName": "LLMEasy Codex",
      "model": "YOUR_CODEX_MODEL_ID",
      "baseUrl": "https://www.llmeasy.ru/v1",
      "apiKey": "${LLMEASY_API_KEY}",
      "provider": "openai",
      "maxOutputTokens": 64000
    }
  ]
}
YOUR_CODEX_MODEL_ID 替换为从模型广场 (https://www.llmeasy.ru/pricing)复制的 Codex 分组模型 ID
4

仅在官方文档明确要求时再配置额外 headers

当前我们没有查到 Droid 官方接入说明要求 LLMEasy 额外配置 User-Agent。默认先按页面中的 Base URL、API Key 和模型 ID 完成接入即可。如果你还接了自定义网关、租户路由或审计服务,再按对应上游服务的官方文档补充所需 headers。
5

重启 Droid

修改配置文件或环境变量后,请退出当前 Droid 进程,再重新启动。
6

启动 Droid

cd /path/to/your/project
droid
如果当前版本把 provider 文案显示为 OpenAI Compatible,以当前界面显示为准。如需额外 headers,请以 Droid 官方当前版本说明或上游网关要求为准,不要默认把 User-Agent 当作 LLMEasy 必填项。