Providers & auth
The turnkey brain runs on one of four provider backends. Select it with the
--provider flag or the PYOCD_TURNKEY_PROVIDER environment variable.
# openai-api | anthropic-api | codex-cli | claude-cliPYOCD_TURNKEY_PROVIDER=codex-cliThe four backends
Section titled “The four backends”| Provider | Auth | Notes |
|---|---|---|
codex-cli |
Local codex CLI auth |
Uses whatever Codex auth you configured — a ChatGPT/Codex subscription or Codex’s own API key. |
claude-cli |
Local claude CLI auth |
A user-controlled local Claude Code CLI adapter — a Claude subscription or ANTHROPIC_API_KEY. Not bundled Claude access. |
openai-api |
OPENAI_API_KEY |
Requires an explicit model via --model or PYOCD_TURNKEY_MODEL. |
anthropic-api |
ANTHROPIC_API_KEY |
Requires an explicit model. Stateless at the Messages API layer, so continuity uses the brain’s memory layer. |
Choosing a model
Section titled “Choosing a model”The API backends require an explicit model:
uv run pyocd-debug-brain benchmark \ --provider anthropic-api \ --model <model-id> \ --case-id nrf52833dk__k001_reference_greenThe CLI backends inherit their default model from the local CLI unless you
override it with --model / PYOCD_TURNKEY_MODEL.
Session continuity
Section titled “Session continuity”Inside a single run, continuity is unified across backends: the brain always persists compact local memory, and remote-capable providers (OpenAI Responses, Claude CLI resume, Codex CLI thread resume) use native continuation with the compact memory injected periodically as a safety sync. A resume failure on a real provider handle stops a headless run rather than silently starting a fresh session.