Configuration

Every setting can come from the environment or from code. Code wins, so a test can pin its Phase while the environment configures everything else.

The settings

SettingEnvironmentValuesDefault
PhaseSHIMMY_PHASEdev, tuning, productiondev
Dev sourceSHIMMY_DEV_SOURCElocal, remotelocal under a test runner, else remote
Recording modeSHIMMY_RECORDINGauto, record, strictstrict under a test runner in CI, else auto
Production modeSHIMMY_PRODUCTIONmanaged, passthroughmanaged
Recordings directorySHIMMY_RECORDINGS_DIRa pathshimmy/recordings
LockfileSHIMMY_LOCKFILEa pathshimmy.lock
API keySHIMMY_API_KEYsk-opt-…required
Base URLSHIMMY_BASE_URLa URLhttps://rfa-labs.com

An unknown value fails when the client is constructed, not on the first call.

const shimmy = new Shimmy({
  phase: 'dev',             // 'dev' | 'tuning' | 'production'
  devSource: 'local',       // Dev: replay from the repo, or 'remote' from Shimmy
  recording: 'auto',        // Dev: 'auto' | 'record' | 'strict'
  production: 'managed',    // Production: 'managed' | 'passthrough'
  recordingsDir: 'shimmy/recordings',
  lockfile: 'shimmy.lock',
});

OPTIMIZER_API_KEY and OPTIMIZER_BASE_URL are still read when the SHIMMY_ names are unset.

Test runners

“Under a test runner” means:

SDKDetected by
Pythonpytest (the bundled plugin)
TypeScriptVITEST, JEST_WORKER_ID or NODE_TEST_CONTEXT in the environment
Rustthe crate’s testing feature, enabled on your dev-dependency
anySHIMMY_TEST=1

“In CI” means CI is set to anything but 0, false or no — which every mainstream CI service does.

Passthrough (Rust)

The TypeScript and Python SDKs pass through with the client you wrapped. Rust’s chat() needs to know where your provider is:

OptionEnvironmentDefault
provider_base_urlSHIMMY_PROVIDER_BASE_URL, then OPENAI_BASE_URLhttps://api.openai.com/v1
provider_api_keySHIMMY_PROVIDER_API_KEY, then OPENAI_API_KEYrequired in passthrough

Account settings

Mode, Allowed providers, provider keys, alerts, content capture and guardrails belong to the account, not the process. Set them in the dashboard (Settings), on the control plane, or as config as code.