2.0 KiB
OpenAI-Compatible LLM Integration
Audita uses the pinned PromptKit built-in OpenAI-compatible transport. PromptKit owns chat-completions wire framing, provider envelope parsing, transient retries, per-generation timeouts, and JSON Schema repair. A backend's configured base endpoint must support the selected profile's model and structured JSON-schema responses; local configuration inspection does not contact the provider.
Audita selects a role profile, supplies its registered backend credential, and passes the embedded response schema as a complete per-call output contract. It prepares each call once, checks that the prepared target still matches the inspected backend and endpoint, then executes that same prepared request. A profile cannot introduce a separate credential environment lookup. An absent backend credential permits an unauthenticated local service.
llm.transient_retries counts additional attempts for eligible transient
failures; explicit zero makes one attempt. llm.repair_attempts counts
additional generations for schema-invalid model output. The operation timeout
covers preparation, capacity waiting, retries, generation, and repair. Caller
cancellation or an earlier deadline also applies. See configuration
for defaults and PromptKit's consumer contract
for the pinned protocol and retry details.
A failed JSON Schema result after repair is classified as malformed generated output; proposal and validator callers can turn it into a warning. Provider, transport, malformed HTTP envelope, retry, admission, and deadline failures stay runtime failures. Audita decodes into domain types only after PromptKit validates the JSON. Errors exposed to users carry safe messages while retaining typed causes for internal classification. Diagnostic request/response content is sensitive and follows operations guidance.