We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cbc764f commit 5fb6a8fCopy full SHA for 5fb6a8f
1 file changed
packages/agents-runtime/src/pi-adapter.ts
@@ -318,10 +318,6 @@ export function createPiAgentAdapter(
318
// per step; the UI derives "messages" as the real total minus these.
319
const tokenBreakdown = {
320
system: approxTokens(opts.systemPrompt),
321
- // Serialize first: approxTokens' array branch charges a flat ~64 per
322
- // non-text block, so the raw AgentTool[] would estimate ~64×toolCount
323
- // regardless of real schema size. JSON.stringify captures each tool's
324
- // name + description + parameter schema, which is what fills the prompt.
325
tools: approxTokens(JSON.stringify(opts.tools)),
326
}
327
0 commit comments