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 | shIn 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
providertogeneric-chat-completion-apifor the OpenAI Chat Completions protocol; in Factory,openaimeans the Responses API. - Set
baseUrltohttps://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
customModelsat the top level, and fully restart Droid. - 401: set
MODELGO_API_KEYin the same shell that launches Droid. - 404: remove a duplicate
/v1or a full endpoint path frombaseUrl.