Reasonix
Connect Reasonix to Yolo Router and use a specified model for code assistance.
- Reasonix (v1.x) is installed and you can run
reasonixin the terminal. - A working Yolo Router endpoint, e.g.
https://api.yolorouter.com. - A valid Yolo Router API Key, generated from the console.
- The model ID you want to use, e.g.
deepseek-v4-pro, must match exactly with the model ID in the Yolo Router console.
Reasonix communicates with the LLM Gateway using the OpenAI-compatible protocol (
kind = "openai").
Setup
Install Reasonix
npm i -g reasonix@nextbrew install esengine/reasonix/reasonixVerify the installation:
reasonix --versionSet the Yolo Router API Key
Store your API Key in an environment variable. The example below uses YOLOROUTER_API_KEY, which the config file references via api_key_env.
export YOLOROUTER_API_KEY="sk-yolo-..."$env:YOLOROUTER_API_KEY = "sk-yolo-..."set YOLOROUTER_API_KEY=sk-yolo-...For persistence, add the export to your shell profile or system environment variables. Reasonix never writes secrets to config files.
Edit the Reasonix config file
Reasonix resolves configuration in this order: project-level ./reasonix.toml > user-level ~/.config/reasonix/config.toml > built-in defaults.
Open the user-level config file:
~/.config/reasonix/config.toml%USERPROFILE%\.config\reasonix\config.tomlAdd or merge the following:
default_model = "yolorouter"
[[providers]]
name = "yolorouter"
kind = "openai"
base_url = "https://api.yolorouter.com/v1"
model = "deepseek-v4-pro"
api_key_env = "YOLOROUTER_API_KEY"Values to replace:
base_url: your Yolo Router address, keep the/v1suffixmodel: the model ID you want to use, e.g.deepseek-v4-proapi_key_env: must match the environment variable name from the previous step
Start a session and test
Navigate to any project directory and run:
reasonix codeInside the interactive session, type a task:
Describe your current model in one sentence.You can also use autonomous mode to run a task directly:
reasonix run "Describe your current model in one sentence"If Reasonix returns a normal response, the setup is complete. You can also check the Yolo Router console for the corresponding request record.
FAQ
API Key not found
Confirm the environment variable is set in your current terminal:
echo $YOLOROUTER_API_KEYecho $env:YOLOROUTER_API_KEYecho %YOLOROUTER_API_KEY%If empty, set the variable again and restart Reasonix.
Model not found
Verify the model value in [[providers]] matches the model ID in the Yolo Router console exactly. Do not use display names, aliases, or values with extra spaces.
404 or incompatible endpoint
Check that base_url includes /v1 and that kind is set to "openai". Verify with:
curl https://api.yolorouter.com/v1/models \
-H "Authorization: Bearer $YOLOROUTER_API_KEY"On Windows PowerShell:
curl.exe https://api.yolorouter.com/v1/models `
-H "Authorization: Bearer $env:YOLOROUTER_API_KEY"Relationship between default_model and provider name
The default_model value corresponds to the name field of a [[providers]] entry. If you have multiple providers configured, use /model inside a session to switch.
Command not found after npm install
Make sure you install with reasonix@next. The latest tag is pinned at the deprecated v0.53 line. Current releases (v1.x) are published on the @next channel.