Files
audita/docs/internal/llm-runtime.md

25 lines
1.8 KiB
Markdown

# Audita LLM Runtime
`llm.NewRuntime` assembles one captured PromptKit engine using its default
catalog, Audita's embedded prompts and schemas, and optional operator sources
anchored to the recorded application main context. Captured host sources and
message files are passed to output collision checks. An embedded-only diagnostic
construction distinguishes shipped asset failures from operator-source failures;
it never replaces the requested engine.
Each resolved pipeline entry receives role-bound clients with its selected
profiles and effective budgets. Clients share engine-local backend admission.
The adapter uses `PrepareExecution` and `RunPrepared` on the same handle, passes
Audita's per-call schema and repair budget, and decodes only validated results.
PromptKit owns backend and credential selection. The adapter uses captured
credential source names for artifact redaction without inspecting unrelated
environment values. See the [integration contract](../integrations/openai-compatible-llm.md)
for failure behavior and the [configuration reference](../config.md) for sources.
Proposal calls can retain the original prompt, effective variables, prepared messages, and final response for section-local repair replay. The adapter renders the repair definition with the selected profile, appends branch history to the original prompt, and checks the prepared prefix before execution. The requested repair definition is retained in call attribution alongside the native base-prompt metadata.
The observation collector tracks logical calls and execution events. Ordinary
reports use compact safe outcomes; request and response evidence is optional
debug material. The runner preserves ordered pipeline traversal and deterministic
section collection while canceling and joining peers on fatal errors.