Skip to content
This page was translated from the Chinese original, which has changed since — it may be out of date. The Chinese version is authoritative. View the Chinese original →

Switch Configuration ​

Opening the configuration interface ​

Menu bar icon

macOS / Linux: click the menu bar icon → "Configuration".

System tray

Windows: right-click the tray icon → "Open Configuration".

Keyboard shortcut

Ctrl+Shift+S (Win/Linux) / Cmd+Shift+S (macOS).


Adding a model provider ​

In the "ProviderProviderA model provider, i.e. an upstream model service (a cloud API or a local inference service). Switch supports configuring multiple Providers and routing by rule." tab → "Add Provider", enter the provider name + API Base URL + API Key:

ProviderAPI Base URLAPI Key
Lurus API Recommendedhttps://hub.lurus.cn/v1Lurus Key (starts with sk-); for models, click "Auto-detect"
OpenAIhttps://api.openai.com/v1sk-... (official)
Anthropichttps://api.anthropic.com/v1sk-ant-...
Ollama (local)http://localhost:11434/v1(leave empty)

Routing

Configuring routing rules

Define which request goes to which provider; unmatched requests go to the default provider (default → Lurus API).

Route by model name: gpt-* → OpenAI; claude-* → Anthropic; deepseek-* / * (others) → Lurus API; llama* → Ollama. JSON:

json
{ "rules": [
    { "pattern": "gpt-*", "provider": "OpenAI" },
    { "pattern": "claude-*", "provider": "Anthropic" },
    { "pattern": "llama*", "provider": "Ollama" },
    { "pattern": "*", "provider": "Lurus API" }
  ] }

Route by application (advanced): set different routes for different local applications:

json
{
  "app_rules": [
    {
      "app": "cursor",
      "default_provider": "Lurus API",
      "model_override": "deepseek-reasoner"
    },
    {
      "app": "continue",
      "default_provider": "Ollama"
    }
  ]
}

Proxy port configuration ​

"General" → "Listen Port", default 11434. If there is a port conflict (e.g. with Ollama), change it to another port (such as 11435), and update the application side accordingly with base_url=http://localhost:11435/v1 (api_key can be anything; Switch uses the configured provider key).

Port conflict

The default port 11434 is the same as Ollama’s default port. When both run on the same machine, change Switch to another port (such as 11435), and update the application-side base_url accordingly.

Full configuration file ​

Switch configuration is saved at:

PlatformPath
Windows%APPDATA%\LurusSwitch\config.json
macOS~/Library/Application Support/LurusSwitch/config.json
Linux~/.config/LurusSwitch/config.json

Full config.json example:

json
{
  "listen_port": 11434,
  "log_requests": true,
  "start_on_login": true,
  "providers": [
    {
      "name": "Lurus API",
      "base_url": "https://hub.lurus.cn/v1",
      "api_key": "sk-your-lurus-key",
      "enabled": true
    },
    {
      "name": "Ollama",
      "base_url": "http://localhost:11434/v1",
      "api_key": "",
      "enabled": true
    }
  ],
  "routing": {
    "default_provider": "Lurus API",
    "rules": [
      { "pattern": "llama*",  "provider": "Ollama" },
      { "pattern": "qwen*",   "provider": "Ollama" },
      { "pattern": "*",       "provider": "Lurus API" }
    ]
  }
}

Verifying the configuration ​

The "Status" tab displays: the connection status of each provider (green = OK, red = failed), the currently active routing rules, and recent request logs. Command-line verification (a normal JSON response means success):

bash
curl http://localhost:11434/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-chat","messages":[{"role":"user","content":"ping"}]}'

Next steps ​

Next steps

Powered by Lurus Technologies