free-coding-models 0.1.83 → 0.1.85
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/README.md +13 -24
- package/bin/free-coding-models.js +511 -4883
- package/package.json +2 -2
- package/src/analysis.js +197 -0
- package/{lib → src}/config.js +1 -1
- package/src/constants.js +118 -0
- package/src/favorites.js +98 -0
- package/src/key-handler.js +1011 -0
- package/src/openclaw.js +131 -0
- package/src/opencode.js +952 -0
- package/src/overlays.js +839 -0
- package/src/ping.js +186 -0
- package/src/provider-metadata.js +218 -0
- package/src/quota-capabilities.js +112 -0
- package/src/render-helpers.js +239 -0
- package/src/render-table.js +591 -0
- package/src/setup.js +105 -0
- package/src/telemetry.js +382 -0
- package/src/tier-colors.js +37 -0
- package/{lib → src}/token-stats.js +71 -3
- package/src/token-usage-reader.js +63 -0
- package/src/updater.js +237 -0
- package/{lib → src}/usage-reader.js +63 -21
- package/{lib → src}/utils.js +31 -26
- package/lib/quota-capabilities.js +0 -79
- /package/{lib → src}/account-manager.js +0 -0
- /package/{lib → src}/error-classifier.js +0 -0
- /package/{lib → src}/log-reader.js +0 -0
- /package/{lib → src}/model-merger.js +0 -0
- /package/{lib → src}/opencode-sync.js +0 -0
- /package/{lib → src}/provider-quota-fetchers.js +0 -0
- /package/{lib → src}/proxy-server.js +0 -0
- /package/{lib → src}/request-transformer.js +0 -0
package/README.md
CHANGED
|
@@ -72,11 +72,11 @@
|
|
|
72
72
|
- **🚀 Parallel pings** — All models tested simultaneously via native `fetch`
|
|
73
73
|
- **📊 Real-time animation** — Watch latency appear live in alternate screen buffer
|
|
74
74
|
- **🏆 Smart ranking** — Top 3 fastest models highlighted with medals 🥇🥈🥉
|
|
75
|
-
- **⏱
|
|
75
|
+
- **⏱ Adaptive monitoring** — Starts in a fast 2s cadence for 60s, settles to 10s, slows to 30s after 5 minutes idle, and supports a forced 4s mode
|
|
76
76
|
- **📈 Rolling averages** — Avg calculated from ALL successful pings since start
|
|
77
77
|
- **📊 Uptime tracking** — Percentage of successful pings shown in real-time
|
|
78
78
|
- **📐 Stability score** — Composite 0–100 score measuring consistency (p95, jitter, spikes, uptime)
|
|
79
|
-
- **📊 Usage tracking** — Monitor remaining quota
|
|
79
|
+
- **📊 Usage tracking** — Monitor remaining quota for each exact provider/model pair when the provider exposes it; otherwise the TUI shows a green dot instead of a misleading percentage.
|
|
80
80
|
- **📜 Live Log Viewer** — Press `X` to view real-time activity and error logs in a focused TUI overlay.
|
|
81
81
|
- **🛠 MODEL_NOT_FOUND Rotation** — If a specific provider returns a 404 for a model, the TUI intelligently rotates through other available providers for the same model.
|
|
82
82
|
- **🔄 Auto-retry** — Timeout models keep getting retried, nothing is ever "given up on"
|
|
@@ -200,7 +200,7 @@ Use `↑↓` arrows to select, `Enter` to confirm. Then the TUI launches with yo
|
|
|
200
200
|
|
|
201
201
|
**How it works:**
|
|
202
202
|
1. **Ping phase** — All enabled models are pinged in parallel (up to 150 across 20 providers)
|
|
203
|
-
2. **Continuous monitoring** — Models
|
|
203
|
+
2. **Continuous monitoring** — Models start at 2s re-pings for 60s, then fall back to 10s automatically
|
|
204
204
|
3. **Real-time updates** — Watch "Latest", "Avg", and "Up%" columns update live
|
|
205
205
|
4. **Select anytime** — Use ↑↓ arrows to navigate, press Enter on a model to act
|
|
206
206
|
5. **Smart detection** — Automatically detects if NVIDIA NIM is configured in OpenCode or OpenClaw
|
|
@@ -441,17 +441,6 @@ free-coding-models --tier B # Only B+, B (lightweight options)
|
|
|
441
441
|
free-coding-models --tier C # Only C (edge/minimal models)
|
|
442
442
|
```
|
|
443
443
|
|
|
444
|
-
#### Dynamic tier filtering with E/D keys
|
|
445
|
-
|
|
446
|
-
During runtime, use **E** and **D** keys to dynamically adjust the tier filter:
|
|
447
|
-
|
|
448
|
-
- **E** (Elevate) — Show fewer, higher-tier models (cycle: All → S → A → B → C → All)
|
|
449
|
-
- **D** (Descend) — Show more, lower-tier models (cycle: All → C → B → A → S → All)
|
|
450
|
-
|
|
451
|
-
Current tier filter is shown in the header badge (e.g., `[Tier S]`)
|
|
452
|
-
|
|
453
|
-
---
|
|
454
|
-
|
|
455
444
|
## 📊 TUI Columns
|
|
456
445
|
|
|
457
446
|
The main table displays one row per model with the following columns:
|
|
@@ -463,14 +452,15 @@ The main table displays one row per model with the following columns:
|
|
|
463
452
|
| **SWE%** | `S` | SWE-bench Verified score — industry-standard for coding |
|
|
464
453
|
| **CTX** | `C` | Context window size (e.g. `128k`) |
|
|
465
454
|
| **Model** | `M` | Model display name (favorites show ⭐ prefix) |
|
|
466
|
-
| **
|
|
455
|
+
| **Provider** | `O` | Provider name (NIM, Groq, etc.) — press `D` to cycle provider filter |
|
|
467
456
|
| **Latest Ping** | `L` | Most recent round-trip latency in milliseconds |
|
|
468
457
|
| **Avg Ping** | `A` | Rolling average of ALL successful pings since launch |
|
|
469
458
|
| **Health** | `H` | Current status: UP ✅, NO KEY 🔑, Timeout ⏳, Overloaded 🔥, Not Found 🚫 |
|
|
470
459
|
| **Verdict** | `V` | Health verdict based on avg latency + stability analysis |
|
|
471
460
|
| **Stability** | `B` | Composite 0–100 consistency score (see [Stability Score](#-stability-score)) |
|
|
472
461
|
| **Up%** | `U` | Uptime — percentage of successful pings |
|
|
473
|
-
| **
|
|
462
|
+
| **Used** | — | Total prompt+completion tokens consumed in logs for this exact provider/model pair, shown in `k` or `M` |
|
|
463
|
+
| **Usage** | `G` | Provider-scoped quota remaining when measurable; otherwise a green dot means usage % is not applicable/reliable for that provider |
|
|
474
464
|
|
|
475
465
|
### Verdict values
|
|
476
466
|
|
|
@@ -735,7 +725,7 @@ This script:
|
|
|
735
725
|
│ 1. Enter alternate screen buffer (like vim/htop/less) │
|
|
736
726
|
│ 2. Ping ALL models in parallel │
|
|
737
727
|
│ 3. Display real-time table with Latest/Avg/Stability/Up% │
|
|
738
|
-
│ 4. Re-ping ALL models
|
|
728
|
+
│ 4. Re-ping ALL models at 2s on startup, then 10s steady-state │
|
|
739
729
|
│ 5. Update rolling averages + stability scores per model │
|
|
740
730
|
│ 6. User can navigate with ↑↓ and select with Enter │
|
|
741
731
|
│ 7. On Enter (OpenCode): set model, launch OpenCode │
|
|
@@ -813,7 +803,7 @@ This script:
|
|
|
813
803
|
|
|
814
804
|
**Configuration:**
|
|
815
805
|
- **Ping timeout**: 15 seconds per attempt (slow models get more time)
|
|
816
|
-
- **Ping
|
|
806
|
+
- **Ping cadence**: startup burst at 2 seconds for 60s, then 10 seconds normally, 30 seconds when idle for 5 minutes, or forced 4 seconds via `W`
|
|
817
807
|
- **Monitor mode**: Interface stays open forever, press Ctrl+C to exit
|
|
818
808
|
|
|
819
809
|
**Flags:**
|
|
@@ -836,18 +826,17 @@ This script:
|
|
|
836
826
|
**Keyboard shortcuts (main TUI):**
|
|
837
827
|
- **↑↓** — Navigate models
|
|
838
828
|
- **Enter** — Select model (launches OpenCode or sets OpenClaw default, depending on mode)
|
|
839
|
-
- **R/Y/S/C/M/O/L/A/H/V/B/U/G** — Sort by Rank/Tier/SWE/Ctx/Model/
|
|
829
|
+
- **R/Y/S/C/M/O/L/A/H/V/B/U/G** — Sort by Rank/Tier/SWE/Ctx/Model/Provider/Latest/Avg/Health/Verdict/Stability/Up%/Usage
|
|
840
830
|
- **F** — Toggle favorite on selected model (⭐ in Model column, pinned at top)
|
|
841
831
|
- **T** — Cycle tier filter (All → S+ → S → A+ → A → A- → B+ → B → C → All)
|
|
842
|
-
- **
|
|
832
|
+
- **D** — Cycle provider filter (All → NIM → Groq → ...)
|
|
843
833
|
- **Z** — Cycle mode (OpenCode CLI → OpenCode Desktop → OpenClaw)
|
|
844
|
-
- **X** — **Toggle
|
|
834
|
+
- **X** — **Toggle Token Logs** (view recent request/token usage logs)
|
|
845
835
|
- **P** — Open Settings (manage API keys, toggles, updates, profiles)
|
|
846
836
|
- **Shift+P** — Cycle through saved profiles (switches live TUI settings)
|
|
847
837
|
- **Shift+S** — Save current TUI settings as a named profile (inline prompt)
|
|
848
838
|
- **Q** — Open Smart Recommend overlay (find the best model for your task)
|
|
849
|
-
- **
|
|
850
|
-
- **W / =** — Decrease / Increase ping interval
|
|
839
|
+
- **W** — Cycle ping mode (`FAST` 2s → `NORMAL` 10s → `SLOW` 30s → `FORCED` 4s)
|
|
851
840
|
- **J / I** — Request feature / Report bug
|
|
852
841
|
- **K / Esc** — Show help overlay / Close overlay
|
|
853
842
|
- **Ctrl+C** — Exit
|
|
@@ -873,7 +862,7 @@ Profiles let you save and restore different TUI configurations — useful if you
|
|
|
873
862
|
- Favorites (starred models)
|
|
874
863
|
- Sort column and direction
|
|
875
864
|
- Tier filter
|
|
876
|
-
- Ping
|
|
865
|
+
- Ping mode
|
|
877
866
|
- API keys
|
|
878
867
|
|
|
879
868
|
**Saving a profile:**
|