OnlineAPIClient

LLMClient implementation for the Anthropic Messages API with SSE streaming.

Inherits LLMClient
Group libllm

Declared in src/libs/libllm/llm/clients/OnlineAPIClient.hpp.

Detailed description

Sends chat requests to an online LLM API endpoint via HTTP POST and supports both single-response and SSE-streamed token delivery. Handles request lifecycle, error mapping, and token counting for usage tracking.

See also LLMClient, AnthropicModelCatalog.

Member function documentation

setSelfHosted

void OnlineAPIClient::setSelfHosted(bool selfHosted)

Set selfHosted: a self-hosted server can need no key, and it can queue a request, so the header limit is longer (llm-openai-compatible §OCP-D3, §OCP-W6).

In this section