dreb supports subscription-based providers via OAuth and API key providers via environment variables or auth file. For each provider, dreb knows all available models. The list is updated with every dreb release.
- Node Version and Streaming
- Subscriptions
- API Keys
- Auth File
- Cloud Providers
- Custom Providers
- Resolution Order
- Model Selection and Removed Models
Use Node.js 22 LTS. dreb's providers rely on stable SSE streaming, and Node 22 LTS is the supported runtime. Node 24 and Node 26 are known to break streaming: Node 26 changed ReadableStream buffering to "read one buffer at a time instead of reading ahead", which breaks the SSE stream parsers in the Anthropic SDK (v0.73.0) and OpenAI SDK (v6.26.0) that dreb uses.
If every provider fails with "request ended without sending any chunks", check your Node version and switch to Node.js 22 LTS.
Use /login in interactive mode, then select a provider:
- ChatGPT Plus/Pro (Codex)
- GitHub Copilot
- Google Gemini CLI
- Google Antigravity
- Kimi For Coding (requires active Kimi For Coding subscription)
Use /logout to clear credentials. Tokens are stored in ~/.dreb/agent/auth.json and auto-refresh when expired.
- Press Enter for github.com, or enter your GitHub Enterprise Server domain
- If you get "model not supported", enable it in VS Code: Copilot Chat → model selector → select model → "Enable"
- GPT-6 models, including
github-copilot/gpt-6-astra, use the Responses API. Astra supportsxhighand nativemaxthinking; access depends on the subscription and enabled models. - For adaptive Claude models such as Opus 4.8, readable thinking requires
thinkingDisplay: "summarized"in SDK calls; enabling thinking alone can return only opaque signatures. See thinking display. - A registry context window can be lower than the endpoint's hard limit. Accepting a larger request does not change dreb's configured window. Usage-based overflow detection includes uncached input, cache reads, and cache writes.
- Gemini CLI: Standard Gemini models via Cloud Code Assist
- Antigravity: Sandbox with Gemini 3, Claude, and GPT-OSS models
- Both free with any Google account, subject to rate limits
- For paid Cloud Code Assist: set
GOOGLE_CLOUD_PROJECTenv var
- Requires ChatGPT Plus or Pro subscription
- Personal use only; for production, use the OpenAI Platform API
- The Codex catalog is derived automatically from the OpenAI Platform catalog at build time: frontier GPT models (GPT-5.5 and newer, named variants such as Sol/Terra/Luna/Astra, and
gpt-daybreak-*previews) are mirrored ontoopenai-codex, plusgpt-5.4-mini.-pro,-mini,-nano,-chatand-codexvariants and dated snapshots are excluded. The build fails loudly if a known Codex model disappears from the OpenAI catalog or a derived model lacks the catalog limits Codex requires (logic inpackages/ai/scripts/codex-models.ts). Default isgpt-5.6-luna. Every Codex model uses a 272k context window, matching Codex CLI's default: the models support ~1M, but prompts above 272k input are billed at 2x. To use a larger window, overridecontextWindowfor the model viamodelOverridesinmodels.json. - Which models actually work depends on your ChatGPT plan/workspace — enterprise workspaces often enable new models later. An unavailable model fails with "model is not supported when using Codex with a ChatGPT account".
- Astra supports text/image input, a conservative 272K configured context window, and up to 128K output tokens. Codex
minimaleffort is clamped tolow;xhighandmaxare sent unchanged.
/loginuses the Kimi Code OAuth subscription endpoint athttps://api.kimi.com/coding/v1.KIMI_API_KEYuses Kimi For Coding's Anthropic-compatible API athttps://api.kimi.com/coding.- Built-in OAuth models are
kimi-for-coding(default, 262k context),k3(1M context), andkimi-for-coding-highspeed(262k context). Model availability is plan-dependent: thek31M-context ID and thekimi-for-coding-highspeedID are only exposed when the subscription includes them, andkimi-for-coding-highspeedruns at roughly 6× speed for 3× quota usage. On login/refresh, dreb asks the Kimi API which models the subscription is entitled to and updates context, reasoning, image, tool-use, protocol, and thinking-effort metadata. Compatible newly discovered IDs are templated conservatively; if discovery fails, the static list remains available. - The OAuth
k3model is context-tiered: the Kimi endpoint serves it ask3-256k(256k context, cheaper) andk3(1M context, stated to consume 2× the quota), and upgrading does not invalidate the prompt cache. The cheaper variant is exclusive to the Kimi for Coding OAuth endpoint — the pay-per-token Moonshot AI Platform does not expose it. dreb starts every session on thek3-256kwire ID and automatically upgrades tok3once the session context passes the 256k cutoff (256k minus the default compaction reserve) instead of compacting. A user-lowered compaction threshold compacts before the cutoff and thus effectively disables the upgrade. Customizingk3's context window viamodels.jsondisables automatic tiering entirely, and compacted or fresh sessions return to the cheaper tier. - OAuth requests use the current Kimi Code device identity contract and share its stable
~/.kimi-code/device_id. Extra low-precedence headers can be supplied with newline-separatedKIMI_CODE_CUSTOM_HEADERSvalues. - The OAuth coding endpoint accepts OpenAI-style multimodal content arrays with base64
image_urldata URLs. dreb keeps a conservative 32k output-token cap because the managed model catalog does not currently advertise a per-model output limit. - Moonshot Open Platform uses a different base URL (
https://api.moonshot.ai/v1); don't assume both routes expose identical behavior.
Set via environment variable:
export ANTHROPIC_API_KEY=sk-ant-...
dreb| Provider | Environment Variable | auth.json key |
|---|---|---|
| Anthropic | ANTHROPIC_API_KEY |
anthropic |
| Azure OpenAI Responses | AZURE_OPENAI_API_KEY |
azure-openai-responses |
| OpenAI | OPENAI_API_KEY |
openai |
| Google Gemini | GEMINI_API_KEY |
google |
| Mistral | MISTRAL_API_KEY |
mistral |
| Groq | GROQ_API_KEY |
groq |
| Cerebras | CEREBRAS_API_KEY |
cerebras |
| xAI | XAI_API_KEY |
xai |
| OpenRouter | OPENROUTER_API_KEY |
openrouter |
| Vercel AI Gateway | AI_GATEWAY_API_KEY |
vercel-ai-gateway |
| ZAI | ZAI_API_KEY |
zai |
| OpenCode Zen | OPENCODE_API_KEY |
opencode |
| OpenCode Go | OPENCODE_API_KEY |
opencode-go |
| Hugging Face | HF_TOKEN |
huggingface |
| Kimi For Coding | KIMI_API_KEY |
kimi-coding |
| MiniMax | MINIMAX_API_KEY |
minimax |
| MiniMax (China) | MINIMAX_CN_API_KEY |
minimax-cn |
Reference for environment variables and auth.json keys: const envMap in packages/ai/src/env-api-keys.ts.
Store credentials in ~/.dreb/agent/auth.json:
{
"anthropic": { "type": "api_key", "key": "sk-ant-..." },
"openai": { "type": "api_key", "key": "sk-..." },
"google": { "type": "api_key", "key": "..." },
"opencode": { "type": "api_key", "key": "..." },
"opencode-go": { "type": "api_key", "key": "..." }
}The file is created with 0600 permissions (user read/write only). Auth file credentials take priority over environment variables.
The key field supports three formats:
- Shell command:
"!command"executes and uses stdout (cached for process lifetime){ "type": "api_key", "key": "!security find-generic-password -ws 'anthropic'" } { "type": "api_key", "key": "!op read 'op://vault/item/credential'" } - Environment variable: Uses the value of the named variable
{ "type": "api_key", "key": "MY_ANTHROPIC_KEY" } - Literal value: Used directly
{ "type": "api_key", "key": "sk-ant-..." }
OAuth credentials are also stored here after /login and managed automatically.
export AZURE_OPENAI_API_KEY=...
export AZURE_OPENAI_BASE_URL=https://your-resource.openai.azure.com
# or use resource name instead of base URL
export AZURE_OPENAI_RESOURCE_NAME=your-resource
# Optional
export AZURE_OPENAI_API_VERSION=2024-02-01
export AZURE_OPENAI_DEPLOYMENT_NAME_MAP=gpt-4=my-gpt4,gpt-4o=my-gpt4o# Option 1: AWS Profile
export AWS_PROFILE=your-profile
# Option 2: IAM Keys
export AWS_ACCESS_KEY_ID=AKIA...
export AWS_SECRET_ACCESS_KEY=...
# Option 3: Bearer Token
export AWS_BEARER_TOKEN_BEDROCK=...
# Optional region (defaults to us-east-1)
export AWS_REGION=us-west-2Also supports ECS task roles (AWS_CONTAINER_CREDENTIALS_*) and IRSA (AWS_WEB_IDENTITY_TOKEN_FILE).
dreb --provider amazon-bedrock --model us.anthropic.claude-sonnet-4-20250514-v1:0Prompt caching is enabled automatically for Claude models whose ID contains a recognizable model name (base models and system-defined inference profiles). For application inference profiles (whose ARNs don't contain the model name), set AWS_BEDROCK_FORCE_CACHE=1 to enable cache points:
export AWS_BEDROCK_FORCE_CACHE=1
dreb --provider amazon-bedrock --model arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/abc123If you are connecting to a Bedrock API proxy, the following environment variables can be used:
# Set the URL for the Bedrock proxy (standard AWS SDK env var)
export AWS_ENDPOINT_URL_BEDROCK_RUNTIME=https://my.corp.proxy/bedrock
# Set if your proxy does not require authentication
export AWS_BEDROCK_SKIP_AUTH=1
# Set if your proxy only supports HTTP/1.1
export AWS_BEDROCK_FORCE_HTTP1=1Uses Application Default Credentials:
gcloud auth application-default login
export GOOGLE_CLOUD_PROJECT=your-project
export GOOGLE_CLOUD_LOCATION=us-central1Or set GOOGLE_APPLICATION_CREDENTIALS to a service account key file.
Via models.json: Add Ollama, LM Studio, vLLM, or any provider that speaks a supported API (OpenAI Completions, OpenAI Responses, Anthropic Messages, Google Generative AI). See models.md.
Via extensions: For providers that need custom API implementations or OAuth flows, create an extension. See custom-provider.md and examples/extensions/custom-provider-gitlab-duo.
When resolving credentials for a provider:
- CLI
--api-keyflag auth.jsonentry (API key or OAuth token)- Environment variable
- Custom provider keys from
models.json
The Codex catalog no longer lists the probe-verified unsupported routes gpt-5.1, gpt-5.1-codex-max, gpt-5.1-codex-mini, gpt-5.3-codex, gpt-5.4, and gpt-5.3-codex-spark. This does not remove similarly named models from other providers.
If a saved default no longer exists, startup warns and prefers that provider's known default when available. For example, a missing saved openai-codex/gpt-5.4 selects openai-codex/gpt-5.6-luna even when OpenAI API credentials are also present. If the saved provider's default is unavailable, dreb can select another available model, with the warning naming the replacement. Use /model to save a new default.
For explicit CLI selection (--model provider/id or --provider provider --model id), if an ID exists exactly on another provider but only fuzzy-matches a different ID on the requested provider, dreb warns and uses the requested ID as a custom model rather than silently substituting the fuzzy match. Thus --model openai-codex/gpt-5.4 does not select gpt-5.4-mini; the unsupported ID is sent to Codex and can fail at the server. This is not an automatic migration or a general ban on fuzzy model patterns. Choose a supported model explicitly, for example:
dreb --model openai-codex/gpt-6-astra --thinking xhigh