Use Alibaba Cloud Model Studio models in Kilo CLI.
Quick Start
- 1
Start Kilo CLI
- 2
Connect the provider
Enter/connect, select the provider for your billing plan, and enter the API key:- Token Plan
- Pay-as-you-go
- Coding Plan
Select Alibaba Token Plan (China) and enter the Token Plan API key for your edition:- Token Plan Personal Edition: Create or view API Key
- Token Plan Team Edition: Assign a seat and get the API Key
- 3
Select a model
Enter/modelsand select the model you want. - 4
Verify
Configure with a Configuration File
In addition to the options above, you can also connect using a configuration file.
- 1
Open or create the configuration file
- macOS / Linux:
~/.config/kilo/config.json - Windows:
C:\Users\<username>\.config\kilo\config.json
- macOS / Linux:
- 2
Add the configuration
ReplaceYOUR_API_KEYwith the API key for your plan, and add the configuration toconfig.json.- Token Plan Personal Edition
- Token Plan Team Edition
- Pay-as-you-go
- Coding Plan
When using qwen4-max, the default single-request output limit is 32000. To allow longer output, setKILO_EXPERIMENTAL_OUTPUT_TOKEN_MAX; changing onlylimit.outputdoes not raise the limit. qwen4-max has a 1M-token context. The maximum output is 131,072 tokens in non-thinking mode and 262,144 tokens for thinking and the final answer combined. The defaults are reasoning_effort=high and thinking_budget=131072. - 3
Verify
After saving, run the following command:Replace<provider>/<model>with the provider and model for your plan, such asbailian-token-plan/auto.
Error Codes
If you encounter errors during configuration, refer to the FAQ documentation for your billing plan:
- Token Plan: Personal Edition FAQ · Team Edition FAQ
- Pay-as-you-go: Error codes
- Coding Plan: Coding Plan FAQ
FAQ
How do I use savings plans and resource plans with pay-as-you-go?
How do I use savings plans and resource plans with pay-as-you-go?
The pay-as-you-go setup remains the same: use your general Model Studio API key and Base URL. After you purchase a savings plan or resource plan, it takes effect automatically and eligible usage is deducted automatically. See Savings plans and resource plans.
The model I need is not in the list
The model I need is not in the list
Add the model ID to
models in config.json in the same format, save the file, and reopen Kilo CLI. For supported models, see the supported model list for your billing plan. Requests return 401 Unauthorized
Requests return 401 Unauthorized
The API Key does not match the Base URL, or the key belongs to another billing plan. Confirm that the key type matches
baseURL in the configuration, then save the configuration again.