Default provider and model definitions for Crystal Code.
This repository holds the reference providers.json catalog: named endpoints, protocols, model ids, and per-model metadata such as context windows, output limits, thinking efforts, and image input. Copy it into your Crystal home to extend the small starter set built into Crystal Code with the full catalog.
Get started · Catalog · How the file is used · File format · Maintenance
| File | Purpose |
|---|---|
providers.json |
The default provider and model catalog, generated by build_providers.py |
providers/ |
One JSON file per provider. Edit these, then regenerate the catalog |
build_providers.py |
Merges providers/*.json into providers.json |
Crystal Code reads providers.json from its home directory: ~/.crystal/providers.json, or the directory named by CRYSTAL_HOME when that variable is set. On Windows the default home is %USERPROFILE%\.crystal.
Linux or macOS
mkdir -p ~/.crystal
curl --fail --location --show-error \
https://raw.githubusercontent.com/YELANDAOKONG/CrystalCode.Defaults/master/providers.json \
--output ~/.crystal/providers.jsonWindows PowerShell
$crystalHome = "$env:USERPROFILE\.crystal"
New-Item -ItemType Directory -Force $crystalHome | Out-Null
Invoke-WebRequest `
-Uri https://raw.githubusercontent.com/YELANDAOKONG/CrystalCode.Defaults/master/providers.json `
-OutFile "$crystalHome\providers.json"The download replaces an existing providers.json. Back up or merge a file you already customized before you overwrite it.
Keys never belong in this file. Write each one in ~/.crystal/credentials.json under the provider name, or set <PROVIDER>_API_KEY for the process that starts the app. A provider entry can also name an environment variable with apiKeyEnvironment, as bigmodel does with ZHIPU_API_KEY. See Credentials in the user guide for the full lookup order.
Provider definitions are read at startup. Restart the app after the file changes, then select a model with /model, or start with --provider and --model.
| Provider | Protocols | Base URI |
|---|---|---|
deepseek |
deepseek |
https://api.deepseek.com/ |
openai |
openai |
https://api.openai.com/v1/ |
anthropic |
anthropic |
https://api.anthropic.com/v1/ |
gemini |
gemini |
https://generativelanguage.googleapis.com/v1beta/ |
moonshot |
openai |
https://api.moonshot.cn/v1/ |
siliconflow |
openai |
https://api.siliconflow.cn/v1/ |
bigmodel |
openai |
https://open.bigmodel.cn/api/paas/v4/ |
openrouter |
openai |
https://openrouter.ai/api/v1/ |
requesty |
openai |
https://router.requesty.ai/v1/ |
opencode-zen |
responses, anthropic, gemini, openai |
https://opencode.ai/zen/v1/ |
opencode-go |
responses, anthropic, openai |
https://opencode.ai/zen/go/v1/ |
commandcode |
openai, anthropic |
https://api.commandcode.ai/provider/v1/ |
bigmodel-intl |
openai |
https://api.z.ai/api/paas/v4/ |
moonshot-intl |
openai |
https://api.moonshot.ai/v1/ |
opencode-free |
openai |
https://opencode.ai/zen/v1/ |
openrouter-free |
openai |
https://openrouter.ai/api/v1/ |
siliconflow-intl |
openai |
https://api.siliconflow.com/v1/ |
meta |
openai |
https://api.meta.ai/v1/ |
mistral |
openai |
https://api.mistral.ai/v1/ |
ollama-cloud |
openai |
https://ollama.com/v1/ |
stepfun |
openai |
https://api.stepfun.com/v1/ |
stepfun-intl |
openai |
https://api.stepfun.ai/v1/ |
together |
openai |
https://api.together.ai/v1/ |
xai |
openai |
https://api.x.ai/v1/ |
cerebras |
openai |
https://api.cerebras.ai/v1/ |
deepinfra |
openai |
https://api.deepinfra.com/v1/openai/ |
fireworks |
openai |
https://api.fireworks.ai/inference/v1/ |
groq |
openai |
https://api.groq.com/openai/v1/ |
huggingface |
openai |
https://router.huggingface.co/v1/ |
minimax |
openai |
https://api.minimaxi.com/v1/ |
minimax-intl |
openai |
https://api.minimax.io/v1/ |
nebius |
openai |
https://api.tokenfactory.nebius.com/v1/ |
novita |
openai |
https://api.novita.ai/openai/v1/ |
nvidia |
openai |
https://integrate.api.nvidia.com/v1/ |
qianfan |
openai |
https://qianfan.baidubce.com/v2/ |
qwen |
openai |
https://dashscope.aliyuncs.com/compatible-mode/v1/ |
qwen-intl |
openai |
https://maas.qwencloudapi.com/compatible-mode/v1/ |
sambanova |
openai |
https://api.sambanova.ai/v1/ |
tencent |
openai |
https://tokenhub.tencentcloudmaas.com/v1/ |
vercel |
openai |
https://ai-gateway.vercel.sh/v1/ |
volcengine |
openai |
https://ark.cn-beijing.volces.com/api/v3/ |
xiaomi |
openai |
https://api.xiaomimimo.com/v1/ |
A provider name can map to an array of entries when one service exposes several protocols or endpoints; opencode-zen, opencode-go, and commandcode use this form, and each model is routed to the protocol that owns it. moonshot-intl, siliconflow-intl, bigmodel-intl, qwen-intl, and minimax-intl are separate accounts from the domestic entries, so they do not reuse those API keys. openrouter-free and opencode-free still need an API key; the models themselves are the no-charge routes.
qwen is Alibaba Cloud Model Studio in China and qwen-intl is QwenCloud; minimax and minimax-intl use the China and international hosts. volcengine is ByteDance's Ark platform (Doubao), qianfan is Baidu's ERNIE platform, tencent is Tencent Cloud TokenHub (Hy), and xiaomi is the MiMo open platform. tencent defaults to the Guangzhou endpoint; use https://tokenhub-intl.tencentcloudmaas.com/v1/ for Singapore or https://tokenhub-us.tencentcloudmaas.com/v1/ for Silicon Valley. huggingface routes through Inference Providers, nvidia through the hosted NIM API, and vercel through AI Gateway.
Some large services are intentionally absent. Cohere's compatibility API rejects the stream_options field Crystal Code sends while streaming; Perplexity retired its Chat Completions surface in favor of the Agent API; GitHub Models was retired on 30 July 2026; Azure OpenAI, Amazon Bedrock, and Google Vertex AI need per-account or per-region base URIs; Cloudflare Workers AI embeds the account id in the URI. Other providers not covered in this pass include iFlytek Spark, ModelScope, Meituan LongCat, Hyperbolic, Featherless, Nscale, OVHcloud, Scaleway, Baseten, Modal, Replicate, Upstage, Sarvam, and Naver.
openai means OpenAI-compatible Chat Completions and responses is the OpenAI Responses API. deepseek, anthropic, gemini, and ollama are native protocols.
- Without this file, Crystal Code falls back to a small starter catalog:
deepseek,openai,gemini, andollama. Theanthropicprotocol is built in, but has no starter entry. - A
providers.jsonin the Crystal home supplies the operator catalog and overlays the built-in one. - Models that are not listed in the effective catalog cannot be selected. There is no global context window.
- A model may declare selectable context budgets with
contextWindows;/contextcycles them, and compaction and the status bar use the selected budget. - When
providers.jsonexists, the legacyprovidersobject inconfig.jsonis ignored.
Top-level keys are provider names. Each value is one provider entry or an array of entries, in the same shape Crystal Code reads and writes.
Provider fields:
| Field | Meaning |
|---|---|
protocol |
deepseek, openai, responses, anthropic, gemini, or ollama |
baseUri |
Absolute API base URI; the adapter appends the protocol's chat path |
models |
Table of selectable model ids |
replayReasoningContent |
Replay provider reasoning content (DeepSeek always does this) |
tokenLimit |
Chat Completions output field: max_tokens or max_completion_tokens |
options |
Optional object of protocol-specific settings; unknown names, or names that do not apply to the protocol, fail loading. temperature, topP, and maxTokens stay on the model |
apiKeyEnvironment |
Environment variable name checked first for this provider |
apiKey |
Literal, {env:NAME}, or {file:path}. Keep secrets out of this file |
requiresApiKey |
Whether a missing key is an error (default true, except ollama) |
organization / project |
Optional OpenAI organization and project |
Model fields:
| Field | Meaning |
|---|---|
contextWindow |
Required. Positive maximum token window; upper bound for selectable budgets, and the sole budget when contextWindows is omitted |
contextWindows |
Optional distinct positive token budgets no greater than contextWindow, for example [272000, 1000000]. /context cycles them; the lowest is the initial budget, and compaction and the status bar use the selected budget |
maxTokens |
Optional positive output-token cap |
thinking |
Whether the model accepts reasoning hints |
thinkingEfforts |
Portable names minimal, low, medium, high, and maximum (max is stored as maximum), or another effort token the endpoint accepts. A token starts with a letter and then uses only letters, digits, and hyphens |
thinkingCanDisable |
Whether /thinking off is accepted (default true). Models that always reason, such as Gemini 3, set this to false |
imageInput |
Whether the model may receive images (default false) |
audioInput |
Declared audio input (default false). Stored and visible to plugins; the host does not accept or send audio |
videoInput |
Declared video input (default false). Stored and visible to plugins; the host does not accept or send video |
temperature |
Optional, 0 to 2 |
topP |
Optional, 0 to 1 |
The user guide covers protocols, examples, and credentials in full.
Maintainers can write a commit message and commit the current change with commit.sh. It runs crystal run in this repository. Extra arguments are appended to the task. The run skips external tools and the directory trust check, and it does not record the directory as trusted.
Edit the provider file under providers/ when a provider adds, retires, or changes models or model metadata. The file name, without .json, is the provider id. The file is one provider entry, or an array of entries when one service exposes several protocols.
Regenerate the catalog with build_providers.py. It overwrites providers.json and keeps two-space indentation. Provider order follows the current catalog; a provider file that is not already listed is appended in alphabetical order.
python3 build_providers.pyCrystal Code does not rewrite this file.