Zed Editor
Configure Zed's built-in AI features to use Chuizi.AI for inline code generation and chat with any model.
Prerequisites
- Zed editor installed
- A Chuizi.AI account with an API key (starts with
ck-)
Configuration
- Open Zed settings:
Cmd+,(macOS) or via menu Zed > Settings - Add the following to your
settings.json:
config.json
json
{ "language_models": { "openai": { "api_url": "https://api.chuizi.ai/v1", "api_key": "ck-your-key-here", "available_models": [ { "name": "anthropic/claude-sonnet-4-6", "display_name": "Claude Sonnet 4.6", "max_tokens": 16000 }, { "name": "openai/gpt-4.1", "display_name": "GPT-4.1", "max_tokens": 32768 }, { "name": "deepseek/deepseek-chat", "display_name": "DeepSeek Chat", "max_tokens": 8192 } ] } } }
You can add any Chuizi.AI-supported model to the available_models array.
Usage
Once configured, use the AI features through:
- Inline assist: Select code and press
Cmd+Enter, then type your instruction - AI chat panel: Open with
Cmd+? - Code completion: Triggered automatically while writing code
Verify the Configuration
- Open any code file
- Select a block of code and press
Cmd+Enter - Type "explain this code"
- If you receive an AI response, the configuration is working
Common Issues
Models Not Showing in Settings
Make sure you have correctly populated the available_models array. Zed requires you to manually declare available models and will not automatically fetch them from the API.
AI Features Not Responding
Check that api_url is set to https://api.chuizi.ai/v1 (note: v1 without a trailing slash). Confirm your api_key starts with ck-.
Setting max_tokens
max_tokens controls the maximum tokens per AI response. Recommended values: 4096 for code completions, 16000 for conversations.
Next Steps
- Choose a Model — compare coding-focused models
- Pricing — model pricing details
- First Request — verify your setup works end-to-end