@outputai/cli 0.15.1-next.69acd83.0 → 0.15.1-next.755b932.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.
|
@@ -286,41 +286,41 @@ describe('findLLMCalls', () => {
|
|
|
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: 'tools', label: '
|
|
289
|
+
{ group: 'tools', label: 'grounding_query', amount: 3, ppm: 14_000, total: 0.042, status: 'ok' }
|
|
290
290
|
];
|
|
291
291
|
const calls = findLLMCalls({
|
|
292
292
|
kind: 'workflow',
|
|
293
|
-
children: [llmCostNode('grounded', 'gemini-
|
|
293
|
+
children: [llmCostNode('grounded', 'gemini-3.1-flash-lite', items)]
|
|
294
294
|
});
|
|
295
295
|
expect(calls[0].incomplete).toBe(false);
|
|
296
|
-
expect(calls[0].originalCost).toBeCloseTo(0.
|
|
297
|
-
// Grounding bills per
|
|
296
|
+
expect(calls[0].originalCost).toBeCloseTo(0.0442921, 8);
|
|
297
|
+
// Grounding bills per query, so it must not inflate token usage.
|
|
298
298
|
expect(calls[0].usage).toEqual({
|
|
299
299
|
inputTokens: 1032,
|
|
300
300
|
cachedInputTokens: 0,
|
|
301
301
|
outputTokens: 793,
|
|
302
302
|
reasoningTokens: 0
|
|
303
303
|
});
|
|
304
|
-
expect(calls[0].lines.find(l => l.type === '
|
|
305
|
-
type: '
|
|
306
|
-
ppm:
|
|
307
|
-
amount:
|
|
308
|
-
total: 0.
|
|
304
|
+
expect(calls[0].lines.find(l => l.type === 'tools_grounding_query')).toEqual({
|
|
305
|
+
type: 'tools_grounding_query',
|
|
306
|
+
ppm: 14_000,
|
|
307
|
+
amount: 3,
|
|
308
|
+
total: 0.042
|
|
309
309
|
});
|
|
310
310
|
});
|
|
311
311
|
it('preserves a priced grounding charge as-charged when re-pricing at costs.yml rates', () => {
|
|
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: 'tools', label: '
|
|
315
|
+
{ group: 'tools', label: 'grounding_query', amount: 3, ppm: 14_000, total: 0.042, status: 'ok' }
|
|
316
316
|
];
|
|
317
317
|
const config = {
|
|
318
|
-
models: { 'gemini-
|
|
318
|
+
models: { 'gemini-3.1-flash-lite': { provider: 'google-vertex', input: 0.3, output: 2.5 } },
|
|
319
319
|
services: {}
|
|
320
320
|
};
|
|
321
|
-
const report = calculateCost({ kind: 'workflow', name: 'w', children: [llmCostNode('grounded', 'gemini-
|
|
321
|
+
const report = calculateCost({ kind: 'workflow', name: 'w', children: [llmCostNode('grounded', 'gemini-3.1-flash-lite', items)] }, config);
|
|
322
322
|
// grounding has no costs.yml line rate, so it degrades to its as-charged total, not $0.
|
|
323
|
-
expect(report.llmAdjustedCost).toBeCloseTo(0.
|
|
323
|
+
expect(report.llmAdjustedCost).toBeCloseTo(0.0442921, 8);
|
|
324
324
|
});
|
|
325
325
|
it('flags an unrated grounding charge as incomplete instead of a silent $0', () => {
|
|
326
326
|
const items = [
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outputai/cli",
|
|
3
|
-
"version": "0.15.1-next.
|
|
3
|
+
"version": "0.15.1-next.755b932.0",
|
|
4
4
|
"description": "CLI for Output.ai workflow generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"react": "19.3.0",
|
|
38
38
|
"semver": "7.8.5",
|
|
39
39
|
"undici": "8.10.2",
|
|
40
|
-
"@outputai/core": "0.15.1-next.
|
|
40
|
+
"@outputai/core": "0.15.1-next.755b932.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/cli-progress": "3.11.6",
|