Skip to content

Model Configuration

DeepBuilder uses one structured model registry instead of sets of model environment variables:

Terminal window
deepbuilder config init
deepbuilder config path

The default file is ~/.config/deepbuilder/models.json, created with mode 600. An existing file is never overwritten.

{
"version": 1,
"models": {
"deepseek-v4-flash": {
"model": "deepseek-v4-flash",
"use_proxy": false,
"reasoning_replay": "preserve",
"pricing": {
"input_usd_per_1m": 0.15,
"cached_input_usd_per_1m": 0.003,
"output_usd_per_1m": 0.60
},
"endpoints": {
"code": [
{"url": "https://provider-a.example.com/v1", "key": "key-a"}
],
"feedback": [
{"url": "https://provider-b.example.com/v1", "key": "key-b"}
]
}
},
"qwen3-coder": {
"model": "qwen3-coder",
"reasoning_replay": "preserve",
"endpoints": [
{"url": "https://provider-c.example.com/v1", "key": "key-c"}
]
}
},
"defaults": {
"code_models": ["deepseek-v4-flash", "qwen3-coder"],
"feedback_models": ["deepseek-v4-flash"],
"selection": "auto"
}
}

Keys under models are plain model names, without code- or feedback- prefixes. One model can use different endpoints for the Code and Feedback roles; a single shared endpoint array is still accepted. On rate limits, timeouts, or connection failures, InquiryCraft applies cooldown and failover across the endpoints of that role.

Field Meaning
use_proxy true routes both Code and Feedback endpoints of this alias through HTTPS_PROXY / HTTP_PROXY (lowercase forms accepted; USER_NAME / USER_PWD supported). NO_PROXY does not override an explicitly enabled proxy. Omitted or false connects directly. Keep proxy addresses and passwords out of models.json; if the proxy replaces HTTPS certificates, trust its CA through the system store or SSL_CERT_FILE.
pricing The only price source for chat, long research, TUI, and Web cost estimates, in USD per million tokens. All three values are required; a model without pricing shows Cost —. Prices match the requested model exactly.
reasoning_replay How earlier assistant reasoning enters the next request: preserve (default) keeps real reasoning; required adds a stable placeholder for older messages that lack it; omit sends no reasoning to the provider. None of these rewrite canonical memory or JSONL records. An explicit Stage setting wins over the alias, and aliases in one model pool must agree or startup fails.

The TUI, plain agents, and long research share the same file by default:

Terminal window
deepbuilder tui
deepbuilder agent run "Inspect the workspace"

TUI chat uses one model alias at a time. Without --model, it uses the first alias in defaults.code_models; endpoints under that alias still fail over.

In the TUI, /models opens a model picker in place of the input box: arrow keys move, Enter confirms, 1–9 select directly, and Esc returns. /models <alias> or /models <index> switches directly. The choice affects only the current chat, not Feedback or long-research settings, and does not clear the conversation. If the configuration is missing or invalid, the TUI points to deepbuilder config init and deepbuilder config path.

Choose models or a configuration file for a single run:

Terminal window
deepbuilder agent run "Inspect the workspace" --models deepseek-v4-flash,qwen3-coder
deepbuilder agent run "Inspect the workspace" --model-config /path/models.json

A task can override the default models:

/long-research circle packing workers=4 duration=1h models=auto
/long-research circle packing code-models=deepseek-v4-flash feedback-models=deepseek-v4-flash model-policy=fixed

If the command gives no model settings, the TUI asks once after resource configuration and before preflight. Enter defaults to accept the first default Code model and the default Feedback model, or provide models=... feedback-models=... model-policy=....

Policy Behavior
auto Uses the model pool and assigns primary models to different workers, keeping failover. Different models are spread across workers only when several models= are given.
fixed Every worker uses the first listed model.

The legacy spread value is still accepted. The model stays sticky within a Stage to preserve context and caching. Generated manifests store only model aliases, never URLs or keys.