Maniac Docs
Inference

Inference

Model interface, provider adapters, streaming, reasoning configuration, and resilience wrappers.

Inference is the boundary between the agent runner and LLM providers. Every adapter implements the Model interface (infer + stream) and translates the SDK's normalized InferenceRequest / InferenceResponse shapes to provider wire formats.

Topics

Request flow

flowchart LR
  Runner["Agent runner"] --> Req["InferenceRequest"]
  Req --> Adapter["Model adapter"]
  Adapter --> API["Provider API"]
  API --> Res["InferenceResponse / StreamChunk"]
  Res --> Runner

The runner builds InferenceRequest from conversation messages, tool definitions, optional reasoning, and max_tokens. Adapters handle provider-specific serialization; the runner never speaks raw HTTP.

On this page