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§
- Anthropic
Provider Config [providers.anthropic]section.- Config
Source - External configuration sources for precedence resolution.
- Defaults
Config [defaults]section.- OpiConfig
- Top-level opi configuration (fully resolved).
- Providers
Config [providers]section.- Thinking
Config [thinking]section.
Enums§
- Config
Error - 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.