ReqLLM.Doctor (ReqLLM v1.19.0)

View Source

Read-only installation and runtime diagnostics for ReqLLM.

run/1 never performs provider requests. By default it also never starts applications or changes runtime configuration. Callers may explicitly opt into normal ReqLLM startup with start_application?: true, which is useful for short-lived command processes. Its result is JSON-serializable and contains no credential values, request payloads, or provider response data.

The result uses schema version 1 and has three top-level fields:

  • "schema_version" - the integer result schema version
  • "status" - "ok", "warning", or "error"
  • "checks" - ordered diagnostic checks with stable common fields

Warning-only results are successful. An error result should produce a non-zero exit status when used from a command-line tool.

Summary

Functions

Returns 0 for ok and warning results and 1 for error results.

Runs safe ReqLLM diagnostics.

Types

check()

@type check() :: %{required(String.t()) => String.t() | map() | nil}

result()

@type result() :: %{required(String.t()) => pos_integer() | status() | [check()]}

status()

@type status() :: String.t()

Functions

exit_status(arg1)

@spec exit_status(result()) :: 0 | 1

Returns 0 for ok and warning results and 1 for error results.

run(opts \\ [])

@spec run(keyword()) :: result()

Runs safe ReqLLM diagnostics.

Options

  • :model - optional model input to resolve and inspect
  • :provider - optional provider atom or provider-name string to require
  • :operation - :chat or :object; defaults to :chat when a model is supplied
  • :start_application? - explicitly allow ReqLLM startup; defaults to false

When ReqLLM is not already running, the default returns warnings for runtime-only checks instead of starting applications or changing runtime configuration.