Factory Droid
Factory Droid supports custom models in the Droid CLI through ~/.factory/settings.json. Point a Factory custom model at Merge Gateway and Droid can use Gateway models with one API key, while Gateway keeps routing policies, cost governance, and request observability in the Gateway dashboard.
Before you start
-
Install the Factory Droid CLI from the Factory quickstart
-
Grab an API key from gateway.merge.dev/settings/api-keys and export it:
-
Pick the Gateway models you want Droid to use. Gateway model names take the form
provider/model, for exampleanthropic/claude-sonnet-4-6oropenai/gpt-5.2. Browse the full catalog withGET /v1/modelsor in the dashboard.
Configure Factory Droid
Add Gateway as a custom model
Add a customModels entry that points Factory’s OpenAI provider at Gateway’s OpenAI-compatible endpoint.
Use provider: "openai" so Factory sends OpenAI Responses API requests. Gateway translates those requests through /v1/openai/responses.
Select the model in Droid
Start Droid in your project, run /model, and select the custom model from the Custom models section.
Send a test message
Ask Droid a small coding question or request a small edit. The request will show up in your Gateway dashboard within a few seconds.
Caveats
Use the OpenAI provider
Set provider to "openai", not "generic-chat-completion-api". Factory’s OpenAI provider uses the Responses API, which matches Gateway’s /v1/openai/responses compatibility path.
Custom models are CLI-only in Factory
Factory’s BYOK documentation says custom models are available in the Droid CLI and do not appear in Factory web or mobile. Configure this in ~/.factory/settings.json on the machine running Droid.
Which models can I use?
Any model Gateway supports. Use GET /v1/models to list them, or open the Gateway dashboard and copy the model identifier.
Let Gateway choose the model
Instead of picking one model per Factory custom model entry, point the request at a routing policy and let Gateway choose the vendor and model based on your rules.