Skip to content

LangfuseModelPrice

NexusLabs.Needlr.AgentFramework.Langfuse

LangfuseModelPrice Class

A model price definition registered with Langfuse so it can compute cost for generations whose model it does not price out of the box (for example mock or internal model names). Langfuse derives cost from token usage and these prices when a generation carries no explicit cost.

public sealed record LangfuseModelPrice : System.IEquatable<NexusLabs.Needlr.AgentFramework.Langfuse.LangfuseModelPrice>

Inheritance System.Object 🡒 LangfuseModelPrice

Implements System.IEquatable<LangfuseModelPrice>

Properties

LangfuseModelPrice.InputPrice Property

Gets the price (USD) per input unit, or null.

public System.Nullable<double> InputPrice { get; init; }

Property Value

System.Nullable<System.Double>

LangfuseModelPrice.MatchPattern Property

Gets the regular expression matched against a generation's model name. For an exact match use (?i)^model-name$.

public string MatchPattern { get; init; }

Property Value

System.String

LangfuseModelPrice.ModelName Property

Gets the model definition name.

public string ModelName { get; init; }

Property Value

System.String

LangfuseModelPrice.OutputPrice Property

Gets the price (USD) per output unit, or null.

public System.Nullable<double> OutputPrice { get; init; }

Property Value

System.Nullable<System.Double>

LangfuseModelPrice.TotalPrice Property

Gets the price (USD) per total unit, or null. Cannot be combined with InputPrice / OutputPrice.

public System.Nullable<double> TotalPrice { get; init; }

Property Value

System.Nullable<System.Double>

LangfuseModelPrice.Unit Property

Gets the usage unit. Defaults to TOKENS.

public string Unit { get; init; }

Property Value

System.String