free-coding-models 0.1.31 β 0.1.32
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/bin/free-coding-models.js +10 -11
- package/lib/utils.js +22 -22
- package/package.json +1 -1
|
@@ -425,7 +425,7 @@ function renderTable(results, pendingPings, frame, cursor = null, sortColumn = '
|
|
|
425
425
|
const sweH = sortColumn === 'swe' ? dir + ' SWE%' : 'SWE%'
|
|
426
426
|
const pingH = sortColumn === 'ping' ? dir + ' Latest Ping' : 'Latest Ping'
|
|
427
427
|
const avgH = sortColumn === 'avg' ? dir + ' Avg Ping' : 'Avg Ping'
|
|
428
|
-
const
|
|
428
|
+
const conditionH = sortColumn === 'condition' ? dir + ' Condition' : 'Condition'
|
|
429
429
|
const verdictH = sortColumn === 'verdict' ? dir + ' Verdict' : 'Verdict'
|
|
430
430
|
const uptimeH = sortColumn === 'uptime' ? dir + ' Up%' : 'Up%'
|
|
431
431
|
|
|
@@ -441,15 +441,15 @@ function renderTable(results, pendingPings, frame, cursor = null, sortColumn = '
|
|
|
441
441
|
const tierH_c = colorFirst('Tier', W_TIER)
|
|
442
442
|
const originH_c = sortColumn === 'origin' ? chalk.bold.cyan(originH.padEnd(W_SOURCE)) : colorFirst(originH, W_SOURCE)
|
|
443
443
|
const modelH_c = colorFirst(modelH, W_MODEL)
|
|
444
|
-
const sweH_c = sortColumn === 'swe' ? chalk.bold.cyan(sweH.padEnd(W_SWE)) : colorFirst(
|
|
445
|
-
const pingH_c = sortColumn === 'ping' ? chalk.bold.cyan(pingH.padEnd(W_PING)) : colorFirst(
|
|
446
|
-
const avgH_c = sortColumn === 'avg' ? chalk.bold.cyan(avgH.padEnd(W_AVG)) : colorFirst(
|
|
447
|
-
const
|
|
444
|
+
const sweH_c = sortColumn === 'swe' ? chalk.bold.cyan(sweH.padEnd(W_SWE)) : colorFirst('SWE%', W_SWE)
|
|
445
|
+
const pingH_c = sortColumn === 'ping' ? chalk.bold.cyan(pingH.padEnd(W_PING)) : colorFirst('Latest Ping', W_PING)
|
|
446
|
+
const avgH_c = sortColumn === 'avg' ? chalk.bold.cyan(avgH.padEnd(W_AVG)) : colorFirst('Avg Ping', W_AVG)
|
|
447
|
+
const conditionH_c = sortColumn === 'condition' ? chalk.bold.cyan(conditionH.padEnd(W_STATUS)) : colorFirst('Condition', W_STATUS)
|
|
448
448
|
const verdictH_c = sortColumn === 'verdict' ? chalk.bold.cyan(verdictH.padEnd(W_VERDICT)) : colorFirst(verdictH, W_VERDICT)
|
|
449
449
|
const uptimeH_c = sortColumn === 'uptime' ? chalk.bold.cyan(uptimeH.padStart(W_UPTIME)) : colorFirst(uptimeH, W_UPTIME, chalk.green)
|
|
450
450
|
|
|
451
451
|
// π Header with proper spacing
|
|
452
|
-
lines.push(' ' + rankH_c + ' ' + tierH_c + ' ' + originH_c + ' ' + modelH_c + ' ' + sweH_c + ' ' + pingH_c + ' ' + avgH_c + ' ' +
|
|
452
|
+
lines.push(' ' + rankH_c + ' ' + tierH_c + ' ' + originH_c + ' ' + modelH_c + ' ' + sweH_c + ' ' + pingH_c + ' ' + avgH_c + ' ' + conditionH_c + ' ' + verdictH_c + ' ' + uptimeH_c)
|
|
453
453
|
|
|
454
454
|
// π Separator line
|
|
455
455
|
lines.push(
|
|
@@ -618,9 +618,9 @@ function renderTable(results, pendingPings, frame, cursor = null, sortColumn = '
|
|
|
618
618
|
: mode === 'opencode-desktop'
|
|
619
619
|
? chalk.rgb(0, 200, 255)('EnterβOpenDesktop')
|
|
620
620
|
: chalk.rgb(0, 200, 255)('EnterβOpenCode')
|
|
621
|
-
lines.push(chalk.dim(` ββ Navigate β’ `) + actionHint + chalk.dim(` β’ R/T/O/M/L/A/S/V/U
|
|
621
|
+
lines.push(chalk.dim(` ββ Navigate β’ `) + actionHint + chalk.dim(` β’ R/T/O/M/L/A/S/C/V/U Sort β’ Wβ/Xβ Interval (${intervalSec}s) β’ T Tier β’ Z Mode β’ Ctrl+C Exit`))
|
|
622
622
|
lines.push('')
|
|
623
|
-
lines.push(chalk.dim(' Made with ') + 'π' + chalk.dim(' by ') + '\x1b]8;;https://github.com/vava-nessa\x1b\\vava-nessa\x1b]8;;\x1b\\' + chalk.dim(' β’ ') + 'π¬ ' + chalk.cyanBright('\x1b]8;;https://discord.gg/WKA3TwYVuZ\x1b\\Join
|
|
623
|
+
lines.push(chalk.dim(' Made with ') + 'π & β' + chalk.dim(' by ') + '\x1b]8;;https://github.com/vava-nessa\x1b\\vava-nessa\x1b]8;;\x1b\\' + chalk.dim(' β’ ') + 'π¬ ' + chalk.cyanBright('\x1b]8;;https://discord.gg/WKA3TwYVuZ\x1b\\Join Free-Coding-Models Discord!\x1b]8;;\x1b\\') + chalk.dim(' β’ ') + 'β ' + '\x1b]8;;https://github.com/vava-nessa/free-coding-models\x1b\\Read the docs on GitHub\x1b]8;;\x1b\\')
|
|
624
624
|
lines.push('')
|
|
625
625
|
// π Append \x1b[K (erase to EOL) to each line so leftover chars from previous
|
|
626
626
|
// π frames are cleared. Then pad with blank cleared lines to fill the terminal,
|
|
@@ -1191,11 +1191,10 @@ async function main() {
|
|
|
1191
1191
|
const onKeyPress = async (str, key) => {
|
|
1192
1192
|
if (!key) return
|
|
1193
1193
|
|
|
1194
|
-
// π Sorting keys: R=rank, T=tier, O=origin, M=model, L=latest ping, A=avg ping, S=
|
|
1194
|
+
// π Sorting keys: R=rank, T=tier, O=origin, M=model, L=latest ping, A=avg ping, S=SWE-bench, C=condition, V=verdict, U=uptime
|
|
1195
1195
|
const sortKeys = {
|
|
1196
1196
|
'r': 'rank', 't': 'tier', 'o': 'origin', 'm': 'model',
|
|
1197
|
-
'l': 'ping', 'a': 'avg', 's': '
|
|
1198
|
-
'e': 'swe'
|
|
1197
|
+
'l': 'ping', 'a': 'avg', 's': 'swe', 'c': 'condition', 'v': 'verdict', 'u': 'uptime'
|
|
1199
1198
|
}
|
|
1200
1199
|
|
|
1201
1200
|
if (sortKeys[key.name]) {
|
package/lib/utils.js
CHANGED
|
@@ -129,16 +129,16 @@ export const getUptime = (r) => {
|
|
|
129
129
|
// π Returns a NEW array β never mutates the original (important for React-style re-renders).
|
|
130
130
|
//
|
|
131
131
|
// π Supported columns (matching the keyboard shortcuts in the TUI):
|
|
132
|
-
// - 'rank'
|
|
133
|
-
// - 'tier'
|
|
134
|
-
// - 'origin'
|
|
135
|
-
// - 'model'
|
|
136
|
-
// - 'ping'
|
|
137
|
-
// - 'avg'
|
|
138
|
-
// - '
|
|
139
|
-
// - '
|
|
140
|
-
// - '
|
|
141
|
-
// - '
|
|
132
|
+
// - 'rank' (R key) β original index from sources.js
|
|
133
|
+
// - 'tier' (T key) β tier hierarchy (S+ first, C last)
|
|
134
|
+
// - 'origin' (O key) β provider name (all NIM for now, future-proofed)
|
|
135
|
+
// - 'model' (M key) β alphabetical by display label
|
|
136
|
+
// - 'ping' (L key) β last ping latency (only successful ones count)
|
|
137
|
+
// - 'avg' (A key) β average latency across all successful pings
|
|
138
|
+
// - 'swe' (S key) β SWE-bench score (higher is better)
|
|
139
|
+
// - 'condition'(C key) β alphabetical condition string
|
|
140
|
+
// - 'verdict' (V key) β verdict order (Perfect β Pending)
|
|
141
|
+
// - 'uptime' (U key) β uptime percentage
|
|
142
142
|
//
|
|
143
143
|
// π sortDirection 'asc' = ascending (smallest first), 'desc' = descending (largest first)
|
|
144
144
|
export const sortResults = (results, sortColumn, sortDirection) => {
|
|
@@ -173,7 +173,18 @@ export const sortResults = (results, sortColumn, sortDirection) => {
|
|
|
173
173
|
case 'avg':
|
|
174
174
|
cmp = getAvg(a) - getAvg(b)
|
|
175
175
|
break
|
|
176
|
-
case '
|
|
176
|
+
case 'swe': {
|
|
177
|
+
// π Sort by SWE-bench score β higher is better
|
|
178
|
+
// π Parse percentage strings like "49.2%", "73.1%" or use 0 for missing values
|
|
179
|
+
const parseSwe = (score) => {
|
|
180
|
+
if (!score || score === 'β') return 0
|
|
181
|
+
const num = parseFloat(score.replace('%', ''))
|
|
182
|
+
return isNaN(num) ? 0 : num
|
|
183
|
+
}
|
|
184
|
+
cmp = parseSwe(a.sweScore) - parseSwe(b.sweScore)
|
|
185
|
+
break
|
|
186
|
+
}
|
|
187
|
+
case 'condition':
|
|
177
188
|
cmp = a.status.localeCompare(b.status)
|
|
178
189
|
break
|
|
179
190
|
case 'verdict': {
|
|
@@ -186,17 +197,6 @@ export const sortResults = (results, sortColumn, sortDirection) => {
|
|
|
186
197
|
case 'uptime':
|
|
187
198
|
cmp = getUptime(a) - getUptime(b)
|
|
188
199
|
break
|
|
189
|
-
case 'swe': {
|
|
190
|
-
// π Sort by SWE-bench score β higher is better
|
|
191
|
-
// π Parse percentage strings like "49.2%", "73.1%" or use 0 for missing values
|
|
192
|
-
const parseSwe = (score) => {
|
|
193
|
-
if (!score || score === 'β') return 0
|
|
194
|
-
const num = parseFloat(score.replace('%', ''))
|
|
195
|
-
return isNaN(num) ? 0 : num
|
|
196
|
-
}
|
|
197
|
-
cmp = parseSwe(a.sweScore) - parseSwe(b.sweScore)
|
|
198
|
-
break
|
|
199
|
-
}
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
// π Flip comparison for descending order
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "free-coding-models",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.32",
|
|
4
4
|
"description": "Find the fastest coding LLM models in seconds β ping free models from multiple providers, pick the best one for OpenCode, Cursor, or any AI coding assistant.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nvidia",
|