Connect Factory Droid to ModelGo: Setup & Troubleshooting

Factory Droid is Factory's terminal agent. Its BYOK custom models can point Droid at ModelGo's OpenAI-compatible endpoint. You need an API key from the ModelGo Console and a logical model ID from the Model Catalog.

1. Install Droid

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

In Windows PowerShell, run irm https://app.factory.ai/cli/windows | iex.

2. Configure a ModelGo custom model

Merge this customModels entry into ~/.factory/settings.json (Windows: %USERPROFILE%\.factory\settings.json), keeping your other settings:

json
{
  "customModels": [
    {
      "model": "your-model-id",
      "displayName": "ModelGo your-model-id",
      "baseUrl": "https://api.modelgo.ai/v1",
      "apiKey": "${MODELGO_API_KEY}",
      "provider": "generic-chat-completion-api"
    }
  ]
}
bash
export MODELGO_API_KEY="mgk_your_api_key"
  • Set provider to generic-chat-completion-api for the OpenAI Chat Completions protocol; in Factory, openai means the Responses API.
  • Set baseUrl to https://api.modelgo.ai/v1; do not add /chat/completions.

Restart Droid and choose ModelGo your-model-id under Custom Models in /model.

3. Verify

bash
curl https://api.modelgo.ai/v1/models \
  -H "Authorization: Bearer $MODELGO_API_KEY"
droid exec --model "custom:ModelGo-your-model-id-0" "Describe this project in one sentence"

droid exec references a custom model with the custom: prefix, followed by its displayName (spaces replaced with -) and its 0-based position in the customModels array.

Troubleshooting

  • The model is not listed: validate the JSON, keep customModels at the top level, and fully restart Droid.
  • 401: set MODELGO_API_KEY in the same shell that launches Droid.
  • 404: remove a duplicate /v1 or a full endpoint path from baseUrl.

Related docs