---
title: "Zed OpenAI compatible provider for an uncensored model"
canonical: https://pentestllm.ai/guides/zed
generated: 2026-11-18T03:35:54.844Z
source: https://pentestllm.ai/guides/zed
base_url: https://api.pentestllm.ai/v1
---

# Zed OpenAI-compatible provider: a security-tuned model in the Agent Panel

The openai_compatible block for Zed’s settings.json: api_url, security or uncensored ids with max_tokens and capabilities, the key in keychain or env var.

Steps checked November 2, 2026 · prices as of November 17, 2026

You live in Zed and want its agent to read the code you are auditing without a lecture about hacking. Zed’s Agent Panel accepts an OpenAI-compatible provider in `settings.json`: an API URL, model ids with their context windows, and a key kept in the keychain or an environment variable. With one block, a security-tuned or uncensored build answers in the panel and makes tool calls for edits and terminal commands. The block below already carries the PentestLLM URL and the ids Zed users run on this API.

## What you need

- Zed with the Agent Panel available.
- A key from the [console](https://app.pentestllm.ai/console) with prepaid credit behind it.
- Model ids and their context windows from the [models page](https://pentestllm.ai/models). Zed cannot discover models, so each one is typed in by hand. The security-tagged builds are tuned for engagement work; [auto/security](https://pentestllm.ai/auto-router) routes by request difficulty.

## Which file, which menu

The provider belongs in Zed’s user settings: `~/.config/zed/settings.json` on macOS and Linux, `%APPDATA%\Zed\settings.json` on Windows. The command palette entry `zed: open settings file` opens it. A project’s `.zed/settings.json` accepts editor and language options only, so a provider written there is ignored.

There is a UI route as well. `agent: open settings` (also in the Agent Panel’s top-right menu) lands on **Settings → AI → LLM Providers**, and **Add Provider** wants a provider name, an API URL, one model ID and its context window. That page also takes the key, or Zed reads it from an environment variable. The key is never written to `settings.json`.

## Shortest path to a first reply

1. Paste the block below into `settings.json`. Every entry under `available_models` must carry `max_tokens`, so the three ids shown are the first builds in the list further down whose context window the catalog publishes. Any other id from the [models page](https://pentestllm.ai/models) goes in the same shape with the window from its page. `agent.default_model` makes the first entry the model for new threads:

```
{
  "language_models": {
    "openai_compatible": {
      "pentestllm": {
        "api_url": "https://api.pentestllm.ai/v1",
        "available_models": [
          {
            "name": "deepseek-v4.1-flash-1017-uncensored",
            "display_name": "DeepSeek V4.1 Flash 1017 Uncensored",
            "max_tokens": 1048576,
            "capabilities": { "tools": true, "images": false, "parallel_tool_calls": false, "prompt_cache_key": false }
          },
          {
            "name": "glm-5.3-flash-apex-abliterated",
            "display_name": "GLM-5.3 Flash Apex Abliterated",
            "max_tokens": 1048576,
            "capabilities": { "tools": true, "images": false, "parallel_tool_calls": false, "prompt_cache_key": false }
          },
          {
            "name": "kimi-k3-uncensored",
            "display_name": "Kimi K3 Uncensored",
            "max_tokens": 262144,
            "max_output_tokens": 65536,
            "capabilities": { "tools": true, "images": true, "parallel_tool_calls": false, "prompt_cache_key": false }
          }
        ]
      }
    }
  },
  "agent": {
    "default_model": {
      "provider": "pentestllm",
      "model": "deepseek-v4.1-flash-1017-uncensored"
    }
  }
}
```

1. Make a key in the [console](https://app.pentestllm.ai/console). Hand it to Zed either through the UI (`agent: open settings`, locate **pentestllm** under LLM Providers, paste; Zed keeps it in the system keychain) or by exporting it in the environment Zed launches from, under the variable name derived from the provider id:

```bash
export PENTESTLLM_API_KEY="sk-ptl-live-…"
```

1. Start a thread (`agent: new thread`, or click the sparkle icon in the status bar) and send a message. Try asking for a severity-ranked list of what a service scan of an in-scope host exposes, or a review of a client module for injection bugs. The selector in the message editor (`cmd-alt-/` on macOS, `ctrl-alt-/` elsewhere) switches to another id under **pentestllm**, and the choice is written back to `agent.default_model`.

An environment variable with a value beats the keychain entry. To retire a key supplied by the variable, unset it, then restart Zed. To try a build with no editor involved, the home page gives a few free demo turns and the [playground](https://pentestllm.ai/playground) runs every id on a key.

## The settings, one by one

- openai_compatible.pentestllm: the provider id shown in the model selector, used as provider in agent.default_model, and the stem the env var name is built from
- api_url: https://api.pentestllm.ai/v1 the request destination; keep the trailing /v1 and add nothing after it
- available_models[].name: deepseek-v4.1-flash-1017-uncensored the id put on each request, spelled as the models page prints it; the selector lists only what is written here
- available_models[].display_name: the name in the picker optional; the raw id appears when it is absent
- available_models[].max_tokens: the context window required; by default Zed compacts a thread at 90% of this number, so use the catalog’s figure
- available_models[].max_output_tokens: the output limit optional; forwarded as max_completion_tokens on every request
- available_models[].capabilities: { tools, images, parallel_tool_calls, prompt_cache_key } tools is on unless you turn it off, and the agent cannot edit or run commands without it; images mirrors the catalog; leave the last two false
- agent.default_model: { provider: pentestllm, model: deepseek-v4.1-flash-1017-uncensored } the model a new thread opens on; the role settings for the inline assistant, commit messages, thread summaries and compaction take the same object
- PENTESTLLM_API_KEY: the whole sk-ptl- key the variable Zed checks for this provider id; pasting the key in the settings UI, which stores it in the keychain, is the alternative

## Which build, and what a turn costs

Zed posts OpenAI-format chat completions to `api_url`; every id on the models page replies in that format. One agent turn carries the whole thread, each file Zed opened and every tool result to date, so input tokens set the price and the build with the lowest input rate costs least per turn. The right-hand column says whether a build accepts tool calls. A build that does not gets a **No tools** badge in the selector, and the agent can neither edit files nor run commands with it.

The context window counts twice. Zed compacts a thread once it hits 90% of the entry’s `max_tokens` (the `agent.auto_compact` threshold), so a longer window means fewer compactions and more of the thread kept word for word. Below 80,000 tokens auto-compaction is off entirely; Zed shows a banner near the ceiling and offers a fresh thread seeded with a summary. The compaction call goes to the thread’s own model and is billed like any other request, unless `agent.compaction_model` sends it to a smaller build.

| Model | One agent turn | Tool calls |
| --- | --- | --- |
| [GLM-5.3 Uncensored](https://pentestllm.ai/models/glm-5.3-uncensored) | $0.01 | [model page](https://pentestllm.ai/models/glm-5.3-uncensored) |
| [GLM-5.3 Flash Uncensored](https://pentestllm.ai/models/glm-5.3-flash-uncensored) | $0.0047 | [model page](https://pentestllm.ai/models/glm-5.3-flash-uncensored) |
| [DeepSeek V4.1 Flash Abliterated](https://pentestllm.ai/models/deepseek-v4.1-flash-abliterated) | $0.04 | [model page](https://pentestllm.ai/models/deepseek-v4.1-flash-abliterated) |
| [DeepSeek V4 Pro Uncensored](https://pentestllm.ai/models/deepseek-v4-pro-uncensored) | $0.04 | [model page](https://pentestllm.ai/models/deepseek-v4-pro-uncensored) |
| [GLM-5.3 Abliterated](https://pentestllm.ai/models/glm-5.3-abliterated) | $0.09 | [model page](https://pentestllm.ai/models/glm-5.3-abliterated) |
| [GLM-5.3 Flash Code Uncensored](https://pentestllm.ai/models/glm-5.3-flash-code-uncensored) | $0.25 | [model page](https://pentestllm.ai/models/glm-5.3-flash-code-uncensored) |
| [DeepSeek V4.1 Flash 1017 Uncensored](https://pentestllm.ai/models/deepseek-v4.1-flash-1017-uncensored) | $0.04 | [model page](https://pentestllm.ai/models/deepseek-v4.1-flash-1017-uncensored) |
| [GLM-5.3 Flash Apex Abliterated](https://pentestllm.ai/models/glm-5.3-flash-apex-abliterated) | $0.04 | [model page](https://pentestllm.ai/models/glm-5.3-flash-apex-abliterated) |
| [Kimi K3 Uncensored](https://pentestllm.ai/models/kimi-k3-uncensored) | $0.26 | [model page](https://pentestllm.ai/models/kimi-k3-uncensored) |

Priced at 40,000 input tokens and 1,200 output tokens, catalog prices on 2026-11-17. Tool support is as the catalog publishes it; where it is silent, the model page has the answer.

| Model | Build | Input $/M | Output $/M |
| --- | --- | --- | --- |
| [GLM-5.3 Uncensored](https://pentestllm.ai/models/glm-5.3-uncensored) glm-5.3-uncensored | Uncensored | $0.282 | $0.846 |
| [GLM-5.3 Flash Uncensored](https://pentestllm.ai/models/glm-5.3-flash-uncensored) glm-5.3-flash-uncensored | Uncensored | $0.1053 | $0.3685 |
| [DeepSeek V4.1 Flash Abliterated](https://pentestllm.ai/models/deepseek-v4.1-flash-abliterated) deepseek-v4.1-flash-abliterated | Abliterated | $0.8488 | $1.6975 |
| [DeepSeek V4 Pro Uncensored](https://pentestllm.ai/models/deepseek-v4-pro-uncensored) deepseek-v4-pro-uncensored | Uncensored | $0.97 | $1.94 |
| [GLM-5.3 Abliterated](https://pentestllm.ai/models/glm-5.3-abliterated) glm-5.3-abliterated | Abliterated | $2.1825 | $4.365 |
| [GLM-5.3 Flash Code Uncensored](https://pentestllm.ai/models/glm-5.3-flash-code-uncensored) glm-5.3-flash-code-uncensored | Uncensored | $6.00 | $6.00 |
| [DeepSeek V4.1 Flash 1017 Uncensored](https://pentestllm.ai/models/deepseek-v4.1-flash-1017-uncensored) deepseek-v4.1-flash-1017-uncensored | Uncensored | $0.8003 | $3.201 |
| [GLM-5.3 Flash Apex Abliterated](https://pentestllm.ai/models/glm-5.3-flash-apex-abliterated) glm-5.3-flash-apex-abliterated | Abliterated | $0.80 | $3.20 |
| [Kimi K3 Uncensored](https://pentestllm.ai/models/kimi-k3-uncensored) kimi-k3-uncensored | Uncensored | $5.745 | $28.68 |

Prices per million tokens, read from the live catalog on 2026-11-17.

For source review on an engagement, [the uncensored coding AI guide](https://pentestllm.ai/guides/uncensored-coding-ai) ranks the code builds and prices a full day on each. The same ids run in [Cursor](https://pentestllm.ai/guides/cursor) and [OpenCode](https://pentestllm.ai/guides/opencode), and behind a router in [Claude Code](https://pentestllm.ai/guides/claude-code).

## Prove it outside Zed

Ask the API which models your key may call. Each `name` in your `available_models` should appear in the list:

```bash
curl https://api.pentestllm.ai/v1/models -H "Authorization: Bearer sk-ptl-live-…"
```

Then replay the kind of request Zed sends. `-i` shows the response headers, which include a request id and, when the answer is not streamed, the charge in USD.

```bash
curl -i https://api.pentestllm.ai/v1/chat/completions \
  -H "Authorization: Bearer sk-ptl-live-…" \
  -H "Content-Type: application/json" \
  -d '{"model": "deepseek-v4.1-flash-1017-uncensored", "messages": [{"role": "user", "content": "Reply with the single word ok."}]}'
```

Back in Zed, start a new thread with one of your ids selected and send a message. It lands on the console’s usage page with its token counts and charge. The thread’s running token count sits near the profile selector in the message editor and rises toward the `max_tokens` you entered.

## When it breaks

- `401 invalid_api_key`: either the key itself is bad, or a stale `PENTESTLLM_API_KEY` in Zed’s environment is shadowing the keychain entry. Re-copy the key in the console, or unset the variable before restarting Zed.
- `404 model_not_found`: one of your `available_models` entries has a `name` that is not a real id. Compare the spelling, and remember the id goes in `name`, not `display_name`.
- `402 insufficient_balance`: credit ran out; add some in the console. `402 monthly_limit_reached`: the key hit the monthly cap you gave it.
- `403 scope_denied`: this key is restricted to certain models, and the chosen one is outside that list.
- `429 rate_limited`: too many requests on the key; wait out the `retry-after` the response names.
- _LLM provider is not configured or does not support the configured model_: Zed could not resolve `agent.default_model` (or `inline_assistant_model`). Its `provider` must equal the key under `openai_compatible`, its `model` must be an `available_models` name of that provider, and the provider needs a key. Line the three up and supply the key. Issue #63878 on Zed (open, September 2026) reports the inline assistant showing this while the Agent Panel runs the identical provider and model fine.
- **No tools** beside the model: that entry has `capabilities.tools` set to `false`. Flip it to `true` for any build whose model page lists tool calls.
- The UI will not edit the provider: per Zed issue #35461 (open), the LLM Providers page can change only a custom provider’s key. Edit the URL, ids and context windows in `settings.json`.
- Compaction or thread summaries fail on `reasoning_effort`: when a model entry declares `reasoning_effort`, Zed sends `"reasoning_effort": "none"` on those requests (Zed issue #60411, open, November 2026). Omit the field from these entries.
- Two providers on one `api_url` share a key: Zed stores keys per URL, so a second block aimed at `https://api.pentestllm.ai/v1` with a different key prompts for it again and again (issue #41585). Use one provider block holding every id; a key restricted to certain models is a scope on that key, not a reason for a second provider.

## Questions

### Where do I put the API key for a Zed OpenAI-compatible provider?

Two places work: the LLM Providers page in Agent Settings, which saves it to the system keychain, or an environment variable named after the provider id in upper snake case with _API_KEY appended, which is PENTESTLLM_API_KEY for the block on this page. settings.json is never read for keys, and a set variable overrides the keychain.

### Why does Zed say the LLM provider is not configured or does not support the configured model?

Because agent.default_model (or inline_assistant_model) did not resolve to a configured provider holding a key. Its provider value has to equal the key under openai_compatible, its model has to be an available_models name of that provider, and a key has to exist in the keychain or the environment.

### Can one provider also handle commit messages and inline edits?

Yes. Under agent, each role has its own setting: commit_message_model, inline_assistant_model, thread_summary_model, compaction_model. All four accept the same { provider, model } object as default_model and inherit from it when unset. Most people put a fast build on commit messages and summaries and a strong one on the agent thread; the table above prices one agent turn on each. See the models page.

### Does Zed pull the model list from the API?

No. The selector shows exactly the ids under available_models, each with its max_tokens. When a new build lands on the models page, add its id and context window to the block to see it in Zed. The curl under Prove it outside Zed prints every id your key can reach.

Every model above is on the [uncensored model list](https://pentestllm.ai/models) with its live price per million tokens. [Per-token pricing](https://pentestllm.ai/pricing) sets the whole catalog side by side, and the [family directory](https://pentestllm.ai/uncensored) groups the builds by base model.

[Get a key](https://app.pentestllm.ai/console) Prepaid from $10, no subscription.

## New models and price changes, once a month.

New uncensored builds with their prices, price moves, and what the daily model check found.
