@outputai/cli 0.12.1-next.806ba4c.0 → 0.12.1-next.9d5725d.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -41,7 +41,7 @@ function llmCostNode(id, model, items, status = 'precise') {
|
|
|
41
41
|
const totalOf = (group) => items.filter(item => item.group === group).reduce((sum, item) => sum + (item.total ?? 0), 0);
|
|
42
42
|
const input = totalOf('input');
|
|
43
43
|
const output = totalOf('output');
|
|
44
|
-
const
|
|
44
|
+
const tools = totalOf('tools');
|
|
45
45
|
return {
|
|
46
46
|
id,
|
|
47
47
|
kind: 'llm',
|
|
@@ -53,8 +53,8 @@ function llmCostNode(id, model, items, status = 'precise') {
|
|
|
53
53
|
modelId: model,
|
|
54
54
|
input,
|
|
55
55
|
output,
|
|
56
|
-
|
|
57
|
-
total: input + output +
|
|
56
|
+
tools,
|
|
57
|
+
total: input + output + tools,
|
|
58
58
|
status,
|
|
59
59
|
items
|
|
60
60
|
}
|
|
@@ -282,11 +282,11 @@ describe('findLLMCalls', () => {
|
|
|
282
282
|
]);
|
|
283
283
|
expect(calls[0].originalCost).toBeCloseTo(0.001965, 8);
|
|
284
284
|
});
|
|
285
|
-
it('reads a priced grounding
|
|
285
|
+
it('reads a priced grounding tools item without counting it as tokens', () => {
|
|
286
286
|
const items = [
|
|
287
287
|
{ group: 'input', label: 'no_cache', amount: 1032, ppm: 0.3, total: 0.0003096, status: 'ok' },
|
|
288
288
|
{ group: 'output', label: 'text', amount: 793, ppm: 2.5, total: 0.0019825, status: 'ok' },
|
|
289
|
-
{ group: '
|
|
289
|
+
{ group: 'tools', label: 'grounding_prompt', amount: 1, ppm: 35_000, total: 0.035, status: 'ok' }
|
|
290
290
|
];
|
|
291
291
|
const calls = findLLMCalls({
|
|
292
292
|
kind: 'workflow',
|
|
@@ -301,8 +301,8 @@ describe('findLLMCalls', () => {
|
|
|
301
301
|
outputTokens: 793,
|
|
302
302
|
reasoningTokens: 0
|
|
303
303
|
});
|
|
304
|
-
expect(calls[0].lines.find(l => l.type === '
|
|
305
|
-
type: '
|
|
304
|
+
expect(calls[0].lines.find(l => l.type === 'tools_grounding_prompt')).toEqual({
|
|
305
|
+
type: 'tools_grounding_prompt',
|
|
306
306
|
ppm: 35_000,
|
|
307
307
|
amount: 1,
|
|
308
308
|
total: 0.035
|
|
@@ -312,7 +312,7 @@ describe('findLLMCalls', () => {
|
|
|
312
312
|
const items = [
|
|
313
313
|
{ group: 'input', label: 'no_cache', amount: 1032, ppm: 0.3, total: 0.0003096, status: 'ok' },
|
|
314
314
|
{ group: 'output', label: 'text', amount: 793, ppm: 2.5, total: 0.0019825, status: 'ok' },
|
|
315
|
-
{ group: '
|
|
315
|
+
{ group: 'tools', label: 'grounding_prompt', amount: 1, ppm: 35_000, total: 0.035, status: 'ok' }
|
|
316
316
|
];
|
|
317
317
|
const config = {
|
|
318
318
|
models: { 'gemini-2.5-flash': { provider: 'google-vertex', input: 0.3, output: 2.5 } },
|
|
@@ -326,7 +326,7 @@ describe('findLLMCalls', () => {
|
|
|
326
326
|
const items = [
|
|
327
327
|
{ group: 'input', label: 'no_cache', amount: 1000, ppm: 1, total: 0.001, status: 'ok' },
|
|
328
328
|
{ group: 'output', label: null, amount: 500, ppm: 5, total: 0.0025, status: 'ok' },
|
|
329
|
-
{ group: '
|
|
329
|
+
{ group: 'tools', label: 'grounding', amount: 3, ppm: null, total: null, status: 'missing' }
|
|
330
330
|
];
|
|
331
331
|
const calls = findLLMCalls({
|
|
332
332
|
kind: 'workflow',
|
|
@@ -334,8 +334,8 @@ describe('findLLMCalls', () => {
|
|
|
334
334
|
});
|
|
335
335
|
expect(calls[0].incomplete).toBe(true);
|
|
336
336
|
// The unrated line still shows up (as $0), but the call carries the signal.
|
|
337
|
-
expect(calls[0].lines.find(l => l.type === '
|
|
338
|
-
type: '
|
|
337
|
+
expect(calls[0].lines.find(l => l.type === 'tools_grounding')).toEqual({
|
|
338
|
+
type: 'tools_grounding',
|
|
339
339
|
ppm: 0,
|
|
340
340
|
amount: 3,
|
|
341
341
|
total: 0
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outputai/cli",
|
|
3
|
-
"version": "0.12.1-next.
|
|
3
|
+
"version": "0.12.1-next.9d5725d.0",
|
|
4
4
|
"description": "CLI for Output.ai workflow generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"react": "19.2.5",
|
|
37
37
|
"semver": "7.7.4",
|
|
38
38
|
"undici": "8.9.0",
|
|
39
|
-
"@outputai/credentials": "0.12.1-next.
|
|
40
|
-
"@outputai/
|
|
41
|
-
"@outputai/
|
|
39
|
+
"@outputai/credentials": "0.12.1-next.9d5725d.0",
|
|
40
|
+
"@outputai/evals": "0.12.1-next.9d5725d.0",
|
|
41
|
+
"@outputai/llm": "0.12.1-next.9d5725d.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/cli-progress": "3.11.6",
|