Nanobot
Connect Nanobot to Yolo Router with a custom OpenAI-compatible model.
- Nanobot is installed and available as
nanobot. - A working Yolo Router endpoint, for example
<code>https://api.yolorouter.com</code>. - A Yolo Router API Key generated from the console.
- The model ID you want to use, for example
deepseek-v4-pro. It must exactly match the model ID in the Yolo Router console.
Nanobot configures providers and default agents through
~/.nanobot/config.json. For Yolo Router, select one of Nanobot's supported providers, then override its API Key and URL with your Yolo Router values.
Setup
Install and check Nanobot
Recommended with uv:
uv tool install nanobot-aiOr with pipx:
pipx install nanobot-aiVerify:
nanobot --versionSet the API Key env var
Nanobot's OpenAI-compatible provider reads OPENAI_API_KEY. If you also use other OpenAI services locally, set it only in the terminal session where you start Nanobot.
export OPENAI_API_KEY="sk-yolo-..."$env:OPENAI_API_KEY = "sk-yolo-..."set OPENAI_API_KEY=sk-yolo-...Do not write the real API Key into config files or commit it to your repository.
Edit config.json
Nanobot's default config file is:
~/.nanobot/config.jsonOn Windows this is usually:
%USERPROFILE%\.nanobot\config.jsonAdd or merge the following config:
{
"agents": {
"defaults": {
"model": "deepseek-v4-pro",
"provider": "deepseek"
}
},
"providers": {
"deepseek": {
"apiKey": "${OPENAI_API_KEY}",
"apiBase": "https://api.yolorouter.com/v1"
}
}
}Field notes:
agents.defaults.provider: use a provider that Nanobot already supports. The example usesdeepseek; if you use another supported provider, change this value and the matching entry underproviders.providers.deepseek.apiKey: reads your Yolo Router API Key fromOPENAI_API_KEYproviders.deepseek.apiBase: your Yolo Router OpenAI-compatible endpoint, with/v1agents.defaults.model: must exactly match the model ID in the Yolo Router console
In short, "provider": "deepseek" means Nanobot should use its supported DeepSeek provider adapter, while apiKey and apiBase redirect that adapter to your Yolo Router Key and URL.
Start Nanobot
Open your project directory and run:
nanobot agentIf you need to select a model, open Nanobot's model selector and choose the model under the provider you configured.
Test the connection
Send:
Introduce the model you are using in one sentence.If Nanobot returns a normal response, the integration is working. You can also check the Yolo Router console for the corresponding request log.
Troubleshooting
deepseek does not appear in the provider list
Check that ~/.nanobot/config.json exists and the JSON is valid. Also confirm that the provider name you chose is one supported by Nanobot.
401 Unauthorized
Make sure OPENAI_API_KEY is set in the current shell and is your Yolo Router API Key.
404 or endpoint not found
Check that apiBase is https://api.yolorouter.com/v1; do not use only the root endpoint.
Model not found
Confirm that agents.defaults.model exactly matches the model ID in the Yolo Router console.
Config changes do not apply
Nanobot reads config files and environment variables at startup. After changing config.json or OPENAI_API_KEY, close the current session and start it again.