ai-speedometer 2.1.5 → 2.1.6
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/dist/ai-speedometer +16 -12
- package/package.json +1 -1
package/dist/ai-speedometer
CHANGED
|
@@ -1762,7 +1762,8 @@ async function benchmarkSingleModelRest(model) {
|
|
|
1762
1762
|
messages: [{ role: "user", content: TEST_PROMPT }],
|
|
1763
1763
|
max_tokens: 500,
|
|
1764
1764
|
temperature: 0.7,
|
|
1765
|
-
stream: true
|
|
1765
|
+
stream: true,
|
|
1766
|
+
stream_options: { include_usage: true }
|
|
1766
1767
|
};
|
|
1767
1768
|
if (model.providerType === "google") {
|
|
1768
1769
|
body["contents"] = [{ parts: [{ text: TEST_PROMPT }] }];
|
|
@@ -1770,6 +1771,9 @@ async function benchmarkSingleModelRest(model) {
|
|
|
1770
1771
|
delete body["messages"];
|
|
1771
1772
|
delete body["max_tokens"];
|
|
1772
1773
|
delete body["stream"];
|
|
1774
|
+
delete body["stream_options"];
|
|
1775
|
+
} else if (model.providerType === "anthropic") {
|
|
1776
|
+
delete body["stream_options"];
|
|
1773
1777
|
}
|
|
1774
1778
|
const response = await fetch(url, {
|
|
1775
1779
|
method: "POST",
|
|
@@ -1819,7 +1823,7 @@ async function benchmarkSingleModelRest(model) {
|
|
|
1819
1823
|
if (trimmedLine.startsWith("data: ")) {
|
|
1820
1824
|
const jsonStr = trimmedLine.slice(6);
|
|
1821
1825
|
if (jsonStr === "[DONE]")
|
|
1822
|
-
|
|
1826
|
+
continue;
|
|
1823
1827
|
const chunk = JSON.parse(jsonStr);
|
|
1824
1828
|
const chunkTyped = chunk;
|
|
1825
1829
|
if (chunkTyped.type === "content_block_delta" && chunkTyped.delta?.text) {
|
|
@@ -1860,7 +1864,7 @@ async function benchmarkSingleModelRest(model) {
|
|
|
1860
1864
|
if (trimmedLine.startsWith("data: ")) {
|
|
1861
1865
|
const jsonStr = trimmedLine.slice(6);
|
|
1862
1866
|
if (jsonStr === "[DONE]")
|
|
1863
|
-
|
|
1867
|
+
continue;
|
|
1864
1868
|
const chunk = JSON.parse(jsonStr);
|
|
1865
1869
|
if (chunk.choices?.[0]?.delta?.content)
|
|
1866
1870
|
streamedText += chunk.choices[0].delta.content;
|
|
@@ -2175,7 +2179,7 @@ var package_default;
|
|
|
2175
2179
|
var init_package = __esm(() => {
|
|
2176
2180
|
package_default = {
|
|
2177
2181
|
name: "ai-speedometer",
|
|
2178
|
-
version: "2.1.
|
|
2182
|
+
version: "2.1.6",
|
|
2179
2183
|
description: "A comprehensive CLI tool for benchmarking AI models across multiple providers with parallel execution and professional metrics",
|
|
2180
2184
|
bin: {
|
|
2181
2185
|
"ai-speedometer": "dist/ai-speedometer",
|
|
@@ -2672,15 +2676,15 @@ function ModelSelectScreen() {
|
|
|
2672
2676
|
}
|
|
2673
2677
|
return;
|
|
2674
2678
|
}
|
|
2675
|
-
if (!searchQuery &&
|
|
2679
|
+
if (!searchQuery && key.sequence === "A") {
|
|
2676
2680
|
setSelected(new Set(orderedModels.map((m) => m.key)));
|
|
2677
2681
|
return;
|
|
2678
2682
|
}
|
|
2679
|
-
if (!searchQuery &&
|
|
2683
|
+
if (!searchQuery && key.sequence === "N") {
|
|
2680
2684
|
setSelected(new Set);
|
|
2681
2685
|
return;
|
|
2682
2686
|
}
|
|
2683
|
-
if (!searchQuery && recentCount > 0 &&
|
|
2687
|
+
if (!searchQuery && recentCount > 0 && key.sequence === "R") {
|
|
2684
2688
|
launchBench(orderedModels.slice(0, recentCount));
|
|
2685
2689
|
return;
|
|
2686
2690
|
}
|
|
@@ -5028,23 +5032,23 @@ function getHints(screen, benchResults) {
|
|
|
5028
5032
|
case "main-menu":
|
|
5029
5033
|
return ["[\u2191\u2193] navigate", "[Enter] select", "[Ctrl+C] quit"];
|
|
5030
5034
|
case "model-menu":
|
|
5031
|
-
return ["[\u2191\u2193] navigate", "[Enter] select", "[
|
|
5035
|
+
return ["[\u2191\u2193] navigate", "[Enter] select", "[Q] back"];
|
|
5032
5036
|
case "model-select":
|
|
5033
5037
|
return ["[\u2191\u2193] navigate", "[Tab] select", "[Enter] run", "[A] all", "[N] none", "[R] recent", "[Esc] back"];
|
|
5034
5038
|
case "benchmark": {
|
|
5035
5039
|
const allDone = benchResults.length > 0 && benchResults.every((r) => r.status === "done" || r.status === "error");
|
|
5036
|
-
return allDone ? ["[Enter] back to menu", "[
|
|
5040
|
+
return allDone ? ["[Enter] back to menu", "[Q] back to menu"] : ["Benchmark in progress..."];
|
|
5037
5041
|
}
|
|
5038
5042
|
case "list-providers":
|
|
5039
|
-
return ["[\u2191\u2193] scroll", "[
|
|
5043
|
+
return ["[\u2191\u2193] scroll", "[Q] back"];
|
|
5040
5044
|
case "add-verified":
|
|
5041
|
-
return ["[\u2191\u2193] navigate", "[Enter] select", "[
|
|
5045
|
+
return ["[\u2191\u2193] navigate", "[Enter] select", "[Q] back"];
|
|
5042
5046
|
case "add-custom":
|
|
5043
5047
|
return ["[\u2191\u2193] navigate", "[Enter] confirm", "[Esc] back"];
|
|
5044
5048
|
case "add-models":
|
|
5045
5049
|
return ["[\u2191\u2193] navigate", "[Enter] add / finish", "[Esc] back"];
|
|
5046
5050
|
default:
|
|
5047
|
-
return ["[
|
|
5051
|
+
return ["[Q] back"];
|
|
5048
5052
|
}
|
|
5049
5053
|
}
|
|
5050
5054
|
function ActiveScreen() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-speedometer",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.6",
|
|
4
4
|
"description": "A comprehensive CLI tool for benchmarking AI models across multiple providers with parallel execution and professional metrics",
|
|
5
5
|
"bin": {
|
|
6
6
|
"ai-speedometer": "dist/ai-speedometer",
|