docs: clarify model configuration precedence

Assisted-by: Codex:gpt-5 [Codex]
This commit is contained in:
localai-org-maint-bot
2026-07-29 06:07:56 +00:00
parent 49ef40a187
commit 0bac2c3b3b
2 changed files with 17 additions and 0 deletions

View File

@@ -7,6 +7,20 @@ url = '/advanced/model-configuration'
LocalAI uses YAML configuration files to define model parameters, templates, and behavior. This page provides a complete reference for all available configuration options.
## Configuration scopes and precedence
[CLI flags and environment variables]({{% relref "reference/cli-reference" %}})
configure the LocalAI server process. Model YAML files configure one model,
while supported fields in an API request can override that model's defaults
for that request. For example, a request containing `temperature` overrides
the model YAML `parameters.temperature` only for that request.
Precedence is setting-specific rather than one universal ordering. For the
overlapping `threads` setting, an explicit nonzero server `--threads` value is
applied after model YAML and therefore wins over the YAML `threads` value.
Most server flags have no model YAML equivalent, so consult the relevant
reference for the scope of each setting.
## Overview
Model configuration files allow you to:

View File

@@ -7,6 +7,9 @@ url = '/reference/cli-reference'
Complete reference for all LocalAI command-line interface (CLI) parameters and environment variables.
These options configure the LocalAI server process. To configure an individual
model, see [Model Configuration]({{% relref "advanced/model-configuration" %}}).
> **Note:** All CLI flags can also be set via environment variables. Environment variables take precedence over CLI flags. See [.env files]({{%relref "advanced/advanced-usage#env-files" %}}) for configuration file support.
## Global Flags