Configuration files¶
Each model is one YAML file. The files in conf/ are working examples for every backend.
LLM_VERSION : "gpt-5.2"
API_KEY_NAME : "OPENAI_API_KEY"
LLM_CONFIG:
max_completion_tokens: 16384
seed: 42
Common keys¶
PROVIDERBackend slug or alias (
azure,claude,hf, …). Optional, see Provider selection. The aliases are listed inllm_factory.PROVIDER_ALIASES.LLM_VERSION/MODEL/MODEL_NAMEModel or deployment name. The first one set wins.
SYSTEM_MSGSystem prompt sent ahead of every query.
DISABLE_SYSTEMTurn system messages into a user/assistant pair, for models whose chat template has no system role.
LLM_CONFIGRequest parameters, forwarded to the provider as-is.
Request parameters¶
LLM_CONFIG is not validated. Write the parameter names the model expects, for example
max_completion_tokens for the gpt-5 family and max_tokens for older models. A backend
can rename some generic names through PARAM_ALIASES: Anthropic and
Gemini both accept max_tokens and stop and send them under their own names. Local
backends (Hugging Face, vLLM) consume the parameters in-process.
Values read from the environment¶
Credentials stay in .env (see Usage). A configuration names the variable instead of
holding the value. llm_base.resolve_config_value() accepts three forms:
ENDPOINT_ENV : "AZURE_OPENAI_ENDPOINT" # <KEY>_ENV names the variable
ENDPOINT : "${AZURE_OPENAI_ENDPOINT}" # ${VAR} syntax
ENDPOINT : "AZURE_OPENAI_ENDPOINT" # bare upper-case name (ENDPOINT and BASE_URL only)
A referenced variable that is unset raises ValueError. API keys are read from the
variable named by API_KEY_NAME. The string "None" counts as unset everywhere.
Provider selection¶
When PROVIDER is missing, llm_factory.infer_provider() guesses from the other keys, in
this order:
ENDPOINT,ENDPOINT_ENVorAPI_VERSIONpresent:azure_openai.Model starting with
claude, or key name containinganthropic:anthropic.Model starting with
gemini:gemini. Model starting withglm:glm.vLLM engine keys (
TENSOR_PARALLEL_SIZE,GPU_MEMORY_UTILIZATION, …) and no API key:vllm.MODEL_NAME,DEVICE,QUANTIZEorCACHE_DIRand no API key:huggingface.Model starting with
gpt,o1,o3oro4:openai.
Set PROVIDER when the guess is wrong. Azure -pro deployments, for example, need
PROVIDER: "azure_responses".
Backend-specific keys¶
Backend |
Keys |
|---|---|
OpenAI |
|
Azure OpenAI |
|
Azure Responses |
As Azure OpenAI. |
Anthropic |
|
Gemini |
|
GLM |
|
Hugging Face |
|
vLLM |
|
Each backend class in Backends documents its keys in detail.