(credits: number)
| 261 | let stepCreditsUsed = 0 |
| 262 | |
| 263 | const onCostCalculated = async (credits: number) => { |
| 264 | stepCreditsUsed += credits |
| 265 | agentState.creditsUsed += credits |
| 266 | agentState.directCreditsUsed += credits |
| 267 | } |
| 268 | |
| 269 | const iterationNum = agentState.messageHistory.length |
| 270 | const systemTokens = countTokensJson(system) |