Skip to main content

Module config

Module config 

Source
Expand description

TOML config loading (S9.1/S9.1.1).

Loads and resolves opi configuration with precedence: CLI > env > project config > user config > built-in defaults.

Phase 1 fields: model, max_iterations, tool_timeout_ms, theme, thinking, providers.anthropic.api_key_env.

Structs§

AnthropicProviderConfig
[providers.anthropic] section.
ConfigSource
External configuration sources for precedence resolution.
DefaultsConfig
[defaults] section.
OpiConfig
Top-level opi configuration (fully resolved).
ProvidersConfig
[providers] section.
ThinkingConfig
[thinking] section.

Enums§

ConfigError
Errors from config loading and parsing.

Functions§

load_config_file
Load and parse a TOML config file. Returns defaults if the file doesn’t exist. Returns a clear error for malformed TOML.
resolve_config
Resolve configuration from all sources with correct precedence: CLI > env > project config > user config > built-in defaults.
user_config_path
Return the platform-specific user config path.