Repository navigation
Description
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 orfalse), custom BYOK providers remain blocked whenCMD_ZDR=1is set (preserving current safe defaults). - When
"zdr": trueis explicitly configured on a custom provider, Command Code allows using that provider underCMD_ZDR=1(and optionally forwardsx-cmd-zdr: 1as usual).
Alternatives Considered
- Unsetting
CMD_ZDR=1via 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