Table of Contents

Method DeriveHistoryBudget

Namespace
Oscova.Agents.Reducers
Assembly
Oscova.Agents.dll

DeriveHistoryBudget(int, int?)

Derives the history token budget from a model's context window, reserving room for model output and for prompt content the reducer never sees (instructions, tools, memory). Unknown window sizes keep the historical default.

public static int DeriveHistoryBudget(int contextWindowSize, int? maxOutputTokens)

Parameters

contextWindowSize int
maxOutputTokens int?

Returns

int