Skip to main content

load_llm_config

Function load_llm_config 

Source
pub fn load_llm_config(cli: Cli) -> Result<LlmConfig>
Expand description

Load just the merged LlmConfig from all layered configuration sources.

Applies layers in ascending priority: compiled defaults → config.yaml llm: section → UAR_LLM__* env vars → LLM_* legacy env vars → cli arguments.

Takes ownership of cli (a parsed Cli struct). To load without CLI arguments use Cli::try_parse() or construct a default Cli with Cli::parse_from(std::iter::empty::<&str>()).

§Errors

Returns an error if any configuration source cannot be read or parsed.