Lumoswitch 文档
客户端接入

Qwen Code 接入

Qwen Code 的 openai 协议支持 OpenAI-compatible 端点。以下启动参数会直接提供认证方式、模型和凭证,不进入登录流程,也不写入配置文件:

qwen --auth-type openai \
  --model "your-client-facing-model-name" \
  --openai-api-key "your-lumoswitch-access-key" \
  --openai-base-url "https://api.lumoswitch.com/v1"

需要持久化多个模型时,推荐在用户级 ~/.qwen/settings.json 使用 modelProviders,不要继续使用已弃用的 security.auth.apiKeysecurity.auth.baseUrl

先在启动 Qwen Code 的 shell 中设置凭证:

export OPENAI_API_KEY="your-lumoswitch-access-key"
{
  "modelProviders": {
    "openai": {
      "protocol": "openai",
      "models": [
        {
          "id": "your-client-facing-model-name",
          "name": "Lumoswitch model",
          "envKey": "OPENAI_API_KEY",
          "baseUrl": "https://api.lumoswitch.com/v1"
        }
      ]
    }
  }
}

项目级 .qwen/settings.json 会覆盖用户配置。配置未生效时,应先检查这一层级关系和当前 shell 的环境变量。

参考:Qwen Code AuthenticationModel Providers

On this page