Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Setup guide - From Qwen and Aider docs

Use Qwen in Aider

Aider documents connecting to any OpenAI-compatible endpoint via OPENAI_API_BASE and OPENAI_API_KEY, with the model prefixed openai/. Model Studio documents the OpenAI-compatible base URLs and Qwen model ids.

Last verified 3 steps4 official sources

Steps

  1. Step 1.

    Set the endpoint and key (pay-as-you-go Singapore shown; replace {WorkspaceId}).

    Terminal
    # Mac/Linux:
    export OPENAI_API_BASE=https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1
    export OPENAI_API_KEY=<your Model Studio API key>
    
    # Windows:
    setx OPENAI_API_BASE https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1
    setx OPENAI_API_KEY <your Model Studio API key>
    # ... restart shell after setx commands
  2. Step 2.

    Start aider in your project with the model name prefixed with openai/.

    Terminal
    cd /to/your/project
    aider --model openai/qwen3.7-plus
  3. Step 3.

    Coding Plan alternative: set OPENAI_API_BASE to the Coding Plan endpoint and OPENAI_API_KEY to the Coding Plan key.

    Terminal
    export OPENAI_API_BASE=https://coding-intl.dashscope.aliyuncs.com/v1

Caveats

  • Combined setup: Aider's documented OpenAI-compatible mechanism plus Model Studio's documented base URLs and model ids. There is no Aider-specific Model Studio guide.
  • Aider prints model warnings for models it doesn't recognise (see aider's model warnings docs).
  • Model Studio plan keys (Coding Plan, Token Plan) are restricted to interactive AI coding tools; do not use them for scripts or backends.
  • Replace {WorkspaceId}; keys are region-specific.

FAQ

How do I use Qwen in Aider?

Aider documents connecting to any OpenAI-compatible endpoint via OPENAI_API_BASE and OPENAI_API_KEY, with the model prefixed openai/. Model Studio documents the OpenAI-compatible base URLs and Qwen model ids.

Which Qwen model ids work in Aider?

The official docs read for this guide list qwen3.7-plus, qwen3.6-plus and qwen3.7-max. Requests go to https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1.

Is this an official Qwen and Aider setup?

The steps draw on both Qwen's and Aider's docs. It was last checked against 4 official pages on October 17, 2026.

Sources

Last verified against 4 official pages.

Newsletter

New models, set up the day they ship

One email per week. New model releases, the coding tools that support them and how to wire them up.