Skip to content

Editors and extensions

Zed

Add NoviaHub to the Zed editor as an OpenAI-compatible provider so the Agent Panel and other AI features use NoviaHub models.

Zed is a code editor with a built-in Agent Panel. In Zed’s own words, the Agent Panel is where you interact with AI agents that can read, write and run code in your project.

Once NoviaHub is added to Zed as an “OpenAI-compatible” provider, Zed’s own AI features, such as the Zed Agent, the Inline Assistant, Git commit message generation and thread summaries, can use NoviaHub models. External agents and terminal threads running inside Zed usually get their model from that agent’s or CLI’s own settings, not from this configuration.

  • A NoviaHub account with an API key. See API keys.
  • Funds in your account. See Wallet and top-ups.
  • No Zed account sign-in. Zed’s docs say you can use AI without signing in when you bring your own API keys.

Download it from the download page, or use Homebrew:

终端窗口
brew install --cask zed

The examples use deepseek-v4-flash. Zed needs the context window size of every model: open the model under Models & Pricing and read the Context field. On 2026-09-28, deepseek-v4-flash listed a context of 1,000,000 tokens.

Use either method. The settings UI is simpler; settings.json is handy for adding several models at once.

  1. Open the command palette and run agent: open settings to open Agent Settings (also reachable under Settings → AI → LLM Providers).

  2. In the LLM Providers section, click Add Provider, then pick OpenAI under Compatible APIs in the menu. The Add OpenAI-Compatible Provider page opens.

  3. Fill in the provider:

    Field Value
    Provider Name noviahub (the provider ID; it also determines the environment variable name below)
    API URL https://noviahub.com/v1 (include /v1)
    API Key Your NoviaHub key (starts with sk-). It is stored in the system keychain, not in settings.json
  4. Under Models, fill in the model:

    Field Value
    Model Name deepseek-v4-flash (must match the model ID on NoviaHub exactly)
    Max Tokens 1000000 (the model’s context window)
    Max Output Tokens The length limit for a single reply. The form pre-fills 32000; you can leave it

    Leave the other fields at their pre-filled values. To add more models, click Add Model.

  5. Click Save Provider.

  1. Open Zed’s settings.json and add an openai_compatible entry under language_models:

    settings.json
    {
    "language_models": {
    "openai_compatible": {
    "noviahub": {
    "api_url": "https://noviahub.com/v1",
    "available_models": [
    {
    "name": "deepseek-v4-flash",
    "display_name": "DeepSeek V4 Flash (NoviaHub)",
    "max_tokens": 1000000
    }
    ]
    }
    }
    }
    }
    Key Purpose
    noviahub The provider ID. You can pick any name; it also determines the environment variable name below.
    api_url The endpoint, including /v1: https://noviahub.com/v1.
    name The model ID. It must match the model ID on NoviaHub exactly.
    display_name The name shown in Zed’s model selector. Anything you like.
    max_tokens Required. Here it means the model’s context window, not the per-reply output length.
  2. Provide the key. Do not put the key in settings.json; Zed’s docs say so explicitly. Choose one:

    • Enter the key in the provider’s section of Agent Settings (it is saved to the system keychain).

    • Or set an environment variable. Zed turns the provider ID into upper snake case and appends _API_KEY. With the provider ID noviahub, the variable is exactly NOVIAHUB_API_KEY:

      终端窗口
      export NOVIAHUB_API_KEY="sk-..."

      The variable must be present in the Zed process’s environment. A non-empty environment variable takes precedence over a key saved in the keychain.

Calling Claude models through an Anthropic-compatible provider (optional)

Section titled “Calling Claude models through an Anthropic-compatible provider (optional)”

An OpenAI-compatible provider can call Claude models too, but the request goes through protocol conversion and some features are lost; see Protocol conversion. To send Claude models over Anthropic Messages, add a second, Anthropic-compatible provider. This only works for models whose details show the Anthropic endpoint label.

  • Settings UI: click Add Provider and pick Anthropic under Compatible APIs. Enter noviahub-claude as the Provider Name, https://noviahub.com as the API URL (no /v1) and the same NoviaHub key as the API Key; under the model, enter claude-sonnet-5 as the Model Name, 1000000 as Max Tokens and 64000 as Max Output Tokens, then click Save Provider.

  • settings.json: add an anthropic_compatible entry under language_models, next to openai_compatible:

    settings.json
    {
    "language_models": {
    "anthropic_compatible": {
    "noviahub-claude": {
    "api_url": "https://noviahub.com",
    "available_models": [
    {
    "name": "claude-sonnet-5",
    "display_name": "Claude Sonnet 5 (NoviaHub)",
    "max_tokens": 1000000,
    "max_output_tokens": 64000
    }
    ]
    }
    }
    }
    }
    Key Purpose
    api_url https://noviahub.com, without /v1. Zed appends /v1/messages; https://noviahub.com/v1 would turn into /v1/v1/messages.
    max_tokens Required. The model’s context window. On 2026-09-29, claude-sonnet-5 listed a context of 1,000,000 tokens.
    max_output_tokens The length limit for a single reply. If you leave it out, Zed uses 4,096. On 2026-09-29, claude-sonnet-5 listed a max output of 64,000 tokens.

    Provide the key the same way as above: in the UI, or through an environment variable. With the provider ID noviahub-claude, the variable is NOVIAHUB_CLAUDE_API_KEY, set to the same NoviaHub key.

  1. Open the Agent Panel: run agent: new thread from the command palette, or click the ✨ icon in the status bar.

  2. Click the model selector on the message editor (shortcut: cmd-alt-/ on macOS, ctrl-alt-/ on Windows / Linux) and pick a model under noviahub. The logo to the left of each model shows which provider it belongs to.

  3. Send something simple, such as “Introduce yourself in one sentence.” A reply means the setup works.

  4. Check the call and its cost under Usage logs in the NoviaHub console.

  • Switch between the models you added in the model selector.
  • To add models, append another entry to available_models (name and max_tokens are required), or add another model in the settings UI.
  • An OpenAI-compatible provider calls models through the Chat Completions API by default, so pick models that carry the Chat label under Models & Pricing. On 2026-09-28 every model on the site carried it.
  • If a model works only through the Responses API, set chat_completions to false in that model’s capabilities and Zed uses the Responses endpoint instead. This only works for models whose page shows the Response label.
  • Image input is off by default. capabilities.images defaults to false for both OpenAI-compatible and Anthropic-compatible models. If the model accepts images (see Input types on its page) and you want to send them, add "capabilities": { "images": true } to that model, or turn on Supports images when you add the model in the settings UI.
  • Tool calling. If the selected model does not support tool calling, Zed shows a “No tools” label, and the agent cannot read or write files or run commands.
  • Small contexts are not compacted automatically. When a model’s context window is under 80,000 tokens, Zed does not compact the conversation automatically; it only suggests starting a new thread as you approach the limit.
  • Remote projects. In SSH, dev container and other remote projects, Zed still reads keys from the local keychain and from the local Zed process’s environment.

Checked on 2026-09-28 and 2026-09-29: