ai-speedometer 1.3.7 → 1.4.1
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.
- package/cli.js +6 -3
- package/dist/ai-speedometer +109 -117
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -1889,7 +1889,7 @@ async function benchmarkSingleModelRest(model) {
|
|
|
1889
1889
|
// Show live TTFT result (only in interactive mode, not headless)
|
|
1890
1890
|
const ttftSeconds = ((firstTokenTime - startTime) / 1000).toFixed(2);
|
|
1891
1891
|
if (!cliArgs.bench && !cliArgs.benchCustom) {
|
|
1892
|
-
console.log(colorText(`TTFT received at ${ttftSeconds}s for ${model.name}`, 'green'));
|
|
1892
|
+
console.log(colorText(`TTFT received at ${ttftSeconds}s for ${model.name} (${model.providerName})`, 'green'));
|
|
1893
1893
|
}
|
|
1894
1894
|
}
|
|
1895
1895
|
|
|
@@ -1967,6 +1967,9 @@ async function benchmarkSingleModelRest(model) {
|
|
|
1967
1967
|
|
|
1968
1968
|
if (chunk.choices?.[0]?.delta?.content) {
|
|
1969
1969
|
streamedText += chunk.choices[0].delta.content;
|
|
1970
|
+
} else if (chunk.choices?.[0]?.delta?.reasoning) {
|
|
1971
|
+
// Handle NanoGPT reasoning tokens
|
|
1972
|
+
streamedText += chunk.choices[0].delta.reasoning;
|
|
1970
1973
|
}
|
|
1971
1974
|
|
|
1972
1975
|
if (chunk.usage?.prompt_tokens) {
|
|
@@ -2270,7 +2273,7 @@ async function runHeadlessBenchmark(benchSpec, apiKey, useAiSdk, cliArgs = null)
|
|
|
2270
2273
|
error: result.error || null
|
|
2271
2274
|
};
|
|
2272
2275
|
|
|
2273
|
-
|
|
2276
|
+
console.log(JSON.stringify(jsonOutput, null, cliArgs?.formatted ? 2 : 0));
|
|
2274
2277
|
process.exit(result.success ? 0 : 1);
|
|
2275
2278
|
}
|
|
2276
2279
|
|
|
@@ -2411,7 +2414,7 @@ async function runHeadlessBenchmark(benchSpec, apiKey, useAiSdk, cliArgs = null)
|
|
|
2411
2414
|
error: result.error || null
|
|
2412
2415
|
};
|
|
2413
2416
|
|
|
2414
|
-
console.log(JSON.stringify(jsonOutput, null, cliArgs
|
|
2417
|
+
console.log(JSON.stringify(jsonOutput, null, cliArgs?.formatted ? 2 : 0));
|
|
2415
2418
|
process.exit(result.success ? 0 : 1);
|
|
2416
2419
|
} catch (error) {
|
|
2417
2420
|
console.error(colorText('Error: ' + error.message, 'red'));
|