# OpenScale for Zed

Request-level tested against the request shape of Zed 1.23.2: streaming, parallel tool calls and reasoning replay.

Protocol: Chat Completions, base URL https://api.openscale.so/v1

## Quick start

The fastest way to try it. Replace YOUR_OPENSCALE_API_KEY with your key and run it yourself; do not paste the key into an agent conversation.

```text
1. In Zed, run "zed: open settings file" and merge:

{
  "language_models": {
    "openai_compatible": {
      "openscale": {
        "api_url": "https://api.openscale.so/v1",
        "available_models": [
          {
            "name": "deepseek/deepseek-v4.1-flash",
            "display_name": "DeepSeek V4.1 Flash (OpenScale)",
            "max_tokens": 1048568,
            "max_output_tokens": 65536,
            "reasoning_effort": "high",
            "capabilities": {
              "tools": true,
              "images": true,
              "parallel_tool_calls": true,
              "prompt_cache_key": false,
              "chat_completions": true,
              "interleaved_reasoning": true,
              "max_tokens_parameter": false
            }
          },
          {
            "name": "z-ai/glm-5.3-flash",
            "display_name": "GLM 5.3 Flash (OpenScale)",
            "max_tokens": 1048576,
            "max_output_tokens": 65536,
            "reasoning_effort": "high",
            "capabilities": {
              "tools": true,
              "images": true,
              "parallel_tool_calls": true,
              "prompt_cache_key": false,
              "chat_completions": true,
              "interleaved_reasoning": true,
              "max_tokens_parameter": false
            }
          }
        ]
      }
    }
  },
  "agent": {
    "default_model": {
      "provider": "openscale",
      "model": "deepseek/deepseek-v4.1-flash",
      "enable_thinking": true
    }
  }
}

2. Open the Agent panel settings, find OpenScale and paste this API key:

YOUR_OPENSCALE_API_KEY
```

## Version and configuration

Uses the openai_compatible language model provider of current Zed releases. Check the version under Zed, About Zed first.

Default path: `~/.config/zed/settings.json`.

Merge language_models.openai_compatible.openscale and agent.default_model into settings.json (command palette: zed: open settings file). Keep other providers. Keep interleaved_reasoning on so earlier reasoning is replayed rather than mixed into replies, and keep max_output_tokens at or below the model limit.

[Download the configuration fragment](https://openscale.so/setup/zed.json). This is a merge fragment, not a replacement for an existing file. Model metadata is generated from OpenScale's catalog; prices are estimates in USD per million tokens, not an account balance or billing receipt.

## Authenticate locally

Open the Agent panel settings, find OpenScale under LLM Providers and paste your key; Zed stores it in the system keychain. Alternatively set OPENSCALE_API_KEY in the environment that launches Zed.

## Select and verify

Zed applies settings.json changes when you save.

agent.default_model selects deepseek/deepseek-v4.1-flash; you can also pick it in the Agent panel model menu.

[Official Zed documentation](https://zed.dev/docs/ai/llm-providers)

## Procedure for the setup agent

1. Confirm the requested agent and inspect its installed version and active configuration location. Read only the relevant settings; do not dump credential stores or unrelated environment variables. If the agent is not installed, link its official installation instructions and let the user choose installation.
2. Read the matching recipe and its linked configuration. If the installed schema differs, consult the linked official docs for that version. Do not guess, silently upgrade, or apply a different version's schema.
3. Back up any file you will edit with a unique timestamp and its existing permissions. Backups may contain secrets: keep them local and private. Merge only the OpenScale provider block with a format-aware editor. Preserve JSONC/JSON5/YAML/TOML comments, other providers, defaults, profiles, secrets and unrelated settings. Never overwrite the full file with a downloaded snippet. On reruns update the same provider, without duplicate keys. Preserve existing OpenScale customizations unless they conflict with the requested setup.
4. Ask the user to create an account at https://openscale.so/signup?utm_source=agent_setup&utm_medium=agent, create an API key at https://app.openscale.so/app/keys, and ensure credits are available. Let them enter the key in the agent's local credential flow or private environment configuration. Never request the key in chat, print it, put it in shell history, commit it, or send it to any endpoint except https://api.openscale.so. Reuse an existing working credential without displaying it.
5. Validate configuration syntax and use the agent's supported reload procedure. Select an OpenScale model for the test session; preserve the previous default unless the user explicitly requests changing it. Keep separate vision, audio and auxiliary provider settings unless the user asks to move them too.
6. Fetch https://api.openscale.so/v1/models without authentication to confirm the chosen model ID exists. That checks discovery, not credentials or inference. Through the configured agent, send one short prompt: “Reply with OK.” Confirm the response and selected provider/model. For coding agents, also ask it to use one harmless read-only tool (for example, report the current directory) and answer after the tool result. Do not claim tool support from a text-only test. This small test uses account credits; do not run repeated benchmarks.
7. Report the agent version, changed paths (no secrets), selected model, discovery result, inference result and tool result separately. If credentials or a restart are pending, say “configuration saved; connection not yet verified.” Do not report success from merely writing a file.

## Troubleshooting and undo

- Missing models: check active profile, provider filters, model allowlists and overrides before changing unrelated settings.
- 401: re-enter the key locally. 402: check account credits. 404: check the base URL for the recipe's protocol and the exact live model ID. 429: respect Retry-After and retry with backoff. Do not loop indefinitely.
- Streaming or tool errors: record the agent version and a redacted error, and check that the agent uses the protocol and base URL its recipe states. Do not switch protocols on your own; each recipe names the one that was tested.
- Undo: remove only the OpenScale provider entries added by this setup and restore any selection changed for testing. If restoring a backup, first ensure it will not discard subsequent edits. Remove only credentials created for this setup using the agent's supported local auth flow.
