# Zed Editor with OfoxAI Setup Guide Source: https://ofox.ai/docs/integrations/zed ![Configure OfoxAI in Zed Editor](https://ofox.ai/images/integrations/zed.png) ## Why Zed? [Zed](https://zed.dev) offers one of the most complete AI coding experiences available: - **Native agent support** — Built-in Claude Code, Codex CLI, and Gemini CLI as external agents - **Custom LLM Provider** — Connect any model via OpenAI compatible protocol - **High performance** — Written in Rust, fast startup and low resource usage Paired with OfoxAI, one API Key gives you access to 100+ mainstream LLMs in Zed. ## Quick Start ### 1. Get an API Key Go to the [OfoxAI Console](https://app.ofox.ai) to create an API Key. ### 2. Add Provider **Agent Panel (Recommended)** Add visually through the Agent Panel without editing JSON. 1. Press `⌘ + Shift + P` to open the command palette and select `agent: open settings` 2. Click **+ Add Provider** in the LLM Providers area 3. Fill in the configuration as shown: ![Add OfoxAI Provider in Zed](https://ofox.ai/images/integrations/zed03.png) | Label | Field | Value | |-------|-------|-------| | ① | Provider Name | `OfoxAI` | | ② | API URL | `https://api.ofox.ai/v1` | | ③ | API Key | Your OfoxAI API Key | | ④ | Model Name | `openai/gpt-6.1-sol` | | ⑤ | Max Completion Tokens | `512000` | | ⑥ | Capabilities | Check the capabilities supported by the model | Click **+ Add Model** to add more models. **settings.json** Batch-configure all models via `settings.json`. 1. Press `⌘ + ,` to open settings, click **Edit in settings.json** in the top right 2. Add the following configuration: ```json filename="~/.config/zed/settings.json" { "language_models": { "openai_compatible": { "OfoxAI": { "api_url": "https://api.ofox.ai/v1", "available_models": [ { "name": "openai/gpt-5.3-codex", "display_name": "GPT-5.3 Codex", "max_tokens": 512000, "max_output_tokens": 65536, "capabilities": { "tools": true, "images": true } }, { "name": "openai/gpt-6-luna", "display_name": "GPT-6 Luna", "max_tokens": 256000, "max_output_tokens": 32768, "capabilities": { "tools": true, "images": true } }, { "name": "moonshotai/kimi-k2.6", "display_name": "Kimi K2.6", "max_tokens": 262144, "max_output_tokens": 262144, "capabilities": { "tools": true, "images": true } }, { "name": "qwen/qwen3.7-max", "display_name": "Qwen3.7 Max", "max_tokens": 256000, "max_output_tokens": 64000, "capabilities": { "tools": true, "images": false } } ] } } } } ``` 3. After saving, Zed will prompt you to enter your API Key `settings.json` is ideal for batch-adding models. Add or remove models by editing the `available_models` array. The API Key is securely stored in the system keychain (macOS Keychain / Linux Secret Service) and is never written in plaintext to config files. ## Getting Started Zed's Agent Panel has two modes: | Mode | Description | |------|-------------| | **Zed Agent** | Built-in AI assistant using your configured LLM Provider (e.g. OfoxAI) | | **External Agents** | External agents (Claude Code, Codex CLI, Gemini CLI), run independently | Start a conversation with **Zed Agent**: ![Zed Agent Panel model selection](https://ofox.ai/images/integrations/zed04.png) | Step | Action | |------|--------| | ① | Click **+** → Select **Zed Agent** (`⌘ + N`) | | ② | External Agents area shows connected external agents | | ③ | Bottom-right model selector → **OfoxAI** group → Select model | ![Zed Agent conversation demo](https://ofox.ai/images/integrations/zed05.png) ## Recommended Models For recommended models, see the [Model Marketplace](https://ofox.ai/models). ## Adding More Models Each model requires the following parameters: | Field | Required | Description | |-------|----------|-------------| | `name` | Yes | Model ID, e.g. `openai/gpt-6.1-sol` | | `display_name` | No | UI display name | | `max_tokens` | Yes | Context window size | | `max_output_tokens` | No | Maximum output token count | | `capabilities.tools` | No | Whether Function Calling is supported | | `capabilities.images` | No | Whether image input is supported | ### Pro Tip Manually filling parameters too slow? Click **Copy Page** in the top right of this page (or send this page URL directly), along with `https://api.ofox.ai/v1/models`, to an AI and have it auto-generate the complete `settings.json` configuration. Go to settings → Click **Edit in settings.json** in the top right to paste: ![Edit in settings.json](https://ofox.ai/images/integrations/zed02.png) ## Troubleshooting **OfoxAI not showing in model list** Verify `settings.json` format is correct, then restart Zed. **Authentication error** Command Palette `⌘ + Shift + P` → Search `language model: reset credentials` → Re-enter your API Key. **Model doesn't support tool calling** Set `capabilities.tools` to `false`.