Files
audita/docs/integrations/openai-compatible-llm.md

2.2 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 model operation that exhausts structural repair, a live-parent local operation timeout, capacity rejection, transport failure, malformed provider response, or provider HTTP failure is recoverable for that operation. Proposal generation then contributes no candidates from that response; a failed validation batch marks its candidates unavailable while other batches and later modules can continue. Caller cancellation, broken assets or configuration, and unknown internal failures remain fatal and cancel peers. Audita decodes into domain types only after PromptKit validates the JSON. Ordinary reports use safe reason codes and counts rather than provider messages. Full request/response content is written only with --debug; see operations.