Class MessageProps

Assembly: redb.Route.Llm.dll

A single message node within a conversation tree. Persisted as a
TreeRedbObject<MessageProps> with the conversation root (or
another ) as parent — branching is native: any
regenerate / parallel-tool / what-if path attaches as another child of the
same parent.

Identifier lives in value_string (per-message GUID; partial index on
PostgreSQL/SQLite, no index on MSSQL) and the conversation FK lives in
value_long (pointing at the root's _objects.id; indexed on
every provider) — both on the _objects row, so transcript queries
never scan _values. Parent is tracked natively via the tree's
parent_id; no duplicate fields here.

Content blocks (text / tool-use / tool-result) are stored as a typed
nested array () — REDB persists them natively, no
JSON-string marshalling.

[RedbScheme("LLM Conversation Message")]
public class MessageProps

Inheritance

Object→MessageProps

Properties

ApiKeyFingerprint

Stable, non-secret fingerprint of the API key used for this call —

public string? ApiKeyFingerprint { get; set; }

AuditTags

Free-form audit tags for this row. Stored as a native REDB

public Dictionary<string, string>? AuditTags { get; set; }

BaseUrl

Effective base URL the request was sent to, as configured on

public string? BaseUrl { get; set; }

CacheCreationInputTokens

Prompt tokens written to the provider's cache by this turn, billed at a premium over normal input

public int CacheCreationInputTokens { get; set; }

CacheReadInputTokens

Prompt tokens this turn read back from the provider's cache, billed at a fraction of normal input

public int CacheReadInputTokens { get; set; }

Content

Content blocks for this message, stored as a typed nested array. Each

public MessageContentBlock[] Content { get; set; }

CreatedAtUtc

When the message was appended.

public DateTimeOffset CreatedAtUtc { get; set; }

FactoryName

Connection-factory alias used for this call (e.g. "haiku",

public string? FactoryName { get; set; }

InputTokens

Input tokens attributed to this turn (0 for non-assistant messages).

public int InputTokens { get; set; }

Iteration

Agent iteration that produced the message (0 = user prompt).

public int Iteration { get; set; }

LatencyMs

Wall-clock time (milliseconds) the provider spent producing this

public long? LatencyMs { get; set; }

MaxTokens

Effective max-output-tokens cap; null on non-assistant rows.

public int? MaxTokens { get; set; }

ModelId

Model id as resolved at call time.

public string? ModelId { get; set; }

OutputTokens

Output tokens attributed to this turn.

public int OutputTokens { get; set; }

PromptTemplateName

Prompt-template name resolved at call time. Pairs with

public string? PromptTemplateName { get; set; }

PromptTemplateVersion

Prompt-template version (paired with ).

public string? PromptTemplateVersion { get; set; }

ProviderId

Provider id ("openai" / "anthropic" / ...); null for non-provider messages.

public string? ProviderId { get; set; }

ProviderResponseId

Provider-issued response identifier surfaced by the backend (top-level

public string? ProviderResponseId { get; set; }

ProviderSystemFingerprint

Opaque provider-side fingerprint identifying the exact backend

public string? ProviderSystemFingerprint { get; set; }

RetryCount

How many times the route framework retried the inbound exchange before

public int? RetryCount { get; set; }

Role

Role: "user" / "assistant" / "system" / "tool".

public string Role { get; set; }

StopReason

Stop reason string for assistant messages; null otherwise.

public string? StopReason { get; set; }

Temperature

Effective sampling temperature passed to the provider for the call that

public double? Temperature { get; set; }

ToolSetHash

Stable hash of the tool-capabilities set exposed to the model on this

public string? ToolSetHash { get; set; }

ToolUseId

Tool-use id when this message is a tool result; null otherwise.

public string? ToolUseId { get; set; }

TopP

Effective top-p value; null on non-assistant rows.

public double? TopP { get; set; }

UserId

Stable identifier of the principal that initiated the call (end-user,

public string? UserId { get; set; }