Skip to content

Add possibility to mark BYOK providers as "ZDR" #1145

Description

@TobiasB71

Feature Description

Problem Description

When CMD_ZDR=1 is enabled, Command Code blocks all custom/BYOK providers defined in ~/.commandcode/providers.json (and via ModApi.addProvider) because it assumes third-party/custom endpoints do not support Zero Data Retention (ZDR).

In self-hosted or enterprise setups, users often route requests through a local or private LLM gateway (such as LiteLLM, OpenRouter with ZDR routing, or self-hosted vLLM/Ollama instances) where Zero Data Retention is strictly enforced on the user's side. Currently, there is no way to use these ZDR-compliant BYOK providers while keeping CMD_ZDR=1 active as a safeguard for Command Code's hosted models.

Proposed Solution

Allow opting in to ZDR per provider in ~/.commandcode/providers.json (and in ProviderConfig for cmd.addProvider()):

{
  "my-litellm-proxy": {
    "baseURL": "http://localhost:4000/v1",
    "apiKey": "env:LITELLM_API_KEY",
    "zdr": true,
    "models": {
      "claude-sonnet-4-6": { "name": "Claude Sonnet 4.6" }
    }
  }
}

Expected Behavior

  • By default ("zdr" omitted or false), custom BYOK providers remain blocked when CMD_ZDR=1 is set (preserving current safe defaults).
  • When "zdr": true is explicitly configured on a custom provider, Command Code allows using that provider under CMD_ZDR=1 (and optionally forwards x-cmd-zdr: 1 as usual).

Alternatives Considered

  • Unsetting CMD_ZDR=1 via shell aliases when using BYOK models, which removes the global ZDR safety net if a user switches back to a hosted model within the same session.

Use Case

I'm using CommandCode as manually configured ACP client in IntelliJ IDEA with CMD_ZDR=1 set ... in addition to the models available via my CommandCode plan I want to use (for example) locally hosted models which are defined in providers.json ... however, when I switch from a CC model to local model, I'll get this error:

This model isn't available while zero data retention is on. Pick another model or unset CMD_ZDR.: {"code":"CMD_ZDR_NO_PROVIDERS"}

My current solution is to define 2 different ACP clients, one with CMD_ZDR=1 and one without, however, since I can't switch the clients mid-session, I'm always bound to either the CC models or my own once I made the client choice at the beginning.

Additional Context

No response

How important is this to you?

Important for my workflow

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions