Skip to main content
These fields come from the current configured_detectors, callback, wrapper, and check config loaders. Unrecognized keys are not rejected reliably; a misspelling can silently leave the default in effect. Gemini-related providers, variables, and dependencies below describe the source checkout. The published 0.2.1 wheel uses OpenAI embeddings and does not include the Gemini provider implementation.

Live settings

Place these under live in loopguard.yml, or at the top level of a live-only file. These defaults describe LoopGuardCallbackHandler() and LoopGuard(); demo scenarios select their own detector lists and thresholds. Windows count events, not only tool calls. Calls and results can each consume an event. The loader validates positive numbers but does not check every meaningful relationship between settings, such as whether enough calls can fit in a window. ProgressDetector.patience, RepeatedFailureDetector.attempts, action-cycle parameters, interrupt_on_fatal, recursion_limit, and policy thresholds are not file settings accepted by these live loaders. Use Python APIs where exposed.

Saved-trace check settings

Place these under check, or use top-level keys for a check-only file. JSON config can also supply limits through a budgets mapping; direct limit fields take priority. Prefer the flat fields in YAML because the YAML parser only supports shallow mappings. Check mode does not load the live detector settings or enable semantic detection from this file. It analyzes with the offline default detector list, then applies failure rules and budgets to the reports. An empty fail_on list falls back to looping; it does not disable all status checks.

Environment variables

Model names above are implementation defaults, not a promise that your provider account has access. Embedding models are constructor arguments, not environment settings. Set both provider selectors explicitly when using Gemini: the library’s embedding selector defaults independently to OpenAI. For runnable examples, see configuration and the local demo.