Pi Coding Agent CLI + Alibaba Cloud Model Studio Token Plan: Troubleshooting “No Matching Models” After Successful Login

Problem Overview: Why Does Pi Coding Agent Show No Models After Alibaba Token Plan Login?

Pi Coding Agent CLI can successfully authenticate with Alibaba Cloud Model Studio Token Plan, but still fail to display any available models.

The typical symptom looks like this:

Only showing models from configured providers. Use /login to add providers.

No matching models

At first glance, this error looks like an authentication problem. However, during troubleshooting, the actual issue was different.

The login process was successful:


  • Alibaba Model Studio Plan provider was registered.

  • Token Plan authentication completed.

  • API endpoints were generated correctly.

The failure happened later when Pi tried to fetch the available model catalog.

The final provider status showed:

Plan: logged in

Anthropic:
https://token-plan.ap-southeast-1.maas.aliyuncs.com/apps/anthropic

OpenAI:
https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1

Models:
0 (not fetched)

This distinction is important.

A missing model list does not always mean the API key is invalid. In AI coding agent integrations, authentication, provider registration, model discovery, and model execution are separate stages.


Environment Information

What environment was used for this Pi Coding Agent troubleshooting?

The issue was reproduced in the following environment:

Component Version / Information
Operating System Windows
AI Agent Pi Coding Agent CLI
Pi Version 0.80.10
Integration Package pi-alibaba-models
Cloud Service Alibaba Cloud Model Studio
Subscription Type Token Plan

Check the Pi version:

pi --version

Output:

0.80.10

Check installed Pi extensions:

pi list

Output:

User packages:

npm:pi-alibaba-models

C:\Users\reanod\.pi\agent\npm\node_modules\pi-alibaba-models

The Pi installation and extension installation were both working correctly.

The problem was not caused by a broken Pi installation.


Installing Alibaba Model Studio Integration

Why did the first Alibaba plugin installation not work?

The first attempt was installing:

pi install npm:pi-bailian-models

After installation, Pi was restarted:

pi

Then the login command was executed:

/login

However, the expected Alibaba provider option did not appear.

The expected option was something similar to:

Alibaba Model Studio Coding Plan

or:

Bailian Coding Plan

This indicated that the extension was installed but did not properly register the required provider.


Switching to pi-alibaba-models

Which plugin should be used for Alibaba Token Plan?

The working integration used:

pi install npm:pi-alibaba-models

After installation:

pi list

showed:

User packages:

npm:pi-alibaba-models

After restarting Pi and running:

/login

the Alibaba provider appeared:

Alibaba Model Studio Plan

At this point, the authentication flow was working.


Login Successful, But /model Shows “No Matching Models”

Why can Pi login successfully but still have no available models?

After selecting:

Alibaba Model Studio Plan

and entering the Token Plan API key, login completed successfully.

However, running:

/model

returned:

Only showing models from configured providers.

Use /login to add providers.

No matching models

Refreshing the model catalog:

Model catalogs refreshed.

did not change the result.

The key question became:

Is the Alibaba login failing, or is the model discovery process failing?


Understanding Pi’s Model Discovery Process

How does an AI coding agent find available models?

A coding agent does not directly jump from API key to model execution.

The typical flow is:

User
 |
 | API Key / Token
 |
Authentication
 |
Provider Registration
 |
Model Catalog Discovery
 |
Model Selection
 |
Model API Request

Each stage can fail independently.

For this case:

Stage Status
Token authentication Successful
Provider registration Successful
Model catalog discovery Failed
Model selection Failed

The failure happened before actual model usage.


Checking Alibaba Provider Status

How can you confirm where the problem happens?

Pi provides Alibaba-specific status information.

Inside Pi:

/alibaba

Open:

Status

The result was:

Plan: logged in

Anthropic:
https://token-plan.ap-southeast-1.maas.aliyuncs.com/apps/anthropic

OpenAI:
https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1

Models:
0 (not fetched)


Cloud:
not logged in

Domain:
dashscope-intl.aliyuncs.com

Format:
anthropic-messages

Models:
1 (live, not cached)

This output provided the key information.


Root Cause Analysis

What does “Models: 0 (not fetched)” mean?

The important line is:

Models:
0 (not fetched)

It means:


  • Pi knows Alibaba Model Studio Plan exists.

  • Authentication completed.

  • The provider configuration was loaded.

  • The model catalog was never successfully retrieved.

