LLM Model Configuration By CLI UI
Carry Code supports 17+ AI model providers. You can add, switch, or manage different models at any time.
Supported Providers
Section titled “Supported Providers”Carry Code supports these AI model providers out of the box:
| Provider | Example Models | Protocol | Features |
|---|---|---|---|
| OpenAI | GPT-4o, GPT-5.2 | OpenAI | Comprehensive capabilities |
| Anthropic | Claude Opus 4.5, Claude Sonnet | Anthropic | Strong programming |
| Gemini 3 Pro, Gemini 3 Flash | Gemini | Strong multimodal | |
| DeepSeek | DeepSeek R1, DeepSeek V3 | OpenAI Compatible | High cost-performance |
| Moonshot / Kimi | Kimi K2 | OpenAI Compatible | Strong Chinese |
| Zhipu AI | GLM-4.7 | OpenAI Compatible | Domestic service |
| MiniMax | MiniMax M2.1 | Anthropic | Multimodal |
| Alibaba Cloud | Tongyi Qianwen Qwen3 Max | OpenAI Compatible | Stable domestic |
| xAI | Grok 4 | OpenAI Compatible | Elon Musk’s AI |
| SiliconFlow | DeepSeek V3.2 | OpenAI Compatible | API aggregation |
| Ollama | Any local model | Ollama | Free local |
| vLLM | Any local model | vLLM | Local deployment |
| OpenAI Compatible | Any compatible endpoint | OpenAI Compatible | Self-hosted |
Adding a New Model
Section titled “Adding a New Model”Method 1: Interactive Add (Recommended)
Section titled “Method 1: Interactive Add (Recommended)”- Type
/modeland press Space - Select
add - Follow the prompts to enter:
- Provider type (e.g.,
openai,deepseek,anthropic) - Model name (e.g.,
gpt-4o,deepseek-chat) - API Key (your key)
- API URL (optional, for custom endpoints)
- Provider type (e.g.,
Method 2: Manual Config Edit
Section titled “Method 2: Manual Config Edit”The config file is located at ~/.carry/carrycode.json:
{ "providers": [ { "providerId": "deepseek", "modelName": "deepseek-chat", "apiKey": "your-api-key-here", "baseUrl": "https://api.deepseek.com" } ]}Switching Models
Section titled “Switching Models”Interactive Selection (Recommended)
Section titled “Interactive Selection (Recommended)”- Type
/modeland press Space - Select the model you want to use from the list
- Press Enter to confirm
Editing Existing Models
Section titled “Editing Existing Models”Interactive Edit
Section titled “Interactive Edit”- Type
/model edit - Select the model to edit from the list
- Modify the configuration in the editor
Direct Edit
Section titled “Direct Edit”/model edit deepseek:deepseek-chatModify Model Parameters
Section titled “Modify Model Parameters”Edit the config file at ~/.carry/carrycode.json:
{ "providers": [ { "providerId": "openai", "modelName": "gpt-4o", "apiKey": "your-key", "temperature": 0.7, "maxTokens": 4000 } ]}Deleting Models
Section titled “Deleting Models”- Type
/model edit - Select the model to edit
- In the editor, delete the model or clear its API key
Alternatively, edit the config file directly at ~/.carry/carrycode.json and remove the provider entry.
Setting Default Model
Section titled “Setting Default Model”The default model is automatically set to the first configured model. To change it:
- Edit the config file at
~/.carry/carrycode.json - Reorder the
providersarray - the first model will be the default
Or use the environment variable:
export CARRYCODE_MODEL="deepseek:deepseek-chat"See Environment Variable Model Configuration for more details.
Model Parameter Tuning
Section titled “Model Parameter Tuning”You can adjust model parameters in the config file:
{ "providers": [ { "providerId": "openai", "modelName": "gpt-4o", "apiKey": "your-key", "temperature": 0.7, "maxTokens": 4000, "topP": 0.9 } ]}Parameter Description
Section titled “Parameter Description”| Parameter | Description | Recommended |
|---|---|---|
temperature | Randomness control (0-2) | 0.7 |
maxTokens | Max output tokens | 4000 |
topP | Nucleus sampling probability | 0.9 |
Free Model Recommendations
Section titled “Free Model Recommendations”Ollama (Local Free)
Section titled “Ollama (Local Free)”If you want to use AI for free, you can install Ollama:
- Install Ollama: https://ollama.ai
- Download models:
ollama pull llama2 - Add Ollama config in Carry Code
Free API Credits
Section titled “Free API Credits”| Provider | Free Credits |
|---|---|
| DeepSeek | ¥10 on sign-up |
| Alibaba Cloud | ¥60 on sign-up |
| SiliconFlow | ¥14 on sign-up |
Q: Which model should I choose?
Section titled “Q: Which model should I choose?”- Programming tasks: Claude Sonnet or GPT-4o recommended
- Chinese tasks: DeepSeek or Kimi recommended
- Free usage: Ollama local deployment recommended
Q: Will switching models lose context?
Section titled “Q: Will switching models lose context?”No. The conversation context is preserved when switching models.
Q: How to view the current model?
Section titled “Q: How to view the current model?”The current model name is displayed at the top of the interface.
Environment Variable Configuration
Section titled “Environment Variable Configuration”Carry Code also supports configuring models via environment variables, which is useful for:
- CI/CD pipelines
- Container deployments
- Quick setup without editing config files
For detailed information, see Environment Variable Model Configuration.
Next Steps
Section titled “Next Steps”- MCP Servers - Extend AI capabilities
- Skills - Use preset skills
- Themes - Customize the interface