AI

OpenAI emulator

admin — changes apply immediately, defaults come from config

API keys

Allow-list of `Authorization: Bearer <key>` values. Anything else gets the documented 401 invalid_api_key body.

Reply rules

Evaluated top-down against the concatenated message text (and optionally the model); first match wins. Runtime rules come before config rules and survive restarts until reset. No match → deterministic default (translation JSON for the backend prompt, echo otherwise).

Recent completions

Model, first 120 chars of the prompt, and which rule answered.

Fault injection

Injected latency (ms) before every completion. Errors (401/429/5xx…) are rules: add one with status + error above.

Requests from the backend

Danger zone

wipes payments, logs and every runtime override — back to configured defaults