Skip to main content
The Circuit Breaker Labs CLI can be configured through environment variables, command-line flags, and provider-specific options.

Environment Variables

Required Variables

CBL_API_KEY

Your Circuit Breaker Labs API key for authenticating with the evaluation service.
Get your API key by contacting team@circuitbreakerlabs.ai

Optional Variables

CBL_API_BASE_URL

Custom base URL for the Circuit Breaker Labs API. Defaults to wss://api.circuitbreakerlabs.ai/v1.

OPENAI_API_KEY

Required when using the OpenAI provider.

OPENAI_BASE_URL

Custom base URL for OpenAI-compatible endpoints. Defaults to https://api.openai.com/v1.

OPENAI_ORG_ID

Optional OpenAI organization ID.

OLLAMA_BASE_URL

Base URL for Ollama server. Defaults to http://localhost:11434.

Global Options

These flags can be used with any evaluation command and must be specified before the evaluation type.

—log-level

Set the logging verbosity level.
Values: error, warn, info (default), debug, trace

—log-mode

Enable log mode to disable the TUI and output logs to stdout instead. Useful for CI/CD pipelines and debugging.
In log mode, the interactive TUI is disabled. Progress will be logged as text output instead.

—output-file

Specify a custom output file path for evaluation results. By default, results are saved to auto-generated files with timestamps:
  • Single-turn: circuit_breaker_labs_single_turn_evaluation_YYYYMMDD_HHMMSS.json
  • Multi-turn: circuit_breaker_labs_multi_turn_evaluation_YYYYMMDD_HHMMSS.json

—add-header

Add custom HTTP headers to provider requests. Can be specified multiple times for multiple headers.
Format: "Key:Value"

Provider Configuration

OpenAI Provider

Required Options

Optional Parameters

—temperature <float>
Sampling temperature between 0 and 2. Higher values make output more creative.
—top-p <float>
Nucleus sampling parameter. Alternative to temperature.
—frequency-penalty <float>
Number between -2.0 and 2.0. Positive values penalize repeated tokens based on frequency.
—presence-penalty <float>
Number between -2.0 and 2.0. Positive values penalize repeated tokens based on presence.
—max-completion-tokens <integer>
Maximum number of tokens to generate in the completion.
—stop <string,string,...>
Up to 4 sequences where the API will stop generating tokens.
—logit-bias <token_id:bias,...>
Modify likelihood of specified tokens appearing. Bias values between -100 and 100.
—n <integer>
Number of chat completion choices to generate for each input.
—logprobs <bool>
Return log probabilities of output tokens.
—top-logprobs <integer>
Number between 0 and 20 specifying most likely tokens to return.
—service-tier <auto|default|flex|scale|priority>
Specifies the processing tier for the request.
—reasoning-effort <none|minimal|low|medium|high|xhigh>
Constrains effort on reasoning for reasoning models.
—store <bool>
Whether to store the output of this chat completion request.

Ollama Provider

Required Options

Optional Parameters

—temperature <float>
Model temperature. Higher values = more creative (default: 0.8).
—top-k <integer>
Reduces probability of generating nonsense. Higher = more diverse (default: 40).
—top-p <float>
Works with top-k. Higher values = more diverse text (default: 0.9).
—num-predict <integer>
Maximum tokens to predict (default: 128, -1 = infinite, -2 = fill context).
—num-ctx <integer>
Size of the context window (default: 2048).
—mirostat <0|1|2>
Enable Mirostat sampling (0 = disabled, 1 = Mirostat, 2 = Mirostat 2.0).
—mirostat-eta <float>
Mirostat learning rate (default: 0.1).
—mirostat-tau <float>
Controls balance between coherence and diversity (default: 5.0).
—repeat-penalty <float>
How strongly to penalize repetitions (default: 1.1).
—repeat-last-n <integer>
How far back to look to prevent repetition (default: 64, 0 = disabled, -1 = num_ctx).
—tfs-z <float>
Tail free sampling - reduces impact of less probable tokens (default: 1).
—num-gpu <integer>
Number of layers to send to GPU(s).
—num-thread <integer>
Number of threads to use during computation.
—num-gqa <integer>
Number of GQA groups in transformer layer.
—seed <integer>
Random number seed for generation (default: 0).
—stop <string>
Stop sequences (can be specified multiple times).
—logprobs <bool>
Return log probabilities for each token.

Custom Provider

For APIs that aren’t OpenAI-compatible, use Rhai scripts to translate between schemas.
—url <string> (required)
Endpoint URL to POST requests to.
—script <path> (required)
Path to the Rhai script file that handles request/response translation.
See the examples/providers/ directory for example Rhai scripts.

Complete Example