Skip to content

ILangfuseModelClient

NexusLabs.Needlr.AgentFramework.Langfuse

ILangfuseModelClient Interface

Registers model price definitions with Langfuse so it can compute cost for generations whose model it does not price by default.

public interface ILangfuseModelClient

Properties

ILangfuseModelClient.IsEnabled Property

Gets a value indicating whether model registration is performed. false when Langfuse is not configured, in which case EnsureModelPriceAsync(LangfuseModelPrice, CancellationToken) is a no-op.

bool IsEnabled { get; }

Property Value

System.Boolean

Methods

ILangfuseModelClient.EnsureModelPriceAsync(LangfuseModelPrice, CancellationToken) Method

Ensures a model definition with the given ModelName exists, creating it only when absent. Safe to call on every run.

System.Threading.Tasks.Task EnsureModelPriceAsync(NexusLabs.Needlr.AgentFramework.Langfuse.LangfuseModelPrice price, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

price LangfuseModelPrice

The model price to ensure.

cancellationToken System.Threading.CancellationToken

A cancellation token.

Returns

System.Threading.Tasks.Task
A task that completes when the model definition exists in Langfuse.