(id: string, model: string, total: number)
| 663 | // A → B → C: each level is its own synthetic { type: 'workflow' } root with |
| 664 | // an aggregate cost. Only the leaf agents at the bottom must be billed, once. |
| 665 | const leafAgent = (id: string, model: string, total: number) => ({ |
| 666 | id, |
| 667 | name: 'Agent', |
| 668 | type: 'agent', |
| 669 | model, |
| 670 | cost: { input: total / 3, output: (total * 2) / 3, total }, |
| 671 | tokens: { input: 100, output: 200, total: 300 }, |
| 672 | }) |
| 673 | |
| 674 | const traceSpans = [ |
| 675 | { |
no outgoing calls
no test coverage detected