Setup
DiscreteStack does not store your prompts or responses. Conversation content stays on your machine. We keep only non-content metadata needed to operate the service. If you need support, see Debug.

Save this file, then replace the placeholder key — or paste your key in the header and copy.

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "myprovider": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "DiscreteStack",
      "options": {
        "baseURL": "https://api.discretestack.eu/v1",
        "apiKey": "sk-your-api-key"
      },
      "models": {
        "discretestack-max": {
          "name": "discretestack-max",
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          },
          "limit": {
            "context": 1000000,
            "output": 32000
          },
          "variants": {
            "low": { "reasoningEffort": "low" },
            "high": { "reasoningEffort": "high" },
            "max": { "reasoningEffort": "max" }
          }
        },
        "discretestack-compact": {
          "name": "discretestack-compact",
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          },
          "limit": {
            "context": 1000000,
            "output": 32000
          },
          "variants": {
            "low":    { "reasoningEffort": "low" },
            "medium": { "reasoningEffort": "medium" },
            "high":   { "reasoningEffort": "high" }
          }
        },
        "discretestack-fast": {
          "name": "discretestack-fast",
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          },
          "limit": {
            "context": 1000000,
            "output": 32000
          }
        }
      }
    }
  }
}

Save this file, then replace the placeholder key — or paste your key in the header and copy.

This setup is for OpenCode 2, the newly rebuilt version of OpenCode (currently in beta). If you still use the older OpenCode 1, use the OpenCode 1.x tab instead — its settings are not compatible with this one.

Upgrading from OpenCode 1? Follow the official migration guide.

{
  "$schema": "https://opencode.ai/config.json",
  "model": "myprovider/discretestack-max",
  "provider": {
    "myprovider": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "DiscreteStack",
      "options": {
        "baseURL": "https://api.discretestack.eu/v1",
        "apiKey": "sk-your-api-key"
      },
      "models": {
        "discretestack-max": {
          "name": "discretestack-max",
          "limit": {
            "context": 1000000,
            "output": 32000
          },
          "variants": {
            "low": { "reasoningEffort": "low" },
            "high": { "reasoningEffort": "high" },
            "max": { "reasoningEffort": "max" }
          }
        },
        "discretestack-compact": {
          "name": "discretestack-compact",
          "limit": {
            "context": 1000000,
            "output": 32000
          },
          "variants": {
            "low": { "reasoningEffort": "low" },
            "high": { "reasoningEffort": "high" },
            "max": { "reasoningEffort": "max" }
          }
        },
        "discretestack-fast": {
          "name": "discretestack-fast",
          "limit": {
            "context": 1000000,
            "output": 32000
          }
        }
      }
    }
  }
}