Providers & keys
CoSci reasons with a local heuristic engine by default, and uses a real LLM when one is configured. You bring your own key (or CLI) — there’s no CoSci account and no managed inference.
Provider priority
The first available provider wins; any failure falls through to the next, and finally to the heuristic engine:
claude_cli— the local Claude Code CLI (claude), if on your PATHcodex_cli— the local Codex CLI (codex), if on your PATH- Gemini — Google Generative AI (
GEMINI_API_KEY/GOOGLE_API_KEY) - DeepSeek — (
DEEPSEEK_API_KEY) - Anthropic / OpenAI HTTP APIs — last resort, if keys are present
claude_cli / codex_cli need no API key — just the CLI on your PATH.
Configure
Copy backend/.env.example to backend/.env and set what you need. Never commit
.env — it’s gitignored. Reference (not real values):
# turn the local CLIs into providers (slower: ~3–9 s/call; set 0 to use Gemini directly)RC_USE_CLI_PROVIDERS=1GEMINI_API_KEY=... # GOOGLE_API_KEY also acceptedRC_GOOGLE_MODEL=gemini-2.5-flash # a valid flash modelDEEPSEEK_API_KEY=...RC_DEEPSEEK_MODEL=deepseek-chatRC_OFFLINE=0 # 1 = hard offline (heuristic only)Check what’s active
curl http://localhost:8799/agents/providers…or open the Agents screen in the app. It shows which provider served each call, cache state, and online/offline status.
Run fully offline
Set RC_OFFLINE=1 and CoSci uses only its deterministic heuristic engine — no
network, no keys, no external calls. Useful for demos, air-gapped machines, or just
to keep everything on-device.
Next: grounding & anti-hallucination, or the scientific tools the online mode reaches.