Interface ILlmProvider

Assembly: redb.Route.Llm.dll

Pure transport abstraction over an LLM API. Implementations are responsible
for protocol-level work only: serialise , call the
provider's HTTP/SDK, deserialise .

Tool dispatch, conversation persistence, budget enforcement and shadow-mode
belong to , not here.

public interface ILlmProvider

Properties

ModelId

Model identifier this provider was configured with.

string ModelId { get; }

ProviderId

Provider identifier ("anthropic", "openai", "stub", ...).

string ProviderId { get; }

Methods

CompleteAsync(LlmRequest, CancellationToken)

Performs a single non-streaming completion call.

Task<LlmResponse> CompleteAsync(LlmRequest request, CancellationToken ct = default)

StreamAsync(LlmRequest, CancellationToken)

Performs a streaming completion. Yields the pieces as they arrive (visible text as

IAsyncEnumerable<LlmStreamChunk> StreamAsync(LlmRequest request, CancellationToken ct = default)