Integration guides
Qwen Code
Tongyi's terminal AI coding agent (a Gemini CLI fork) aimed at code understanding and automation. It supports the OpenAI-compatible protocol — set the env vars to use XylemNode.
- 01
Install
Install globally with npm (Node.js 20+ required). Print the version afterward to confirm.
# Install npm install -g @qwen-code/qwen-code@latest # Verify qwen --version - 02
Configure the endpoint and key
Hand qwen the XylemNode key, address and model via environment variables; the address includes /v1. On Windows, run setx and reopen the terminal.
# Windows (PowerShell / CMD) setx OPENAI_API_KEY "sk-your-key" setx OPENAI_BASE_URL "https://api.xylemnode.com/v1" setx OPENAI_MODEL "gpt-5.6-sol" # reopen the terminal after setx # macOS / Linux export OPENAI_API_KEY="sk-your-key" export OPENAI_BASE_URL="https://api.xylemnode.com/v1" export OPENAI_MODEL="gpt-5.6-sol" - 03
Launch and choose auth
Run qwen in your project directory. On first launch, use /auth and choose Custom Provider / OpenAI — it prefills API Key, Base URL and Model from the env vars above; press Enter to confirm and start.
cd /path/to/your/project qwen
Two notes
1) Qwen OAuth's free tier was discontinued in 2026 — to connect a third-party endpoint, use Custom Provider / OpenAI under /auth. 2) To pin the config, put it in ~/.qwen/.env (OPENAI_API_KEY and so on), or define it in settings.json's modelProviders and switch with /model.
Common questions
Qwen Code works from environment variables, but image attachments don't
This is a reported behaviour: with only OPENAI_API_KEY, OPENAI_BASE_URL and OPENAI_MODEL set and no modelProviders entry in settings.json, it never infers the model's modalities, so image attachments fail. Define the model explicitly under modelProviders in settings.json, and put modalities in that entry's own generationConfig — the docs call the provider layer impermeable: once a model comes from modelProviders, top-level model.generationConfig fields such as contextWindowSize and modalities are ignored wholesale and only the provider entry counts. Two more things to get right there: the built-in provider ids are openai, anthropic, gemini, vertex-ai and qwen-oauth, and a custom id has to be mapped to one of them through the top-level providerProtocol setting or the whole entry is skipped with a warning and its models never reach the /model picker; and an OpenAI-compatible endpoint defaults to Chat Completions, so use wireApi: "responses" on the model for the Responses API — api is not an alias for it. Also note the Qwen OAuth free tier has been retired, so use Custom Provider / OpenAI under /auth for a third-party endpoint.