Any System One server
ThinkThen posts every question to BASE/systemone. Any server that answers there in the System One shape can be a backend.
By address
Set THINKTHEN_BASE_URL to the server's base, or pass --url on one command. The key comes from THINKTHEN_API_KEY. The model is the default unless you pass --model.
export THINKTHEN_BASE_URL=http://localhost:8080/v1
thinkthen status --json |
jq '.backend | {url, url_source, key_variable}'{
"url": "http://localhost:8080/v1/systemone",
"url_source": "environment",
"key_variable": "THINKTHEN_API_KEY"
}By name
The configuration file can name a server under backends. An entry gives the server's url, the name of the variable that holds its key in key_env, and its model. The file never holds the key itself. Then --backend NAME or THINKTHEN_BACKEND picks the entry, and backend in the file makes it the default.
{
"schema": "thinkthen.config/1",
"backends": {
"local-d1": {
"url": "http://127.0.0.1:8080/v1",
"key_env": "LOCAL_D1_KEY",
"model": "d1:free",
"requests_per_minute": 120
}
}
}export XDG_CONFIG_HOME="$PWD/config"
thinkthen status --backend local-d1 --json |
jq '.backend | {name, url, model, key_variable}'{
"name": "local-d1",
"url": "http://127.0.0.1:8080/v1/systemone",
"model": "d1:free",
"key_variable": "LOCAL_D1_KEY"
}A name uses 1 to 32 lowercase letters, digits, and hyphens, and may not reuse a built-in name. The Configuration page says where the file lives.
Pace the requests
ThinkThen sets no pace of its own. requests_per_minute on an entry caps how many requests one process starts each minute, retries included. It takes a whole number from 1 to 60,000. A built-in's name may appear under backends with a rate and nothing else. THINKTHEN_REQUESTS_PER_MINUTE outranks the file. The limit holds within one process. Requests a minute gives the rule.
{
"schema": "thinkthen.config/1",
"backends": {
"typesafe": {"requests_per_minute": 0}
}
}export XDG_CONFIG_HOME="$PWD/bad"
thinkthen statusthinkthen: configuration backend field `requests_per_minute` must be a whole number from 1 to 60000
Check the server
thinkthen check --url BASE sends four fixed questions that cover every question shape ThinkThen asks. It prints one row each for the connection, the key, the endpoint, the four questions, and the usage counts. A row reads ok, warning or critical. It exits 0 only when no row is critical. Every request is real, so a hosted server may charge for it. The check reference explains every row.
thinkthen check \
--url http://localhost:8080/v1 \
--plan |
head -n 4url http://localhost:8080/v1/systemone provider systemone model asked unspecified model sent jev-1.13.0
A threshold tuned on one model does not carry to another. Grade the new model on your own labeled records with audit before you trust it.
From your language
Each page shows how its language names a backend.
All backends · Servers without System One · Bring your own backend
On GitHub: github.com/botassembly/thinkthen