Skip to Content
IntegrationsZed Editor

Zed Editor

Configure HaoAI in Zed Editor

Why Zed?

Zed  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 HaoAI, one API Key gives you access to 100+ mainstream LLMs in Zed.

Quick Start

1. Get an API Key

Go to the HaoAI Console  to create an API Key.

2. Add Provider

Add visually through the Agent Panel without editing JSON.

  1. Press ⌘ + Shift + A to open the Agent Panel
  2. Click + Add Provider in the LLM Providers area
  3. Fill in the configuration as shown:
Add HaoAI Provider in Zed
LabelFieldValue
Provider NameHaoAI
API URLhttps://api.hao.ai/v1
API KeyYour HaoAI API Key
Model Nameopenai/gpt-5.4-mini
Max Completion Tokens512000
CapabilitiesCheck the capabilities supported by the model

Click + Add Model to add more models.

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:

ModeDescription
Zed AgentBuilt-in AI assistant using your configured LLM Provider (e.g. HaoAI)
External AgentsExternal agents (Claude Code, Codex CLI, Gemini CLI), run independently

Start a conversation with Zed Agent:

Zed Agent Panel model selection
StepAction
Click + → Select Zed Agent (⌘ + N)
External Agents area shows connected external agents
Bottom-right model selector → HaoAI group → Select model
Zed Agent conversation demo

For recommended models, see the Model Marketplace .

Adding More Models

Each model requires the following parameters:

FieldRequiredDescription
nameYesModel ID, e.g. openai/gpt-5.4-mini
display_nameNoUI display name
max_tokensYesContext window size
max_output_tokensNoMaximum output token count
capabilities.toolsNoWhether Function Calling is supported
capabilities.imagesNoWhether 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.hao.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

Troubleshooting

HaoAI 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.