Zed Editor Integration
A high-performance, open-source modern code editor with a powerful built-in AI assistant, connecting to Calgine Tokens through a custom OpenAI-compatible endpoint.
Zed is a high-performance modern code editor built in Rust by the team behind Atom and Tree-sitter. It ships with an AI assistant panel that supports custom OpenAI-compatible endpoints, giving you direct access to all models on the Calgine Tokens platform.
Prerequisites
- Sign up at the Calgine Tokens Console.
- Go to Workspace → API Tokens, click "Add Token", and copy the API Key once created (starts with
sk-).
| Setting | Value |
|---|---|
api_url | https://api.calgine.com.cn/v1 |
api_key | The API token you created in the console |
Installation & Configuration
Install Zed: Visit the Zed website to download and install the version for your system.
Open settings: Press
Cmd/Ctrl + ,to open Zed'ssettings.jsonfile.Configure the OpenAI-compatible endpoint: Add the following to
settings.json:json{ "language_models": { "openai": { "api_url": "https://api.calgine.com.cn/v1", "api_key": "sk-your-token" } } }Select a model: In Zed's AI panel (usually in the right sidebar), click the model name and choose a model available on Calgine Tokens, such as
gpt-4o.
Verify the Setup
Open the AI assistant panel and send any message (e.g., "Explain the code in the current file"). A normal response means the integration is working.
Key Features
| Feature | Description |
|---|---|
| AI chat | Chat with AI directly in the editor sidebar with code context awareness |
| Inline editing | Select code and press Cmd/Ctrl + Enter — AI edits the code right in the editor |
| High performance | Built with Rust for extremely smooth AI responses and editor operations |
Recommended Models
| Scenario | Recommended Model |
|---|---|
| General programming | gpt-4o |
| Complex logic | claude-opus-4-5-20251101 |
| Quick questions | gpt-4o-mini |
Next Steps
- Gemini CLI: Use the same models in your terminal
- OpenAI Codex CLI: A command-line agent that executes coding tasks autonomously