The issue is not the API endpoint.

The issue is model metadata discovery.

Without the model catalog, Pi has nothing to display when running:

/model

Why Is Alibaba Cloud Model Studio Plan Different From Cloud API?

Why does Cloud have models while Plan does not?

The status output showed:

Cloud:

Models:
1

but:

Plan:

Models:
0

These two providers use different mechanisms.

Alibaba Cloud API access usually works through the DashScope API model list.

Token Plan uses a dedicated subscription-based model catalog.

Therefore:


  • Cloud API working does not prove Token Plan is working.

  • Token Plan login working does not prove the model catalog is available.

They are separate paths.


Troubleshooting Steps

Step 1: Verify Pi extension installation

Run:

pi list

Expected:

npm:pi-alibaba-models

If missing:

pi install npm:pi-alibaba-models

Restart Pi afterward.


Step 2: Verify Pi version

Run:

pi --version

Example:

0.80.10

An outdated Pi version may cause compatibility problems with extensions.


Step 3: Refresh Alibaba model catalogs

Inside Pi:

/alibaba

Choose:

Refresh model lists

Then check:

/alibaba

again.

Expected:

Models:
>0

If the value remains:

Models:
0

the catalog retrieval process is still failing.


Possible Causes of Model Catalog Failure

Network access problems

The Token Plan model list requires additional network requests.

Possible causes:


  • Corporate firewall

  • Proxy configuration problems

  • Restricted outbound connections

  • DNS failures

  • Regional endpoint access issues

A successful login does not guarantee that every required endpoint is reachable.


Missing or corrupted local cache

Pi stores local configuration and cache files under:

C:\Users\reanod\.pi\agent\

If the Alibaba model cache is:


  • missing

  • empty

  • invalid

Pi may display:

Models: 0 (not fetched)

even though authentication is correct.


Incorrect API key type

Alibaba Cloud provides different API credential types.

A normal API key may look like:

sk-xxxxxxxx

A Token Plan key may use a different prefix, such as:

sk-sp-xxxxxxxx

or:

sk-tok-xxxxxxxx

Using a standard API key with a Token Plan provider can cause unexpected behavior.


Practical Debugging Checklist

Installation

pi install npm:pi-alibaba-models

Verify Pi version

pi --version

Verify extensions

pi list

Login

Inside Pi:

/login

Select:

Alibaba Model Studio Plan

Check Alibaba status

/alibaba

Open:

Status

Look for:

Plan: logged in
Models: number

Select models

Run:

/model

A working setup should show models such as:

qwen3-coder-plus
qwen3-coder-next
qwen3-plus

Lessons Learned From This Troubleshooting Process

The biggest mistake during AI agent integration is treating every failure as an authentication problem.

In this case:


  • The API key was valid.

  • The login process worked.

  • The provider existed.

The failure was in the model catalog retrieval stage.

A better troubleshooting approach is to identify the failing layer first:

Error Likely Cause
Login failed API key or account problem
Provider missing Extension problem
Models: 0 Model catalog retrieval problem
Model request failed API endpoint or quota problem

This approach avoids unnecessary reinstallations and configuration changes.


Quick Reference: Pi + Alibaba Token Plan Troubleshooting

Installation

pi install npm:pi-alibaba-models

Version check

pi --version

Plugin check

pi list

Login

/login

Choose:

Alibaba Model Studio Plan

Status check

/alibaba

Verify:

Plan: logged in
Models: >0

Model selection

/model

FAQ

Can Pi Coding Agent use Alibaba Cloud Token Plan?

Yes. Pi can connect to Alibaba Model Studio Token Plan through Alibaba-compatible extensions.


Why does Pi show “No matching models” after login?

Because login success only confirms authentication. The model catalog may still fail to load.


Does “Models: 0” mean my API key is invalid?

Not necessarily. It usually indicates that Pi could not fetch the available model list.


Why does Alibaba Cloud API show models while Token Plan does not?

They are different providers with different model discovery mechanisms.


Should I buy another Alibaba API subscription?

Usually no. First verify provider status, model catalog retrieval, and network connectivity.


How do I know the issue is fixed?

Run:

/model

If Alibaba Plan models appear, the integration is working.


What is the most important debugging rule for AI agent integrations?

Always separate authentication, provider registration, model discovery, and model execution problems. Identifying the failed layer saves significant troubleshooting time.