Command note: examples use ./build/las for Linux/macOS. In Windows PowerShell, use .\build\las.exe.
This document describes the P1 install planner behavior used by ./build/las module install <module>.
P1 focuses on:
- structured LLM planning input
- validated plan output
- safe fallback to static install path
- operator-visible debug and strict modes
It does not cover config planner, run planner, or failure handling orchestration.
LocalAIStack uses two model roles:
- translation model:
i18n.translation.model(defaulttencent/Hunyuan-MT-7B) - assistant model:
llm.model(defaultdeepseek-ai/DeepSeek-V3.2)
Install planning uses the assistant model only.
For module install:
- load and validate
INSTALL.yaml - select initial mode from static decision logic
- build planner input from module spec:
- current mode
- available modes
- current mode step list + category summary
- mode catalog for all install modes
- preconditions summary
- call LLM provider with strict JSON schema prompt
- parse and validate response
- apply selected mode/steps only if valid
- otherwise fallback to static steps
Service-related steps are always preserved when applicable.
P1 classifies steps to improve model planning quality:
dependencydownloadbinary_installsource_buildconfigureserviceverify
Classification is derived from step id/intent/command/tool and used only as planner context.
Planner expects JSON:
{
"mode": "native",
"steps": ["deps", "download", "verify"],
"reason": "short reason",
"risk_level": "low",
"fallback_hint": "optional"
}Compatibility notes:
selected_stepsis accepted as alias ofstepsrisk_levelis normalized tolow|medium|high- unknown mode or unknown step IDs will reject the plan and trigger fallback
If any of the following fails:
- provider call
- JSON extraction/parsing
- mode validation
- step ID validation
then LocalAIStack falls back to static install mode/steps by default.
This keeps installation availability high while still enabling LLM planning.
P1 exposes two environment switches:
LOCALAISTACK_INSTALL_PLANNER_DEBUG=1LOCALAISTACK_INSTALL_PLANNER_STRICT=1
Debug mode prints planner source and final plan:
source=llmmeans LLM plan was acceptedsource=staticmeans fallback path was used- fallback reason is printed when available
Strict mode converts fallback into hard failure. This is useful for testing whether LLM planning is truly active.
Example:
export LOCALAISTACK_INSTALL_PLANNER_DEBUG=1
export LOCALAISTACK_INSTALL_PLANNER_STRICT=1
./build/las module install p2-smokeTo prove the assistant model participates in install planning:
- ensure
llm.model=deepseek-ai/DeepSeek-V3.2 - enable debug mode and observe
source=llm - optionally enable strict mode and verify invalid key causes hard failure
- compare with fallback provider (for example
eino) to confirm behavior difference - verify provider-side request logs by model and timestamp
If output shows source=static, DeepSeek did not affect planning for that run.
- fallback path can mask planner issues unless debug/strict is enabled
- planner decisions are currently printed only in debug mode
- no persistent planner trace store yet
These are planned follow-ups outside P1.