AI Brain
LLM providers, API keys with automatic failover, the versioned trader prompt and every call. Used for demo decisions, explanations and strategy ideas - never inside historical backtests.
API keys
Priority order: the first usable key answers; on an error, rate limit or empty quota the next one takes over automatically.
| Priority | Key | Provider / model | Status | Requests | Tokens in / out | Last success | Today $ / budget | Credit · days left | Last error |
|---|
Add an API key
The key is encrypted with the workspace key and never shown again. Lower priority numbers answer first.
Providers and models
Claude uses the official SDK; Gemini its own API; any OpenAI-compatible endpoint (Grok, OpenRouter, Groq, a local model) works by base URL.
Trader flow (demo AI)
Before a NEW trade only: a Bull and a Bear analyst (routine model) argue, the trader decides again, then a Challenger on another provider approves or rejects. Any failure, timeout or a budget that does not cover the flow means no new trade. Open trades are managed as before.
AI self-review (weekly)
Once a week, when enough decisions are scored, the decision model reads the scores and may switch the debate, its rounds and the Challenger. It cannot change anything else.
No self-review yet.
Model routing and cost
Trade decisions and strategy ideas on the strongest model, routine explanations and summaries on the cheaper one. The LLM is called only for a setup, an open trade, a news window or the 30-minute London/New York review; the static prompt part is cached.
Prompts and calls
Versioned prompt files (backend/research/prompts) and the last LLM calls. Every request and response is stored; secrets never are.
| Time | Purpose | Prompt | Provider / model | Status | Latency | Tokens in / out · cache read | Cost |
|---|---|---|---|---|---|---|---|
| No LLM call yet (add a key above). | |||||||