Skip to main content

Module config

Module config 

Source
Expand description

TOML configuration.

One file per repository, conventionally drep.toml at the root. The shape is deliberate: every field has a documented default, so a partial file works. Missing keys are not an error - the section just inherits the default. Providers are declared as [[llm]], an ordered array of tables: a preference order, tried head first, each enabled entry a fallback for the one before it.

The two things this module owns that are not obvious from the field list:

  • ${VAR} expansion. An api key (or any string value) can name an environment variable instead of holding the secret. The file gets committed; the secret does not. An unset variable is an error rather than an empty string, because a silent empty credential produces a confusing 401 instead of a clear “API_KEY is not set”.
  • max_tokens defaults to None, meaning no cap is sent to the model. Modern reasoning models ship 256k-1M context, and inventing a ceiling truncates them mid-thought. The option stays available for capping spend.

Structs§

Config
The whole configuration tree, rooted at the file.
LlmConfig
One provider in the failover chain.

Enums§

BackendKind
Which implementation serves one provider entry.
ConfigError
What went wrong reading or validating the configuration.
ReasoningEffort
Reasoning effort accepted by the Codex CLI configuration contract.

Constants§

DEFAULT_MAX_REVIEW_ROUNDS

Functions§

default_config_path
The conventional config file location: drep.toml in the current directory.
env_var_refs
Every ${NAME} reference in s, in the order they appear.
env_var_refs_in
Every ${NAME} reference in any string value of a parsed TOML tree.
load
Load and validate path.
parse_protocol
Parses a protocol = value, or None when it names nothing the SDK speaks.
required_env_var_refs
Every ${NAME} reference that load will actually try to substitute.