Privacy settings

Privacy and GDPR notice

Nfero uses essential storage for language preferences and demo access controls. With your consent, Google Analytics and lightweight usage events help improve model demos and outbound subscription routing. Live demo prompts may be sent to configured Alibaba-hosted model endpoints.

Tool + model pairing

Qwen Code with Alibaba Coding Plan and Token Plan

Open-source CLI coding tool with Alibaba Model Studio authentication and model switching.

Qwen Code is the most direct Alibaba-aligned terminal workflow. It provides a guided `/auth` flow for Token Plan, Coding Plan, and pay-as-you-go, plus explicit model switching and shared configuration for its IDE companions.

Choose the right access route

Choose the right access route

Start here if you want the least ambiguous setup. Use `/auth` instead of hand-editing configuration unless you need several named models or reproducible team setup instructions.

RecommendedEither plan works; choose by usage pattern, not model branding

Token Plan (Team Edition)

Best for assigned users who want Credits-based access, team administration, and the broader Token Plan model pool.

Coding Plan

Best for one developer who wants a fixed monthly interactive-coding allowance and is comfortable with rolling and weekly request quotas.

Pay-as-you-go Model Studio API

Use for application code, automation, CI, batch evaluation, or any direct API workload outside Qwen Code's interactive session.

Safe configuration pattern

Prefer the built-in plan authentication flow

The example is deliberately redacted. Replace placeholders only on your device and never paste a real API key into Nfero.

Before you start

  1. Install Qwen Code using Alibaba's current installer and verify it with `qwen --version`.
  2. Get the dedicated key from the Token Plan or Coding Plan subscription you intend to use.
  3. Keep plan credentials separate if you also use a general Model Studio API key.
  4. Choose exact model IDs from the current supported-model list.

Safe configuration pattern

Protocol
OpenAI-compatible
Configuration path
~/.qwen/settings.json (macOS/Linux) or %USERPROFILE%\.qwen\settings.json (Windows)
  1. Launch `qwen` and enter `/auth`.
  2. Choose Subscription Plan, then select Alibaba Cloud Model Studio Token Plan or Coding Plan.
  3. Enter the dedicated key for that plan on your device.
  4. Use `/model` to select an exact supported model. The redacted example shows the equivalent Token Plan structure for advanced configuration.
json
{
  "env": {
    "BAILIAN_TOKEN_PLAN_API_KEY": "YOUR_TOKEN_PLAN_API_KEY"
  },
  "modelProviders": {
    "openai": [{
      "id": "qwen3.7-plus",
      "name": "[Token Plan Team Edition] qwen3.7-plus",
      "baseUrl": "https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",
      "envKey": "BAILIAN_TOKEN_PLAN_API_KEY"
    }]
  },
  "security": { "auth": { "selectedType": "openai" } },
  "model": { "name": "qwen3.7-plus" },
  "$version": 3
}

Verify the connection

  • Run `/auth` and confirm the expected billing plan is selected.
  • Run `/model` and select the model you configured.
  • Run `/stats` after a small task to inspect session usage.
  • Use `/compress` or start a fresh session when a long conversation approaches the context limit.

Model pairings

Recommended starting models

Use this tool to run interactive coding, reasoning, review, and documentation tasks with each model. Confirm final model availability and exact plan support in Alibaba Cloud before production use.

Text generationReasoningVisual understanding
Best pairing angle

Recommended current default for Coding Plan and a capable Token Plan coding model.

Text generationReasoning
Best pairing angle

Strong long-context alternative for larger repositories and multi-step agent work.

Text generationReasoningVisual understanding
Best pairing angle

Fast, efficient Token Plan option for small edits and routine explanations.

Common problems

Common problems

What you see

401 invalid access token

Likely cause

A general Model Studio key was used with a plan endpoint, or a plan key was paired with the wrong endpoint.

What to do

Return to `/auth`, select the actual subscription, and re-enter that subscription's dedicated key.

What you see

The expected model is missing from `/model`

Likely cause

The model was not added to `modelProviders`, the ID is not exact, or Qwen Code has not reloaded the file.

What to do

Check the current allowlist, correct the ID, save `settings.json`, and restart Qwen Code.

What you see

Input length or context error

Likely cause

Repository context and conversation history exceed the model's input limit.

What to do

Use `/compress`, start a new session, narrow the working directory, or switch to a documented longer-context model.

What you see

Unexpected pay-as-you-go charges

Likely cause

Qwen Code is using a general Model Studio key or general endpoint instead of the dedicated plan pair.

What to do

Check `/auth` and the endpoint in `settings.json`; both the key and URL must belong to the subscribed plan.

Important restrictions

  • Use the dedicated API key and base URL from the same Alibaba billing plan. Coding Plan, Token Plan, and general Model Studio credentials are not interchangeable.
  • Plan keys are for the assigned user in an interactive coding or agent tool. Do not share them, commit them to a repository, or expose them in screenshots.
  • Do not use a Coding Plan or Token Plan key for automated scripts, batch jobs, application backends, public services, or other non-interactive API workloads. Use pay-as-you-go Model Studio API access for those workloads.
  • Model availability is an exact-string allowlist and can change. Confirm the model ID in the current Alibaba plan documentation before editing a working configuration.