ModelInfo

data class ModelInfo(val provider: String, val model: String, val displayName: String? = null, val contextLength: Long? = null, val maxOutputTokens: Long? = null)(source)

Represents model information for agent events with a focus on essential data.

This data class provides the core model identification needed for agent events, including key model characteristics that are useful for debugging and monitoring. It serves as a lightweight representation optimized for serialization and backwards compatibility.

Constructors

Link copied to clipboard
constructor(provider: String, model: String, displayName: String? = null, contextLength: Long? = null, maxOutputTokens: Long? = null)

Types

Link copied to clipboard
object Companion

Companion object for the ModelInfo class that provides utility methods and constants related to model information parsing and representation.

Properties

Link copied to clipboard
val contextLength: Long? = null

Maximum number of tokens the model can process

Link copied to clipboard
val displayName: String? = null

Optional human-readable display name for the model

Link copied to clipboard

Backwards compatibility: provides the same string format as legacy model representation Format: "provider:model"

Link copied to clipboard
val maxOutputTokens: Long? = null

Maximum number of tokens the model can generate

Link copied to clipboard

The model identifier (e.g., "gpt-4", "claude-3")

Link copied to clipboard

Model identifier name for display purposes Falls back to "provider/model" if displayName is not provided

Link copied to clipboard

The provider identifier (e.g., "openai", "google", "anthropic")