claudish 7.3.0 → 7.4.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.
- package/dist/index.js +342 -23
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -27840,6 +27840,9 @@ class NativeHandler {
|
|
|
27840
27840
|
if (originalHeaders["x-api-key"]) {
|
|
27841
27841
|
headers["x-api-key"] = originalHeaders["x-api-key"];
|
|
27842
27842
|
}
|
|
27843
|
+
if (!originalHeaders["authorization"] && !originalHeaders["x-api-key"] && this.apiKey) {
|
|
27844
|
+
headers["x-api-key"] = this.apiKey;
|
|
27845
|
+
}
|
|
27843
27846
|
if (originalHeaders["anthropic-beta"]) {
|
|
27844
27847
|
const incomingBeta = originalHeaders["anthropic-beta"];
|
|
27845
27848
|
if (advisorSwapped) {
|
|
@@ -33157,7 +33160,7 @@ var init_vision_proxy = __esm(() => {
|
|
|
33157
33160
|
});
|
|
33158
33161
|
|
|
33159
33162
|
// src/version.ts
|
|
33160
|
-
var VERSION = "7.
|
|
33163
|
+
var VERSION = "7.4.0";
|
|
33161
33164
|
|
|
33162
33165
|
// src/telemetry.ts
|
|
33163
33166
|
var exports_telemetry = {};
|
|
@@ -54630,6 +54633,8 @@ var init_probe_live = __esm(() => {
|
|
|
54630
54633
|
|
|
54631
54634
|
// src/providers/probe-runner.ts
|
|
54632
54635
|
function pinProbeModelSpec(link) {
|
|
54636
|
+
if (link.provider === "native-anthropic")
|
|
54637
|
+
return link.modelSpec;
|
|
54633
54638
|
return link.modelSpec.includes("@") ? link.modelSpec : `${link.provider}@${link.modelSpec}`;
|
|
54634
54639
|
}
|
|
54635
54640
|
function probeProviderRoute(proxyUrl, link, timeoutMs) {
|
|
@@ -55322,11 +55327,15 @@ function TabBar({ activeTab }) {
|
|
|
55322
55327
|
fg: C.dim,
|
|
55323
55328
|
children: " "
|
|
55324
55329
|
}, undefined, false, undefined, this),
|
|
55325
|
-
tab("1
|
|
55330
|
+
tab("1 Summary", activeTab === "summary"),
|
|
55331
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55332
|
+
children: " "
|
|
55333
|
+
}, undefined, false, undefined, this),
|
|
55334
|
+
tab("2 Leaderboard", activeTab === "leaderboard"),
|
|
55326
55335
|
/* @__PURE__ */ jsxDEV("span", {
|
|
55327
55336
|
children: " "
|
|
55328
55337
|
}, undefined, false, undefined, this),
|
|
55329
|
-
tab("
|
|
55338
|
+
tab("3 Details", activeTab === "details")
|
|
55330
55339
|
]
|
|
55331
55340
|
}, undefined, true, undefined, this)
|
|
55332
55341
|
}, undefined, false, undefined, this);
|
|
@@ -55731,6 +55740,293 @@ function DetailsView({
|
|
|
55731
55740
|
}, r.model, false, undefined, this))
|
|
55732
55741
|
}, undefined, false, undefined, this);
|
|
55733
55742
|
}
|
|
55743
|
+
function pickRepresentativeLink(result) {
|
|
55744
|
+
for (const link of result.links) {
|
|
55745
|
+
if (link.probe?.state === "live" && link.probe.timing) {
|
|
55746
|
+
return { model: result.model, provider: link.displayName, timing: link.probe.timing };
|
|
55747
|
+
}
|
|
55748
|
+
}
|
|
55749
|
+
return { model: result.model, provider: result.nativeProvider };
|
|
55750
|
+
}
|
|
55751
|
+
function LeaderLiveRow({
|
|
55752
|
+
row,
|
|
55753
|
+
rank,
|
|
55754
|
+
isFastest,
|
|
55755
|
+
rankW,
|
|
55756
|
+
nameW,
|
|
55757
|
+
provW,
|
|
55758
|
+
layout,
|
|
55759
|
+
maxTotalMs,
|
|
55760
|
+
maxTokPerSec
|
|
55761
|
+
}) {
|
|
55762
|
+
const t = row.timing;
|
|
55763
|
+
const barCells = timelineBarCells(t.totalMs, maxTotalMs, layout.barWidth);
|
|
55764
|
+
const stages = splitStageCells(t.ttfbMs, t.ttftMs, t.totalMs, barCells);
|
|
55765
|
+
const trackCells = Math.max(0, layout.barWidth - barCells);
|
|
55766
|
+
const netMs = Math.max(0, t.ttfbMs);
|
|
55767
|
+
const srvMs = Math.max(0, t.ttftMs - t.ttfbMs);
|
|
55768
|
+
const strMs = Math.max(0, t.totalMs - t.ttftMs);
|
|
55769
|
+
const netStr = padStartSafe(breakdownNum(netMs), STAGE_NUM_W);
|
|
55770
|
+
const srvStr = padStartSafe(breakdownNum(srvMs), STAGE_NUM_W);
|
|
55771
|
+
const strStr = padStartSafe(breakdownNum(strMs), STAGE_NUM_W);
|
|
55772
|
+
const tokColor = throughputFg(t.tokensPerSec);
|
|
55773
|
+
const tokCells = layout.tokWidth > 0 ? tokBarCells(t.tokensPerSec, maxTokPerSec, layout.tokWidth) : 0;
|
|
55774
|
+
const tokTrack = Math.max(0, layout.tokWidth - tokCells);
|
|
55775
|
+
const tokValue = padStartSafe(`${Math.round(t.tokensPerSec)} t/s`, TOK_VALUE_COL);
|
|
55776
|
+
const lead = /* @__PURE__ */ jsxDEV(Fragment, {
|
|
55777
|
+
children: [
|
|
55778
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55779
|
+
fg: C.dim,
|
|
55780
|
+
children: " "
|
|
55781
|
+
}, undefined, false, undefined, this),
|
|
55782
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55783
|
+
fg: C.dim,
|
|
55784
|
+
children: padStartSafe(String(rank), rankW)
|
|
55785
|
+
}, undefined, false, undefined, this),
|
|
55786
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55787
|
+
children: " "
|
|
55788
|
+
}, undefined, false, undefined, this),
|
|
55789
|
+
isFastest ? /* @__PURE__ */ jsxDEV("span", {
|
|
55790
|
+
fg: C.brightGreen,
|
|
55791
|
+
children: "\u25CF"
|
|
55792
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV("span", {
|
|
55793
|
+
children: " "
|
|
55794
|
+
}, undefined, false, undefined, this),
|
|
55795
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55796
|
+
children: " "
|
|
55797
|
+
}, undefined, false, undefined, this),
|
|
55798
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55799
|
+
fg: C.fg,
|
|
55800
|
+
attributes: A.bold,
|
|
55801
|
+
children: padEndSafe(row.model, nameW)
|
|
55802
|
+
}, undefined, false, undefined, this),
|
|
55803
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55804
|
+
children: " "
|
|
55805
|
+
}, undefined, false, undefined, this),
|
|
55806
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55807
|
+
fg: C.dim,
|
|
55808
|
+
children: padEndSafe(row.provider, provW)
|
|
55809
|
+
}, undefined, false, undefined, this),
|
|
55810
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55811
|
+
children: " "
|
|
55812
|
+
}, undefined, false, undefined, this)
|
|
55813
|
+
]
|
|
55814
|
+
}, undefined, true, undefined, this);
|
|
55815
|
+
if (layout.barWidth <= 0) {
|
|
55816
|
+
return /* @__PURE__ */ jsxDEV("text", {
|
|
55817
|
+
children: [
|
|
55818
|
+
lead,
|
|
55819
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55820
|
+
fg: C.white,
|
|
55821
|
+
children: padStartSafe(formatLatency(t.totalMs), TOTAL_COL)
|
|
55822
|
+
}, undefined, false, undefined, this)
|
|
55823
|
+
]
|
|
55824
|
+
}, undefined, true, undefined, this);
|
|
55825
|
+
}
|
|
55826
|
+
return /* @__PURE__ */ jsxDEV("text", {
|
|
55827
|
+
children: [
|
|
55828
|
+
lead,
|
|
55829
|
+
stages.network > 0 && /* @__PURE__ */ jsxDEV("span", {
|
|
55830
|
+
bg: STAGE_BG.network,
|
|
55831
|
+
children: " ".repeat(stages.network)
|
|
55832
|
+
}, undefined, false, undefined, this),
|
|
55833
|
+
stages.server > 0 && /* @__PURE__ */ jsxDEV("span", {
|
|
55834
|
+
bg: STAGE_BG.server,
|
|
55835
|
+
children: " ".repeat(stages.server)
|
|
55836
|
+
}, undefined, false, undefined, this),
|
|
55837
|
+
stages.streaming > 0 && /* @__PURE__ */ jsxDEV("span", {
|
|
55838
|
+
bg: STAGE_BG.streaming,
|
|
55839
|
+
children: " ".repeat(stages.streaming)
|
|
55840
|
+
}, undefined, false, undefined, this),
|
|
55841
|
+
trackCells > 0 && /* @__PURE__ */ jsxDEV("span", {
|
|
55842
|
+
fg: C.dim,
|
|
55843
|
+
children: TRACK_CHAR.repeat(trackCells)
|
|
55844
|
+
}, undefined, false, undefined, this),
|
|
55845
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55846
|
+
fg: C.dim,
|
|
55847
|
+
children: " "
|
|
55848
|
+
}, undefined, false, undefined, this),
|
|
55849
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55850
|
+
fg: C.white,
|
|
55851
|
+
children: padStartSafe(formatLatency(t.totalMs), TOTAL_COL)
|
|
55852
|
+
}, undefined, false, undefined, this),
|
|
55853
|
+
layout.showBreakdown && /* @__PURE__ */ jsxDEV(Fragment, {
|
|
55854
|
+
children: [
|
|
55855
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55856
|
+
fg: C.dim,
|
|
55857
|
+
children: " "
|
|
55858
|
+
}, undefined, false, undefined, this),
|
|
55859
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55860
|
+
fg: STAGE_FG.network,
|
|
55861
|
+
children: netStr
|
|
55862
|
+
}, undefined, false, undefined, this),
|
|
55863
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55864
|
+
fg: C.dim,
|
|
55865
|
+
children: " "
|
|
55866
|
+
}, undefined, false, undefined, this),
|
|
55867
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55868
|
+
fg: STAGE_FG.server,
|
|
55869
|
+
children: srvStr
|
|
55870
|
+
}, undefined, false, undefined, this),
|
|
55871
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55872
|
+
fg: C.dim,
|
|
55873
|
+
children: " "
|
|
55874
|
+
}, undefined, false, undefined, this),
|
|
55875
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55876
|
+
fg: STAGE_FG.streaming,
|
|
55877
|
+
children: strStr
|
|
55878
|
+
}, undefined, false, undefined, this)
|
|
55879
|
+
]
|
|
55880
|
+
}, undefined, true, undefined, this),
|
|
55881
|
+
layout.tokWidth > 0 && /* @__PURE__ */ jsxDEV(Fragment, {
|
|
55882
|
+
children: [
|
|
55883
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55884
|
+
fg: C.dim,
|
|
55885
|
+
children: " "
|
|
55886
|
+
}, undefined, false, undefined, this),
|
|
55887
|
+
tokCells > 0 && /* @__PURE__ */ jsxDEV("span", {
|
|
55888
|
+
fg: tokColor,
|
|
55889
|
+
children: BAR_FILL.repeat(tokCells)
|
|
55890
|
+
}, undefined, false, undefined, this),
|
|
55891
|
+
tokTrack > 0 && /* @__PURE__ */ jsxDEV("span", {
|
|
55892
|
+
fg: C.dim,
|
|
55893
|
+
children: TRACK_CHAR.repeat(tokTrack)
|
|
55894
|
+
}, undefined, false, undefined, this),
|
|
55895
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55896
|
+
fg: C.dim,
|
|
55897
|
+
children: " "
|
|
55898
|
+
}, undefined, false, undefined, this)
|
|
55899
|
+
]
|
|
55900
|
+
}, undefined, true, undefined, this),
|
|
55901
|
+
layout.tokWidth === 0 && /* @__PURE__ */ jsxDEV("span", {
|
|
55902
|
+
fg: C.dim,
|
|
55903
|
+
children: " "
|
|
55904
|
+
}, undefined, false, undefined, this),
|
|
55905
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55906
|
+
fg: tokColor,
|
|
55907
|
+
children: tokValue
|
|
55908
|
+
}, undefined, false, undefined, this)
|
|
55909
|
+
]
|
|
55910
|
+
}, undefined, true, undefined, this);
|
|
55911
|
+
}
|
|
55912
|
+
function LeaderboardView({
|
|
55913
|
+
results,
|
|
55914
|
+
layout,
|
|
55915
|
+
maxTotalMs,
|
|
55916
|
+
maxTokPerSec
|
|
55917
|
+
}) {
|
|
55918
|
+
const reps = results.map(pickRepresentativeLink);
|
|
55919
|
+
const live = reps.filter((r) => r.timing).sort((a, b) => a.timing.totalMs - b.timing.totalMs);
|
|
55920
|
+
const unavailable = reps.filter((r) => !r.timing);
|
|
55921
|
+
const nameW = Math.min(28, Math.max(5, ...reps.map((r) => r.model.length)));
|
|
55922
|
+
const provW = Math.min(18, Math.max(8, ...reps.map((r) => r.provider.length)));
|
|
55923
|
+
const rankW = Math.max(1, String(Math.max(1, live.length)).length);
|
|
55924
|
+
const rankHdr = " ".repeat(rankW) + " ";
|
|
55925
|
+
return /* @__PURE__ */ jsxDEV("box", {
|
|
55926
|
+
flexDirection: "column",
|
|
55927
|
+
children: [
|
|
55928
|
+
/* @__PURE__ */ jsxDEV("text", {
|
|
55929
|
+
children: [
|
|
55930
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55931
|
+
fg: C.dim,
|
|
55932
|
+
children: " "
|
|
55933
|
+
}, undefined, false, undefined, this),
|
|
55934
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55935
|
+
fg: C.cyan,
|
|
55936
|
+
attributes: A.bold,
|
|
55937
|
+
children: "Leaderboard"
|
|
55938
|
+
}, undefined, false, undefined, this),
|
|
55939
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55940
|
+
fg: C.dim,
|
|
55941
|
+
children: " \u2014 fastest first"
|
|
55942
|
+
}, undefined, false, undefined, this)
|
|
55943
|
+
]
|
|
55944
|
+
}, undefined, true, undefined, this),
|
|
55945
|
+
/* @__PURE__ */ jsxDEV("text", {
|
|
55946
|
+
children: [
|
|
55947
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55948
|
+
fg: C.dim,
|
|
55949
|
+
children: " " + rankHdr
|
|
55950
|
+
}, undefined, false, undefined, this),
|
|
55951
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55952
|
+
fg: C.dim,
|
|
55953
|
+
children: padEndSafe("MODEL", nameW)
|
|
55954
|
+
}, undefined, false, undefined, this),
|
|
55955
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55956
|
+
fg: C.dim,
|
|
55957
|
+
children: " "
|
|
55958
|
+
}, undefined, false, undefined, this),
|
|
55959
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55960
|
+
fg: C.dim,
|
|
55961
|
+
children: padEndSafe("PROVIDER", provW)
|
|
55962
|
+
}, undefined, false, undefined, this),
|
|
55963
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55964
|
+
fg: C.dim,
|
|
55965
|
+
children: " "
|
|
55966
|
+
}, undefined, false, undefined, this),
|
|
55967
|
+
layout.barWidth > 0 && /* @__PURE__ */ jsxDEV("span", {
|
|
55968
|
+
fg: C.dim,
|
|
55969
|
+
children: padEndSafe("TIMELINE", layout.barWidth)
|
|
55970
|
+
}, undefined, false, undefined, this),
|
|
55971
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55972
|
+
fg: C.dim,
|
|
55973
|
+
children: " "
|
|
55974
|
+
}, undefined, false, undefined, this),
|
|
55975
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
55976
|
+
fg: C.dim,
|
|
55977
|
+
children: padStartSafe("TOTAL", TOTAL_COL)
|
|
55978
|
+
}, undefined, false, undefined, this),
|
|
55979
|
+
layout.showBreakdown && /* @__PURE__ */ jsxDEV("span", {
|
|
55980
|
+
fg: C.dim,
|
|
55981
|
+
children: " " + padEndSafe("net", STAGE_NUM_W) + " " + padEndSafe("srv", STAGE_NUM_W) + " " + padEndSafe("str", STAGE_NUM_W)
|
|
55982
|
+
}, undefined, false, undefined, this),
|
|
55983
|
+
layout.tokWidth > 0 ? /* @__PURE__ */ jsxDEV("span", {
|
|
55984
|
+
fg: C.dim,
|
|
55985
|
+
children: " " + " ".repeat(layout.tokWidth + 1) + padStartSafe("tok/s", TOK_VALUE_COL)
|
|
55986
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV("span", {
|
|
55987
|
+
fg: C.dim,
|
|
55988
|
+
children: " " + padStartSafe("tok/s", TOK_VALUE_COL)
|
|
55989
|
+
}, undefined, false, undefined, this)
|
|
55990
|
+
]
|
|
55991
|
+
}, undefined, true, undefined, this),
|
|
55992
|
+
live.map((row, idx) => /* @__PURE__ */ jsxDEV(LeaderLiveRow, {
|
|
55993
|
+
row,
|
|
55994
|
+
rank: idx + 1,
|
|
55995
|
+
isFastest: idx === 0,
|
|
55996
|
+
rankW,
|
|
55997
|
+
nameW,
|
|
55998
|
+
provW,
|
|
55999
|
+
layout,
|
|
56000
|
+
maxTotalMs,
|
|
56001
|
+
maxTokPerSec
|
|
56002
|
+
}, `lb:${row.model}`, false, undefined, this)),
|
|
56003
|
+
unavailable.map((row) => /* @__PURE__ */ jsxDEV("text", {
|
|
56004
|
+
children: [
|
|
56005
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
56006
|
+
fg: C.dim,
|
|
56007
|
+
children: " " + " ".repeat(rankW) + " "
|
|
56008
|
+
}, undefined, false, undefined, this),
|
|
56009
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
56010
|
+
fg: C.dim,
|
|
56011
|
+
children: padEndSafe(row.model, nameW)
|
|
56012
|
+
}, undefined, false, undefined, this),
|
|
56013
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
56014
|
+
fg: C.dim,
|
|
56015
|
+
children: " "
|
|
56016
|
+
}, undefined, false, undefined, this),
|
|
56017
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
56018
|
+
fg: C.dim,
|
|
56019
|
+
children: padEndSafe(row.provider, provW)
|
|
56020
|
+
}, undefined, false, undefined, this),
|
|
56021
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
56022
|
+
fg: C.dim,
|
|
56023
|
+
children: " \u2014 no live route"
|
|
56024
|
+
}, undefined, false, undefined, this)
|
|
56025
|
+
]
|
|
56026
|
+
}, `lb-na:${row.model}`, true, undefined, this))
|
|
56027
|
+
]
|
|
56028
|
+
}, undefined, true, undefined, this);
|
|
56029
|
+
}
|
|
55734
56030
|
function ProbeApp({
|
|
55735
56031
|
store,
|
|
55736
56032
|
onQuit
|
|
@@ -55747,14 +56043,21 @@ function ProbeApp({
|
|
|
55747
56043
|
return;
|
|
55748
56044
|
}
|
|
55749
56045
|
if (key.name === "tab") {
|
|
55750
|
-
|
|
56046
|
+
const order = ["summary", "leaderboard", "details"];
|
|
56047
|
+
const cur = order.indexOf(store.getState().activeTab);
|
|
56048
|
+
const next = key.shift ? (cur - 1 + order.length) % order.length : (cur + 1) % order.length;
|
|
56049
|
+
store.setActiveTab(order[next]);
|
|
55751
56050
|
return;
|
|
55752
56051
|
}
|
|
55753
56052
|
if (key.name === "1") {
|
|
55754
|
-
store.setActiveTab("
|
|
56053
|
+
store.setActiveTab("summary");
|
|
55755
56054
|
return;
|
|
55756
56055
|
}
|
|
55757
56056
|
if (key.name === "2") {
|
|
56057
|
+
store.setActiveTab("leaderboard");
|
|
56058
|
+
return;
|
|
56059
|
+
}
|
|
56060
|
+
if (key.name === "3") {
|
|
55758
56061
|
store.setActiveTab("details");
|
|
55759
56062
|
return;
|
|
55760
56063
|
}
|
|
@@ -55824,14 +56127,16 @@ function ProbeApp({
|
|
|
55824
56127
|
if (fastestTokPerSec <= 0)
|
|
55825
56128
|
fastestLinkId = null;
|
|
55826
56129
|
const showDetails = isDone && state.activeTab === "details";
|
|
56130
|
+
const showLeaderboard = isDone && state.activeTab === "leaderboard";
|
|
56131
|
+
const showSummary = !showDetails && !showLeaderboard;
|
|
55827
56132
|
const stepsRows = isDone ? 0 : state.steps.length > 0 ? 1 : 0;
|
|
55828
56133
|
const tabBarRows = isDone ? TAB_BAR_ROWS : 0;
|
|
55829
|
-
const legendRows =
|
|
56134
|
+
const legendRows = showSummary ? LEGEND_ROWS : 0;
|
|
55830
56135
|
const listH = Math.max(MIN_LIST_H, termHeight - BANNER_ROWS - stepsRows - tabBarRows - legendRows - SCROLL_HINT_ROWS);
|
|
55831
56136
|
const sbForHint = listScrollRef.current;
|
|
55832
56137
|
const overflow = sbForHint ? sbForHint.content.height > sbForHint.viewport.height : true;
|
|
55833
56138
|
const scrollKeys = "\u2191\u2193 scroll \xB7 PgUp/PgDn page \xB7 g/G top/bottom";
|
|
55834
|
-
const footerHint = isDone ? " " + (overflow ? scrollKeys + " \xB7 " : "") + "Tab/1/2 switch \xB7 q quit" : " " + (overflow ? scrollKeys : "");
|
|
56139
|
+
const footerHint = isDone ? " " + (overflow ? scrollKeys + " \xB7 " : "") + "Tab/1/2/3 switch \xB7 q quit" : " " + (overflow ? scrollKeys : "");
|
|
55835
56140
|
return /* @__PURE__ */ jsxDEV("box", {
|
|
55836
56141
|
flexDirection: "column",
|
|
55837
56142
|
children: [
|
|
@@ -55850,7 +56155,7 @@ function ProbeApp({
|
|
|
55850
56155
|
}, undefined, false, undefined, this),
|
|
55851
56156
|
groups.length > 0 ? /* @__PURE__ */ jsxDEV(Fragment, {
|
|
55852
56157
|
children: [
|
|
55853
|
-
|
|
56158
|
+
showSummary && /* @__PURE__ */ jsxDEV("box", {
|
|
55854
56159
|
flexDirection: "column",
|
|
55855
56160
|
height: LEGEND_ROWS,
|
|
55856
56161
|
children: /* @__PURE__ */ jsxDEV(Legend, {
|
|
@@ -55869,6 +56174,11 @@ function ProbeApp({
|
|
|
55869
56174
|
termWidth,
|
|
55870
56175
|
maxTotalMs,
|
|
55871
56176
|
maxTokPerSec
|
|
56177
|
+
}, undefined, false, undefined, this) : showLeaderboard ? /* @__PURE__ */ jsxDEV(LeaderboardView, {
|
|
56178
|
+
results: state.results,
|
|
56179
|
+
layout,
|
|
56180
|
+
maxTotalMs,
|
|
56181
|
+
maxTokPerSec
|
|
55872
56182
|
}, undefined, false, undefined, this) : groups.map((g, idx) => /* @__PURE__ */ jsxDEV(ModelGroup, {
|
|
55873
56183
|
model: g.model,
|
|
55874
56184
|
links: g.links,
|
|
@@ -56577,18 +56887,6 @@ function renderLeaderboard(results, scales, maxWidth, w) {
|
|
|
56577
56887
|
w(`
|
|
56578
56888
|
`);
|
|
56579
56889
|
}
|
|
56580
|
-
function printLeaderboardScrollback(results, isLiveProbe) {
|
|
56581
|
-
const w = process.stderr.write.bind(process.stderr);
|
|
56582
|
-
const anyTimedLive = results.some((r) => r.directProbe?.state === "live" && r.directProbe.timing !== undefined) || results.some((r) => (r.chain ?? []).some((c) => c.probe?.state === "live" && c.probe.timing !== undefined));
|
|
56583
|
-
if (!isLiveProbe || !anyTimedLive)
|
|
56584
|
-
return;
|
|
56585
|
-
const scales = computeBarScales(results);
|
|
56586
|
-
const termCols = process.stderr.columns ?? process.stdout.columns ?? 100;
|
|
56587
|
-
const maxAllowed = Math.max(MIN_CARD_WIDTH, termCols - 4);
|
|
56588
|
-
w(`
|
|
56589
|
-
`);
|
|
56590
|
-
renderLeaderboard(results, scales, maxAllowed, w);
|
|
56591
|
-
}
|
|
56592
56890
|
function printProbeResults(results, isLiveProbe) {
|
|
56593
56891
|
const w = process.stderr.write.bind(process.stderr);
|
|
56594
56892
|
w(`
|
|
@@ -57414,6 +57712,20 @@ async function probeModelRouting(models, jsonOutput, options = { live: true, tim
|
|
|
57414
57712
|
matchedPattern: undefined
|
|
57415
57713
|
};
|
|
57416
57714
|
}
|
|
57715
|
+
if (parsed.provider === "native-anthropic") {
|
|
57716
|
+
const opusModel = process.env[ENV.CLAUDISH_MODEL_OPUS] || process.env[ENV.ANTHROPIC_DEFAULT_OPUS_MODEL] || "claude-opus-4-1";
|
|
57717
|
+
return {
|
|
57718
|
+
routes: [
|
|
57719
|
+
{
|
|
57720
|
+
provider: "native-anthropic",
|
|
57721
|
+
modelSpec: opusModel,
|
|
57722
|
+
displayName: "Claude Code (Opus)"
|
|
57723
|
+
}
|
|
57724
|
+
],
|
|
57725
|
+
source: "auto-chain",
|
|
57726
|
+
matchedPattern: undefined
|
|
57727
|
+
};
|
|
57728
|
+
}
|
|
57417
57729
|
const routingRules = loadRoutingRules();
|
|
57418
57730
|
const matched = matchRoutingRule(parsed.model, routingRules);
|
|
57419
57731
|
if (matched) {
|
|
@@ -57447,7 +57759,12 @@ async function probeModelRouting(models, jsonOutput, options = { live: true, tim
|
|
|
57447
57759
|
let hasCredentials = false;
|
|
57448
57760
|
let credentialHint;
|
|
57449
57761
|
let provenance;
|
|
57450
|
-
if (
|
|
57762
|
+
if (route2.provider === "native-anthropic") {
|
|
57763
|
+
hasCredentials = !!process.env.ANTHROPIC_API_KEY;
|
|
57764
|
+
if (!hasCredentials) {
|
|
57765
|
+
credentialHint = "ANTHROPIC_API_KEY (required to probe Claude Code)";
|
|
57766
|
+
}
|
|
57767
|
+
} else if (providerDef?.isLocal) {
|
|
57451
57768
|
hasCredentials = isLocalProviderEnabled(route2.provider);
|
|
57452
57769
|
if (!hasCredentials) {
|
|
57453
57770
|
credentialHint = "enable local provider in global config";
|
|
@@ -57479,6 +57796,9 @@ async function probeModelRouting(models, jsonOutput, options = { live: true, tim
|
|
|
57479
57796
|
return { parsed, chain, chainDetails };
|
|
57480
57797
|
}
|
|
57481
57798
|
function buildRoutingExplanation(parsed, chain) {
|
|
57799
|
+
if (parsed.provider === "native-anthropic") {
|
|
57800
|
+
return "native passthrough \xB7 default Claude Code (Opus)";
|
|
57801
|
+
}
|
|
57482
57802
|
if (chain.source === "direct") {
|
|
57483
57803
|
return `explicit \xB7 ${parsed.provider} (direct)`;
|
|
57484
57804
|
}
|
|
@@ -57653,7 +57973,7 @@ async function probeModelRouting(models, jsonOutput, options = { live: true, tim
|
|
|
57653
57973
|
links: [],
|
|
57654
57974
|
phase: "live",
|
|
57655
57975
|
results: [],
|
|
57656
|
-
activeTab: "
|
|
57976
|
+
activeTab: "summary"
|
|
57657
57977
|
};
|
|
57658
57978
|
const tui = await startProbeTui(initialState);
|
|
57659
57979
|
const addStep = (name, status) => {
|
|
@@ -57826,7 +58146,6 @@ async function probeModelRouting(models, jsonOutput, options = { live: true, tim
|
|
|
57826
58146
|
tui.store.setResults(results);
|
|
57827
58147
|
await tui.waitForQuit();
|
|
57828
58148
|
await tui.shutdown();
|
|
57829
|
-
printLeaderboardScrollback(printable, isLiveProbe);
|
|
57830
58149
|
} else {
|
|
57831
58150
|
if (liveProxy) {
|
|
57832
58151
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claudish",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0",
|
|
4
4
|
"description": "Run Claude Code with any model - OpenRouter, Ollama, LM Studio & local models",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"ai"
|
|
60
60
|
],
|
|
61
61
|
"optionalDependencies": {
|
|
62
|
-
"@claudish/magmux-darwin-arm64": "7.
|
|
63
|
-
"@claudish/magmux-darwin-x64": "7.
|
|
64
|
-
"@claudish/magmux-linux-arm64": "7.
|
|
65
|
-
"@claudish/magmux-linux-x64": "7.
|
|
62
|
+
"@claudish/magmux-darwin-arm64": "7.4.0",
|
|
63
|
+
"@claudish/magmux-darwin-x64": "7.4.0",
|
|
64
|
+
"@claudish/magmux-linux-arm64": "7.4.0",
|
|
65
|
+
"@claudish/magmux-linux-x64": "7.4.0"
|
|
66
66
|
},
|
|
67
67
|
"author": "Jack Rudenko <i@madappgang.com>",
|
|
68
68
|
"license": "MIT",
|