Use this when creating an LLM config to avoid placing secrets
inside R objects. Store your key in your shell or in ~/.Renviron
and reference it here by name.
llm_api_key_env(var, required = TRUE, default = NULL)
An internal secret handle to be used as api_key = llm_api_key_env("VARNAME")
.
Name of the environment variable (e.g., "OPENAI_API_KEY").
If TRUE, missing variables cause an authentication error at call time.
Optional default if the environment variable is not set.