Using AgentRouter with Droid CLI
Complete guide to set up Droid CLI with AgentRouter API
Using AgentRouter with Droid CLI
This guide will help you configure Droid CLI (Factory.ai's coding assistant) to use AgentRouter as your API provider.
Install Droid CLI
curl -fsSL https://app.factory.ai/cli | shirm https://app.factory.ai/cli/windows | iexConfigure Custom Model
Edit the configuration file ~/.factory/config.json with the following content:
{
"custom_models": [
{
"model_display_name": "agentrouter-gpt5",
"model": "gpt-5",
"base_url": "https://agentrouter.org/v1",
"api_key": "YOUR_AGENT_ROUTER_KEY",
"provider": "generic-chat-completion-api",
"max_tokens": 1280000
}
]
}Important
Replace YOUR_AGENT_ROUTER_KEY with your actual API key from AgentRouter Console.
Launch and Use
After configuration:
- Open a terminal and run
droid - In the interface, type
/model - Select Custom Model → agentrouter-gpt5
- Start coding with AI assistance!
Available Models
You can add multiple custom models to your configuration:
{
"custom_models": [
{
"model_display_name": "agentrouter-gpt5",
"model": "gpt-5",
"base_url": "https://agentrouter.org/v1",
"api_key": "YOUR_AGENT_ROUTER_KEY",
"provider": "generic-chat-completion-api",
"max_tokens": 1280000
},
{
"model_display_name": "agentrouter-deepseek",
"model": "deepseek-v3.1",
"base_url": "https://agentrouter.org/v1",
"api_key": "YOUR_AGENT_ROUTER_KEY",
"provider": "generic-chat-completion-api",
"max_tokens": 1280000
}
]
}| Model | Description |
|---|---|
gpt-5 | Latest GPT model |
deepseek-v3.1 | DeepSeek V3.1 model |
deepseek-v3.2 | DeepSeek V3.2 model |
glm-4.5 | GLM 4.5 model |
glm-4.6 | GLM 4.6 model |