LLM providers for incident investigation

Availability: preview

This page documents project-scoped provider behavior in the current incident application. It is not the binding format for the Local Harness source preview or planned generic Service. The neutral core depends only on ModelProvider and an opaque turn binding; concrete adapters and trusted composition resolve endpoint, model, and credentials.

Mendry supports project-scoped OpenAI-compatible and Anthropic provider configuration. The provider is optional configuration, and a failed webhook classifier call falls back to deterministic normalization. Remediation model turns require valid project provider configuration when that mode is used.

  1. Create an http_bearer project credential that holds the provider API key.
  2. Save a provider, an HTTPS-compatible baseUrl, the credential ID, a model ID, and an API mode:
    • Provider openai (OpenAI-compatible) supports two API modes:
      • chat_completions calls /v1/chat/completions.
      • responses calls /v1/responses.
    • Provider anthropic always uses API mode messages, which calls the Anthropic Messages API at /v1/messages. The default baseUrl is https://api.anthropic.com, and model IDs look like claude-sonnet-5 or claude-opus-5-5.
  3. List models through the project probe endpoint and select an ID returned by the provider.
  4. Run the bounded connectivity probe with the selected API mode before saving the operational choice.

Existing provider records default to chat_completions. The selected mode is used consistently for connectivity probes, log-rule generation, and remediation model turns. Every mode discovers models through /v1/models.

For Anthropic, the stored credential is sent as the x-api-key header together with anthropic-version: 2023-06-01, not as a bearer token. The Messages API has no JSON-object response mode, so Mendry instructs the model to reply with a single JSON object and removes markdown fences before validating the reply. Sampling parameters such as temperature are not sent. When a reply contains tool calls, any text before them is discarded.

The API key is write-only. Provider reads expose configuration metadata, not the secret.

Only configured provider calls may leave the customer environment. Logs record safe host/path, model, status, duration, token-usage metadata when available, and bounded sanitized diagnostics. They do not persist raw prompts, raw model responses, bearer tokens, or provider control payloads.

Model output is untrusted proposal data. Service-owned policy validates schema, tool names, project/run scope, budgets, evidence citations, stop conditions, and candidate plans. The model cannot choose credentials, arbitrary URLs, shell commands, merge approval, deployment approval, or recovery status.

Remove or omit the project LLM provider to prevent new provider-backed analysis. Review in-flight activity through your external operational records; the single-user incident application has no application audit event feed, and the current source evaluation does not include a durable general-purpose worker queue.

  • backend/README.md