Connection and configuration issues
Common errors and solutions
Error message | Possible cause | Solution |
|---|---|---|
400 InvalidParameter: Range of input length should be [1, xxx] | The input exceeds the allowed length. |
|
401 invalid access token or token expired |
|
|
model 'xxx' is not supported |
| The model name must be a model ID supported by Coding Plan; it is case-sensitive and must have no leading or trailing spaces. |
403 invalid api-key | The general Model Studio Base URL was used by mistake | Anthropic-compatible endpoint: OpenAI-compatible endpoint: |
404 status code (no body) | Incorrect Base URL path. For example, in Claude Code the Base URL is incorrectly configured as | Anthropic-compatible endpoint: OpenAI-compatible endpoint: |
Connection error | Base URL typo or network issue | Check the Base URL domain spelling and network connection. |
Connection closed mid-response (usually accompanied by | The connection was interrupted while a streaming response was being transferred, so the response was not returned in full. This often happens due to network fluctuations, or when an unstable local proxy (VPN/HTTP Proxy) drops the long connection to |
|
hour allocated quota exceeded | The 5-hour request quota has been used up | Wait 5 hours for the quota to reset automatically. |
week allocated quota exceeded | The weekly request quota has been used up | Wait until 00:00:00 (UTC+8) on Monday each week for the quota to reset. |
month allocated quota exceeded | The monthly request quota has been used up | Wait until 00:00:00 (UTC+8) on the corresponding day of the subscription month for the quota to reset. |
concurrency allocated quota exceeded | The current number of concurrent requests exceeds the dynamically allocated limit of the platform | Wait a moment and retry. The platform dynamically adjusts the concurrency limit based on overall resource load, and this limit may be triggered during peak hours. |
429 usage allocated quota exceeded | Model call rate limiting is triggered when requests are too frequent within a short period, or resource consumption is high within a short time (for example, large batch tasks causing high input Token peaks). | Retry later; if this occurs frequently, reduce the request frequency and make sure your API Key is not shared with others. If it is triggered by high resource consumption in a short period, it usually recovers after waiting for one hour. It is recommended to split large tasks into multiple smaller tasks and submit them at staggered times. |
What should I do if Claude Code shows the prompt Claude Code has switched from npm to native installer?
This does not affect the normal use of Claude Code. You can run claude install in the terminal to migrate Claude Code to the official native installer version, and follow the commands returned in the terminal to complete the configuration migration.
What should I do if Claude Code reports the error Unable to connect to Anthropic services. Failed to connect to api.anthropic.com: ERR_BAD_REQUEST?
-
Add
"hasCompletedOnboarding": trueas a top-level field in~/.claude.json.It is recommended to use Qwen Code to add it automatically. After starting it by running
qwenin the terminal, send the following content in the chat box:Add "hasCompletedOnboarding": true as a top-level field in the ~/.claude.json file, do not overwrite the existing content.
- Restart Claude Code after saving.
What should I do if OpenCode reports the error Request Entity Too Large?
This error indicates that the request content (such as code context or conversation history) is too large and exceeds the maximum input limit. Handle it as follows:
- Run
/newto start a new chat, or run/compactto compact the context. - If the above methods do not resolve the issue, update OpenCode to version 1.2.16 or later, which fixes the related issue.
What should I do if OpenCode reports the error The thinking_budget parameter must be a positive integer and not greater than 38912?
Reason: The value of budgetTokens in the configuration file opencode.json exceeds the maximum thinking_budget supported by the current model. Different models have different limits; adjust the configuration according to the table below.
Model name | Maximum Chain-of-Thought |
|---|---|
qwen3.7-plus | 262,144 |
qwen3.6-plus | 81,920 |
qwen3.5-plus | 81,920 |
kimi-k2.5 | 81,920 |
glm-5 | 32,768 |
MiniMax-M2.5 | Enabled by default. The budgetTokens parameter is not required. |
opencode.json and adjust the options.thinking.budgetTokens value so that it does not exceed the model's limit. For details, see OpenCode.
What should I do if OpenCode reports the error InternalError.Algo.InvalidParameter: Range of max_tokens should be [1, xxxx]?
Cause: The value of limit.output in the opencode.json configuration file exceeds the maximum number of output tokens (max_tokens) supported by the current model.
Solution: Modify the opencode.json configuration file and adjust the limit value for the corresponding model according to OpenCode.
Do Coding Plan models support thinking mode?
Most Coding Plan models that support deep thinking have thinking mode enabled by default. To enable it in common tools:
The model you are using must support thinking mode.
- Claude Code
- OpenCode
- Qwen Code
- OpenClaw
/config, navigate to Thinking mode, and press Enter to switch the value to true.View the thinking process: Press Ctrl + O.OpenClaw: Call records for unconfigured models
Reason: The openclaw.json file lacks the agents.defaults.models configuration to restrict the range of available models.
Solution: In ~/.openclaw/openclaw.json, explicitly declare the list of allowed models in agents.defaults.models to restrict OpenClaw to calling only the configured models. For more information, see OpenClaw.
OpenClaw: Chat unresponsive after connecting
Possible causes include the following:
- A local proxy (VPN/HTTP Proxy) intercepts or fails to correctly forward requests to
coding-intl.dashscope.aliyuncs.com. - The Base URL in the OpenClaw cache file
~/.openclaw/agents/main/agent/models.jsonpoints to an incorrect address, and requests are sent to an unresponsive endpoint.
- Try to disable the local proxy, or ensure that the proxy can access
coding-intl.dashscope.aliyuncs.com. - Delete the
~/.openclaw/agents/main/agent/models.jsoncache file and restart OpenClaw. After the restart, the cache file will be automatically rebuilt based on the configuration in~/.openclaw/openclaw.json.
What should I do if OpenClaw reports the error Agent failed before reply: OAuth token refresh failed?
This error indicates that you are connected to a third-party OAuth service, not a Coding Plan.
Solution:
- Configure the Coding Plan in OpenClaw. For details, see OpenClaw.
-
Clear the old OAuth credentials and model cache, and then restart OpenClaw.
Before deleting old OAuth credentials, back up the files to allow for a rollback if needed.
What should I do if OpenClaw reports the error Agent failed before reply: Unknown model?
This error indicates that OpenClaw cannot find the specified model in the configuration file. Check the following items in order:
-
Incorrect configuration of the
models.providerskey or model prefix When you use the Coding Plan,models.providersmust contain thebailiankey (which can coexist with other providers). In addition,agents.defaults.model.primarymust be prefixed withbailian/. The correct structure is as follows:
-
Residual configurations from old providers are causing routing conflicts
If you have previously used other providers such as qwen-portal, leftover provider configurations can cause model routing confusion. Clean up irrelevant providers and ensure that the model pointed to by the
primaryfield is correctly defined in themodels.providers.bailian.modelslist. For configuration information, see OpenClaw.
What is qwen-portal/coder-model?
qwen-portal/coder-model is a free model provided by the Qwen Chat web version and is not part of Model Studio. If you try to use this model in Model Studio or Coding Plan, you will receive an error indicating that the model does not exist. Use models supported by Model Studio.
What should I do if OpenClaw reports the error No API key found for provider "xxxxx"?
This error indicates that OpenClaw cannot find the API key for the provider (xxxxx) specified in the error message. Check the following items in order:
-
The corresponding provider configuration is missing in
models.providers. Open the configuration file~/.openclaw/openclaw.jsonand confirm that a key that matches the provider name in the error message exists undermodels.providers.- If you connect to Coding Plan, the configuration must include the
bailiankey (can coexist with other providers). - If the key is missing, add the corresponding provider configuration.
- If you connect to Coding Plan, the configuration must include the
-
The API key for the provider is incorrectly configured.
- Ensure that you have entered a valid API key that is not empty and has no extra spaces.
- If you use Coding Plan, make sure to use the plan key (
sk-sp-xxx). - If the web UI displays
__OPENCLAW_REDACTED__, the API key is already saved and does not need to be re-entered. If it is blank or displaysYOUR_API_KEY, you must enter the key again.
-
An outdated local credentials cache is preventing the new configuration from taking effect.
Before deleting old credentials, back up the files to allow for a rollback if needed.
What should I do if OpenClaw reports the error API rate limit reached?
Check the following items in order:
-
Incorrect OpenClaw configuration
If the base URL or model provider is configured incorrectly, requests may not be routed through the Coding Plan channel and are instead routed to general API calls, triggering a rate limit.
- If you use a Coding Plan subscription, check
models,agents, andgateway(including nested fields) in the OpenClaw configuration file to make sure they are consistent with the documentation configuration. For example, the structure of the model service provider is{ "models": { "providers": { "bailian": {...} } } }. - If you are not currently using a Coding Plan subscription, it is recommended to switch to Coding Plan to obtain the subscription quota.
- If you use a Coding Plan subscription, check
- Exceeded subscription quota: View the subscription usage on the Coding Plan page.
- Try resetting the API Key: If the issue persists after the above troubleshooting, go to the Coding Plan page to reset the API Key.
What should I do if OpenClaw reports the error Failed to discover Alibaba Cloud models at startup?
OpenClaw shows one of the following errors on startup:
Failed to discover Alibaba Cloud models: TimeoutError: The operation was aborted due to timeoutFailed to discover Alibaba Cloud models: 404 Not Found
- This message does not affect the normal operation of OpenClaw and can be ignored.
- If OpenClaw does not run properly, check for other error messages.
- To suppress this prompt, delete
alibaba-cloud:default profilefrom the~/.openclaw/agents/main/agent/auth-profiles.jsonfile. For example:
"profiles": {}, the prompt will no longer appear.
What should I do if OpenClaw reports the error auth.profiles.xxx?
You may see errors similar to the following when using OpenClaw:
auth.profiles.qwen-portal:default.mode: Invalid inputauth.profiles.qwen-portal:default: Unrecognized key: "apiKey"
auth.profiles field in the openclaw.json file was incorrectly modified, such as changing the mode to an invalid value or adding the apiKey field. The auth field stores only authentication metadata, not secret keys. Coding Plan does not need to be configured in auth.profiles.
Solution
- Fix the
auth.profilesconfiguration by deleting incorrectly added or modified fields and unnecessary profiles. - Confirm that the API Key for the Coding Plan is configured in
models.providers.bailian.apiKey. For more information, see OpenClaw.
Does Coding Plan supportAgent Teamsin Claude Code?
Not supported. The following error is reported: "model claude-opus-4-6 is not supported.".
Does Coding Plan support the OpenAI Responses API?
No. Coding Plan only supports the OpenAI Chat Completions protocol and the Anthropic Messages protocol. The OpenAI Responses API is not supported.
Why does the error HTTP 401: Incorrect API key provided occur?
Possible causes:
-
Invalid API Key format: The API Key is empty, has an incorrect format, is incomplete, or contains extra spaces. Make sure that you use the API Key for Coding Plan, which starts with
sk-sp-. Copy the entire key and ensure that it does not contain extra spaces. - Expired or invalid Coding Plan subscription: A Coding Plan-specific API key depends on the subscription status. If your Coding Plan subscription has expired or is invalid, the corresponding key will no longer work. Ensure that your subscription is active.
-
Incorrect Base URL: You have configured a Coding Plan-specific API Key (which starts with
sk-sp-), but the Base URL is still set to the standard Model Studio address, such as https://dashscope-intl.aliyuncs.com/compatible-mode/v1. Based on the AI tool that you are integrating, replace the Base URL with the corresponding Coding Plan-specific address from the table below.Tool
Protocol
Base URL
OpenClaw
OpenAI-compatible
OpenCode
Anthropic-compatible
Claude Code
Anthropic-compatible
Cursor
OpenAI-compatible
VSCode Cline
OpenAI-compatible
Qwen Code
OpenAI-compatible
-
Incorrect API Key used: You configured the Coding Plan Base URL, but incorrectly entered the general-purpose API Key for Model Studio, which starts with
sk-. Please update the API Key to the Coding Plan API Key. -
Configuration error caused by a stale OpenClaw cache: In the
~/.openclaw/agents/main/agent/models.jsonfile, delete theproviders.bailianconfiguration item, and restart OpenClaw.
Why does the error Authentication failed, please make sure that a valid ModelScope token is supplied occur?
This error indicates that you are connected to the third-party ModelScope service, not a Coding Plan. To connect to a Coding Plan, see Connect to client or development tools.
This error occurs when you provide an incorrect credential for the ModelScope API service. Check the following items in order:
- You entered the wrong access credentials for the platform: A ModelScope token is in the format
ms-xxx, while a general API Key for Alibaba Cloud Model Studio is in the formatsk-xxx. The two are independent platforms, and their access credentials are not interchangeable. Go to ModelScope to obtain a token. - Incorrect format: Ensure that there are no extra spaces or line breaks when you copy the ModelScope token.
Why does the error Coding Plan is currently only available for Coding Agents occur?
This error indicates that the call was made from an unsupported tool or environment.
The Coding Plan is exclusively for use within programming tools, such as Claude Code and Qwen Code, and is not supported in tools like curl, Postman, or Dify.
Billing and quota issues
Unexpected charges with a Coding Plan
If you continue to incur charges or have an overdue payment after subscribing to a Coding Plan, this may be for one of the following reasons:
-
Incorrect configuration of the plan-specific API Key and Base URL (Most common reason)
- Reason: If the AI tool is configured with a general API Key (in the format
sk-xxx) and a general Base URL (without the coding keyword), the system recognizes it as pay-as-you-go calls and generates pay-as-you-go bills. - Solution: Make sure to use the Coding Plan subscription configuration. The API Key must be in the format
sk-sp-xxx, and the Base URL must contain thecodingkeyword (for example,https://coding-intl.dashscope.aliyuncs.com/xxx). For more information, see Obtain the subscription-specific API Key and Base URL.
- Reason: If the AI tool is configured with a general API Key (in the format
-
Overdue payment caused by billing settlement delay (charges incurred before activating the Coding Plan subscription)
- Cause: Bills are aggregated by the minute, and bill generation may be delayed by a few minutes. For example, an API call made at 16:00 might not be billed until 16:05, which could be after you subscribed to the Coding Plan.
- Solution: Charges are based on the actual billing time. For details, see Bill queries and cost management.
-
Using general-purpose API credentials by mistake
- Cause: If both general-purpose and subscription plan configurations are kept in the tool, some tools (such as OpenClaw) automatically route requests to the general-purpose credentials, resulting in charges.
- Solution: We recommend removing the general-purpose API configuration from the tool and ensuring that you select a model supported by Coding Plan. For example, in OpenCode, select the model whose provider is labeled Model Studio Coding Plan.
-
Client-side cache not cleared
- Cause: After you configure new credentials, some tools might still use cached versions of the old general-purpose API credentials.
- Solution: Clear the cache and restart the tool. For example, with OpenClaw, delete the
~/.openclaw/agents/main/agent/models.jsonfile, runopenclaw gateway restartto restart the service, and then reconfigure it according to the OpenClaw documentation.
Quota exhaustion
- Lite plan: If you use up your 5-hour or weekly quota, wait for it to reset automatically. If you use up your monthly quota, you must wait until the next subscription cycle for it to reset.
- Pro plan: If you use up your 5-hour or weekly quota, wait for it to reset automatically. If you use up your monthly quota, you must wait until the next subscription cycle for it to reset.
Auto-switch to pay-as-you-go
No. After your Coding Plan quota is exhausted, further API calls will fail with an error, and usage will not automatically switch to pay-as-you-go. To continue using the service, you must wait for your quota to reset in the next subscription cycle.
Free trial and Coding Plan
Coding Plan is a standalone subscription product, and its billing and quota system does not participate in the free trial program for Model Studio's general-purpose models.
Subscription period calculation
Your subscription becomes active at the moment of purchase and expires at 23:59:59 (UTC+8) on the corresponding day of the following month. If the following month does not have a corresponding day, the subscription expires at 23:59:59 (UTC+8) on the last day of that month.
For example: If you subscribe to a Coding Plan on February 3, 2026, it will be valid until March 3, 2026.
Viewing token consumption
This is not currently supported. The Coding Plan's quota consumption is based on the number of model calls, not on token consumption. You can view your usage information on the Coding Plan page.
Usage by specific model
This is not supported. The Coding Plan page only displays the overall consumption and remaining quota for the entire plan.
Annual subscription
Currently, the Coding Plan is only available as a monthly subscription. An annual plan is not yet available.
Auto-renewal failure
This may be due to the following reasons:
- The setting has not taken effect yet: After auto-renewal is enabled, it takes effect the next day rather than immediately.
- The auto-deduction period has passed: Auto-renewal starts deduction at 08:00:00 (UTC+8) nine days before the resource expires. If the deduction fails, it will be retried the next day until it succeeds or until one day before expiration. Auto-renewal is not supported within one day before the resource expires; please renew manually.
- Insufficient account balance: Auto-renewal deducts fees from the valid payment method bound to your account. Please ensure that your payment method is valid and has a sufficient balance.
Renewal after expiration
No, renewal is not supported after the subscription has expired.
Duplicate renewal error
Cause: You have already renewed your subscription for the next month, and renewing for additional months is not supported.
Early renewal service period
When you purchase a one-month plan, the subscription duration is calculated by calendar month. The plan becomes active upon purchase and expires at 23:59:59 (UTC+8) on the corresponding day of the following month. If the next month does not have a corresponding day, it expires at 23:59:59 (UTC+8) on the last day of that month. If you renew early, the new period extends from the original expiration date.
For example:
- An initial subscription on March 15 at 10:00 expires on April 15 at 23:59:59.
- If you renew for one month on April 10, the new expiration date extends to May 15 at 23:59:59.
Using coupons for renewal
Yes, you can use general-purpose coupons.
Subscription renewal
You can renew the Pro plan on the Coding Plan page or the Renewal page. For information about the discontinuation of renewals for the Lite Basic plan, see the Announcement.
Product features
Supported models
The Lite and Pro plans both support all models included in the plans (including Qwen, GLM, Kimi, and MiniMax). For the complete model list, see Coding Plan overview.
Model list updates
The models supported by Coding Plan are updated from time to time. The currently supported models are subject to those shown on the Coding Plan overview page. Stay tuned.
Subscription limit
Each Model Studio account can subscribe to only one Coding Plan at a time (regardless of whether it is the Lite or Pro plan).
Can I use models outside the supported model list?
Coding Plan currently supports only the models in the supported model list; using other models will cause an error.
Response speed of Lite and Pro plans
The Lite and Pro plans offer the same response speed because they use the same model resources and inference service.
Lite plan renewal and upgrade
Effective April 13, 2026, the Lite plan will no longer be available for renewal and cannot be upgraded to the Pro plan. For details, see the announcement.
- If you have a Lite plan, you can use it until it expires.
- If you have enabled auto-renewal for your Lite plan, the system will automatically deactivate it 30 days after the announcement date. You can continue to use the plan until the current service period ends.
Downgrading to the Lite plan
No, downgrading is not supported.
Concurrency limit
Yes, the Coding Plan has a concurrency limit. The platform dynamically adjusts this limit based on the overall resource load to prevent overload during peak hours and ensure a stable response speed and inference quality for each agent. If you reach the concurrency limit, wait a few moments and retry.
Multi-user support
The Coding Plan API key is for personal use only and must not be shared. If the system detects that your API key has been publicly exposed, it may be automatically disabled.
Sharing a Pro plan
No. Keep your API key secure. Do not share it with others or expose it in client-side code. If the system detects that your API key has been publicly exposed, it may be automatically disabled.
Model context windows and overflow handling
Model name | Context window (tokens) |
|---|---|
qwen3.7-plus | 1,000,000 |
qwen3.6-plus | 1,000,000 |
qwen3.5-plus | 1,000,000 |
kimi-k2.5 | 262,144 |
glm-5 | 202,752 |
MiniMax-M2.5 | 196,608 |
- Switch models: Switch to a model that supports a larger context window, such as qwen3.7-plus, qwen3.6-plus, qwen3.5-plus, or.
- Reduce irrelevant files: We recommend starting your AI coding tool in the specific project directory and keeping only necessary project files.
- Break down tasks: Split complex tasks into smaller subtasks and ask about them individually to reduce the context used in a single request.
- Provide precise instructions: Vague requests can trigger unnecessary file scanning. Use clear and specific questions or instructions when using an AI coding tool.
Resetting the API key
On the Coding Plan page, click the Reset button next to your Coding Plan API key.
If a Coding Plan expires and is not renewed, is the API Key reset upon reactivation?
Yes, it will be reset. If you renew before the expiration date, your API key will not be reset.
Expiration reminders
Yes. The system sends renewal reminders 7, 3, and 1 day before your subscription expires via in-site messages, emails, SMS, and automated voice calls.
Configuring expiration notifications
This is not supported. The system automatically sends expiration reminders 7, 3, and 1 day before your subscription expires via in-site messages, emails, SMS, and automated voice calls. Manual subscription is not required.
Multiple API keys
No. Currently, only one API key is supported per Coding Plan subscription.
IP allowlist support
No. If your API key is compromised, reset it on the Coding Plan page.
RAM user access to API key
Please contact the Alibaba Cloud account owner or a RAM user with administrative permissions to add the Subscription Plans permission to your account.
Using with VSCode
Use a VS Code extension that supports OpenAI- or Anthropic-compatible APIs, such as Qwen Code or Claude Code.
Model quantization
The models in the Coding Plan, such as glm-5 and qwen3.5-plus, are full-featured versions that have not been subject to quantization or feature reduction.
Coding Plan vs. AI General-purpose Savings Plan
Feature | ||
|---|---|---|
Use case | For AI coding tools (such as Claude Code, OpenClaw, etc.) | To offset pay-as-you-go fees for general-purpose Model Studio API calls |
API key format |
|
|
Base URL domain |
|
|
Billing method | Monthly subscription | Billed based on token usage |
Applicable scenarios | Interactive AI programming | API calls and application development |