All Classes and Interfaces

Class
Description
Base class for OpenAI-compatible cloud providers (Groq, Cerebras, OpenRouter, GitHub Models, ...).
Serializes a NaruModelRequest into the Anthropic Messages API wire format:
Parses an Anthropic Messages API response:
The last cache identity this session established, persisted between turns.
Computes the cache identity of a segmented context as a hash chain rather than as a set of independent per-segment hashes.
The caching decision for one request: which segments are a continuation of the previously cached prefix, and where a client-controlled cache marker should go.
Cerebras provider — free-tier, high-speed inference for open models through Cerebras' OpenAI-compatible API.
Colibri provider — talks to a local Colibri OpenAI-compatible server (e.g.
Generic config-driven provider: lets users point NARU at any wire-compatible endpoint (OpenAI-compatible, Anthropic Messages, ...) with zero code.
Serializes a NaruModelRequest into the native Gemini generateContent wire format.
Parses a native Gemini generateContent response.
Gemini provider — talks to Google AI Studio through the OpenAI-compatible router.
GitHub Models provider — free inference for a curated catalog of models using any GitHub Personal Access Token (PAT).
Groq provider — free-tier, ultra-fast inference for open models through Groq's OpenAI-compatible API.
 
Per-session prompt-cache bookkeeping.
Runtime entry point for prompt caching: given a request and a provider's declared support, decide what prefix (if any) can be reused, and remember what was actually sent.
 
Anthropic Messages API wire protocol (POST {base}/v1/messages).
 
 
Native Gemini generateContent protocol.
 
 
 
 
Factory that builds a NaruModelProtocol for a given wire-protocol type (currently openapi and anthropic).
Registry of wire-protocol types available to config-driven providers.
 
 
 
 
Reads Ollama's /api/chat stream.
Ollama provider — talks to a local (or remote) Ollama server via REST.
 
{ "choices" : [ { "finish_reason" : "tool_calls", "index" : 0, "message" : { "role" : "assistant", "tool_calls" : [ { "function" : { "arguments" : "{\"path\":\"core/nut-api\",\"include\":\"*.java\",\"recursive\":true}", "name" : "folder_find" }, "id" : "function-call-11464485064754065774", "type" : "function" } ] } } ], "created" : 1779459950, "id" : "bWcQau20G9n2nsEPs9z20Qw", "model" : "gemini-2.5-flash", "object" : "chat.completion", "usage" : { "completion_tokens" : 28, "prompt_tokens" : 4500, "total_tokens" : 4592 } }
Turns an OpenAI-compatible text/event-stream into chunks and, at the end, into the same NaruResponse the batch parser produces.
OpenRouter provider — one API key gives access to hundreds of models, including a rotating set of :free variants.
Pull-based reader for text/event-stream bodies.
One dispatched server-sent event.
Base for protocols whose stream arrives as text/event-stream.
Reads a successful HTTP response as a sequence of model events and returns the assembled result.