Skip to content

bug(cli): /model lists discontinued qwen-oauth coder-model even when OAuth is not configured #5160

@callmepopo

Description

@callmepopo

What happened?

In Qwen Code CLI 0.18.0, running /model shows the discontinued built-in Qwen OAuth model as the first selectable entry even when the user is not using OAuth and has no OAuth model provider configured:

1. [qwen-oauth] coder-model (Discontinued)
   Discontinued — switch to Coding Plan or API Key
2. [openai] ...

This is confusing for users who have already switched to API Key / OpenAI-compatible providers. It makes the UI look like an old Qwen OAuth account is still logged in or still configured locally, even though the active auth type is openai.

Local configuration was verified as follows:

  • ~/.qwen/settings.json has security.auth.selectedType = "openai"
  • modelProviders only contains openai providers
  • no local OAuth/token/credential file was found under ~/.qwen
  • no shell environment variable such as QWEN_DEFAULT_AUTH_TYPE=qwen-oauth was present

The behavior appears to come from the built-in model registry rather than user configuration:

  • ModelRegistry registers qwen-oauth / QWEN_OAUTH_MODELS unconditionally
  • user modelProviders.qwen-oauth is ignored/skipped
  • getAllConfiguredModels() returns all auth types and explicitly orders qwen-oauth first
  • ModelDialog calls config.getAllConfiguredModels() and renders the discontinued item
  • selecting the item is already blocked with the discontinued warning, so it is visible but unusable

Related but not identical:

What did you expect to happen?

If Qwen OAuth is discontinued and the user is not currently configured for OAuth, /model should not list [qwen-oauth] coder-model as an available model option.

A better behavior would be one of:

  1. Hide discontinued registry models from the CLI model picker by default, especially when no OAuth runtime snapshot is active.
  2. Move discontinued OAuth entries to a separate migration/auth notice instead of showing them as model options.
  3. Provide a documented setting to hide discontinued built-in auth providers from /model.

The model picker should show only usable configured models, or at least not put an unusable discontinued model as the first option.

Client information

Client Information
Qwen Code CLI: 0.18.0
Node.js: v22.18.0
npm: 10.9.3
OS: macOS 26.5.1
Architecture: arm64
Install source: npm package @qwen-code/qwen-code

Login information

Using API Key / OpenAI-compatible configuration via ~/.qwen/settings.json:

  • security.auth.selectedType = "openai"
  • custom modelProviders.openai entries are configured
  • API keys are referenced through environment keys and are intentionally omitted here

Anything else we need to know?

This is not a request to restore Qwen OAuth. The issue is that the CLI model selector presents a discontinued, unusable built-in model as if it were still part of the user's available model list, which leads users to look for a non-existent OAuth account/logout state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    category/cliCommand line interface and interactionpriority/P2Medium - Moderately impactful, noticeable problemscope/interactiveInteractive CLI featuresscope/model-switchingModel selection and switchingscope/oauthOAuth authentication flowsstatus/needs-triageIssue needs to be triaged and labeledtype/bugSomething isn't working as expectedwelcome-pr

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions