MCPcopy Create free account
hub / github.com/Noumena-Network/code / addToTotalCostState

Function addToTotalCostState

src/bootstrap/state.ts:573–580  ·  view source on GitHub ↗
(
  cost: number,
  modelUsage: ModelUsage,
  model: string,
)

Source from the content-addressed store, hash-verified

571}
572
573export function addToTotalCostState(
574 cost: number,
575 modelUsage: ModelUsage,
576 model: string,
577): void {
578 STATE.modelUsage[model] = modelUsage
579 STATE.totalCostUSD += cost
580}
581
582export function getTotalCostUSD(): number {
583 return STATE.totalCostUSD

Callers 1

addToTotalSessionCostFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected