Configuration
Providers & Models
Default: z.ai + GLM-5.1
Section titled “Default: z.ai + GLM-5.1”SANDCODE ships with z.ai as the default provider and GLM-5.1 as the default model. The API client is configured in src/services/api/client.ts.
Configuration
Section titled “Configuration”Set your provider in user or project config:
{ "provider": "zai", "model": "GLM-5.1"}API Key
Section titled “API Key”SANDCODE checks for your API key in this order:
ZAI_API_KEYenvironment variable- Interactive prompt on first run (stored securely)
apiKeyfield in config
export ZAI_API_KEY=sk-your-key-hereAvailable models
Section titled “Available models”All models are configured in src/utils/model/configs.ts. The GLM model family includes:
| Model | Context Window | Notes |
|---|---|---|
| GLM-5.1 | 200K | Default, recommended |
| GLM-4.6 | 128K | Previous generation |
Using other providers
Section titled “Using other providers”SANDCODE’s provider detection (src/utils/model/providers.ts) checks environment variables and config. You can configure custom providers by setting:
export ANTHROPIC_API_KEY=sk-ant-...# orexport OPENAI_API_KEY=sk-...And updating your config:
{ "provider": "anthropic", "model": "claude-sonnet-4-6"}Model context window
Section titled “Model context window”Context window sizes are defined in src/utils/context.ts. GLM models get 200K tokens by default.