Skip to content

LLM Model Configuration By CLI UI

Carry Code supports 17+ AI model providers. You can add, switch, or manage different models at any time.


Carry Code supports these AI model providers out of the box:

ProviderExample ModelsProtocolFeatures
OpenAIGPT-4o, GPT-5.2OpenAIComprehensive capabilities
AnthropicClaude Opus 4.5, Claude SonnetAnthropicStrong programming
GoogleGemini 3 Pro, Gemini 3 FlashGeminiStrong multimodal
DeepSeekDeepSeek R1, DeepSeek V3OpenAI CompatibleHigh cost-performance
Moonshot / KimiKimi K2OpenAI CompatibleStrong Chinese
Zhipu AIGLM-4.7OpenAI CompatibleDomestic service
MiniMaxMiniMax M2.1AnthropicMultimodal
Alibaba CloudTongyi Qianwen Qwen3 MaxOpenAI CompatibleStable domestic
xAIGrok 4OpenAI CompatibleElon Musk’s AI
SiliconFlowDeepSeek V3.2OpenAI CompatibleAPI aggregation
OllamaAny local modelOllamaFree local
vLLMAny local modelvLLMLocal deployment
OpenAI CompatibleAny compatible endpointOpenAI CompatibleSelf-hosted

  1. Type /model and press Space
  2. Select add
  3. 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)

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"
}
]
}

  1. Type /model and press Space
  2. Select the model you want to use from the list
  3. Press Enter to confirm

  1. Type /model edit
  2. Select the model to edit from the list
  3. Modify the configuration in the editor
/model edit deepseek:deepseek-chat

Edit the config file at ~/.carry/carrycode.json:

{
"providers": [
{
"providerId": "openai",
"modelName": "gpt-4o",
"apiKey": "your-key",
"temperature": 0.7,
"maxTokens": 4000
}
]
}

  1. Type /model edit
  2. Select the model to edit
  3. 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.


The default model is automatically set to the first configured model. To change it:

  1. Edit the config file at ~/.carry/carrycode.json
  2. Reorder the providers array - the first model will be the default

Or use the environment variable:

Terminal window
export CARRYCODE_MODEL="deepseek:deepseek-chat"

See Environment Variable Model Configuration for more details.


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
}
]
}
ParameterDescriptionRecommended
temperatureRandomness control (0-2)0.7
maxTokensMax output tokens4000
topPNucleus sampling probability0.9

If you want to use AI for free, you can install Ollama:

  1. Install Ollama: https://ollama.ai
  2. Download models: ollama pull llama2
  3. Add Ollama config in Carry Code
ProviderFree Credits
DeepSeek¥10 on sign-up
Alibaba Cloud¥60 on sign-up
SiliconFlow¥14 on sign-up

  • Programming tasks: Claude Sonnet or GPT-4o recommended
  • Chinese tasks: DeepSeek or Kimi recommended
  • Free usage: Ollama local deployment recommended

No. The conversation context is preserved when switching models.

The current model name is displayed at the top of the interface.


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.