MCPcopy Create free account
hub / github.com/cortexkit/magic-context / addOpenCodeUsage

Function addOpenCodeUsage

packages/plugin/scripts/longmemeval/runner.ts:431–435  ·  view source on GitHub ↗
(questionState: QuestionRunState, usage: TokenUsageStats, actualCostUsd: number, config: RunnerConfig)

Source from the content-addressed store, hash-verified

429}
430
431function addOpenCodeUsage(questionState: QuestionRunState, usage: TokenUsageStats, actualCostUsd: number, config: RunnerConfig): void {
432 questionState.openCodeUsage = addTokenUsage(questionState.openCodeUsage, usage);
433 questionState.openCodeActualCostUsd += actualCostUsd;
434 questionState.openCodeEstimatedCostUsd += estimateCostFromPricing(usage, config.openCodePricing);
435}
436
437function addJudgeUsage(questionState: QuestionRunState, usage: TokenUsageStats, estimatedCostUsd: number): void {
438 questionState.judgeUsage = addTokenUsage(questionState.judgeUsage, usage);

Callers 3

sendBannerIfNeededFunction · 0.85
replayHaystackFunction · 0.85
askFinalQuestionFunction · 0.85

Calls 2

addTokenUsageFunction · 0.90
estimateCostFromPricingFunction · 0.90

Tested by

no test coverage detected