דלגו לתוכן

Continue through zer0pii

המסמכים מוצגים כפי שנכתבו, ברובם באנגלית.

Continue (the open-source IDE extension for VS Code and JetBrains) configures each model with a provider, a key and, for OpenAI-compatible endpoints, a base URL. That is exactly the shape zer0pii needs.

Field names below are per Continue's documentation as of 2026-09-22:

  • OpenAI provider: shows apiKey and apiBase, and apiBase can be changed for OpenAI-compatible providers.
  • Config reference: apiBase overrides the default API base per model.
  • Anthropic provider: shows apiKey but does not show apiBase in its examples.

OpenAI models (verified path)

~/.continue/config.yaml:

models:
  - name: GPT via zer0pii
    provider: openai
    model: gpt-4o
    apiBase: https://api.zer0pii.com/v1
    apiKey: zpii_...
    roles:
      - chat
      - edit
      - apply
    requestOptions:
      headers:
        X-zer0pii-Upstream-Key: sk-...

What each line does:

  • apiBase: the gateway's /v1 root. Continue appends /chat/completions, which is zer0pii's OpenAI-shaped route. Self-hosted: use https://<your-gateway>/v1.
  • apiKey: your zer0pii key. Continue sends it as Authorization: Bearer ..., which is where the gateway reads its key.
  • requestOptions.headers.X-zer0pii-Upstream-Key: your OpenAI key, forwarded by the gateway to OpenAI as Authorization: Bearer. Omit this block entirely if your admin configured the OpenAI key on the gateway; then the developer's config holds only the zer0pii key. requestOptions.headers is the mechanism the config reference shows for custom headers.

Streaming and tool calls work through this route.

Anthropic models (documented with a caveat)

Continue's Anthropic provider page does not show apiBase. The config reference lists apiBase as a general per-model override without restricting it to a provider, so the following is expected to work, but it was not confirmed against the Anthropic provider page and you should run verify.md before relying on it:

models:
  - name: Claude via zer0pii
    provider: anthropic
    model: claude-sonnet-4-5
    apiBase: https://api.zer0pii.com/v1
    apiKey: zpii_...
    requestOptions:
      headers:
        X-zer0pii-Upstream-Key: sk-ant-...

Two things to know about this path:

  • The Anthropic SDK sends the key in x-api-key, not Authorization. zer0pii reads its own key from Authorization: Bearer only. If Continue's Anthropic provider sends apiKey as x-api-key, the gateway answers 401 INVALID_API_KEY. In that case add the zer0pii key as an explicit header instead and leave apiKey as a placeholder:

      requestOptions:
        headers:
          Authorization: Bearer zpii_...
          X-zer0pii-Upstream-Key: sk-ant-...
    
  • The gateway sets anthropic-version: 2023-06-01 itself and does not forward anthropic-beta, so Anthropic features gated on a beta header are unavailable through it.

If neither variant works for you, the OpenAI-compatible route above is the verified path.

Legacy config.json

Older Continue installs use ~/.continue/config.json with the same field names in JSON:

{
  "models": [
    {
      "title": "GPT via zer0pii",
      "provider": "openai",
      "model": "gpt-4o",
      "apiBase": "https://api.zer0pii.com/v1",
      "apiKey": "zpii_...",
      "requestOptions": {
        "headers": { "X-zer0pii-Upstream-Key": "sk-..." }
      }
    }
  ]
}

Continue's docs treat config.yaml as current; use it for new setups.

Optional headers

Add these under the same requestOptions.headers block when you need them:

  • X-zer0pii-Conversation-ID: keep masked tokens stable across one conversation so the provider's prompt cache keeps hitting.
  • X-zer0pii-Policy-Group: healthcare, clinical, finance or hr for fail-closed handling.
  • X-zer0pii-Upstream-URL: route to a different OpenAI-compatible endpoint (public hostnames only).

Autocomplete and embeddings

  • Autocomplete (the autocomplete role) sends code, which the gateway deliberately does not mask. Routing it through zer0pii adds latency for no privacy gain unless your completions contain prose with personal data. Leave it on a direct provider or a local model.
  • Embeddings (the embed role) change meaning when their input is masked, so the gateway's embeddings route is not generally enabled. Ask your admin before pointing embed at the gateway.