free-coding-models 0.1.65 → 0.1.67

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 CHANGED
@@ -2,8 +2,8 @@
2
2
  <img src="https://img.shields.io/npm/v/free-coding-models?color=76b900&label=npm&logo=npm" alt="npm version">
3
3
  <img src="https://img.shields.io/node/v/free-coding-models?color=76b900&logo=node.js" alt="node version">
4
4
  <img src="https://img.shields.io/npm/l/free-coding-models?color=76b900" alt="license">
5
- <img src="https://img.shields.io/badge/models-111-76b900?logo=nvidia" alt="models count">
6
- <img src="https://img.shields.io/badge/providers-13-blue" alt="providers count">
5
+ <img src="https://img.shields.io/badge/models-134-76b900?logo=nvidia" alt="models count">
6
+ <img src="https://img.shields.io/badge/providers-17-blue" alt="providers count">
7
7
  </p>
8
8
 
9
9
  <h1 align="center">free-coding-models</h1>
@@ -24,7 +24,7 @@
24
24
 
25
25
  <p align="center">
26
26
  <strong>Find the fastest coding LLM models in seconds</strong><br>
27
- <sub>Ping free coding models from 13 providers in real-time — pick the best one for OpenCode, OpenClaw, or any AI coding assistant</sub>
27
+ <sub>Ping free coding models from 17 providers in real-time — pick the best one for OpenCode, OpenClaw, or any AI coding assistant</sub>
28
28
  </p>
29
29
 
30
30
  <p align="center">
@@ -36,7 +36,9 @@
36
36
  <a href="#-requirements">Requirements</a> •
37
37
  <a href="#-installation">Installation</a> •
38
38
  <a href="#-usage">Usage</a> •
39
- <a href="#-models">Models</a> •
39
+ <a href="#-tui-columns">Columns</a> •
40
+ <a href="#-stability-score">Stability</a> •
41
+ <a href="#-coding-models">Models</a> •
40
42
  <a href="#-opencode-integration">OpenCode</a> •
41
43
  <a href="#-openclaw-integration">OpenClaw</a> •
42
44
  <a href="#-how-it-works">How it works</a>
@@ -47,14 +49,15 @@
47
49
  ## ✨ Features
48
50
 
49
51
  - **🎯 Coding-focused** — Only LLM models optimized for code generation, not chat or vision
50
- - **🌐 Multi-provider** — 111 models from NVIDIA NIM, Groq, Cerebras, SambaNova, OpenRouter, Hugging Face Inference, Replicate, DeepInfra, Fireworks AI, Codestral, Hyperbolic, Scaleway, and Google AI all free to use
52
+ - **🌐 Multi-provider** — 134 models from NVIDIA NIM, Groq, Cerebras, SambaNova, OpenRouter, Hugging Face Inference, Replicate, DeepInfra, Fireworks AI, Codestral, Hyperbolic, Scaleway, Google AI, SiliconFlow, Together AI, Cloudflare Workers AI, and Perplexity API
51
53
  - **⚙️ Settings screen** — Press `P` to manage provider API keys, enable/disable providers, test keys live, and manually check/install updates
52
54
  - **🚀 Parallel pings** — All models tested simultaneously via native `fetch`
53
55
  - **📊 Real-time animation** — Watch latency appear live in alternate screen buffer
54
56
  - **🏆 Smart ranking** — Top 3 fastest models highlighted with medals 🥇🥈🥉
55
- - **⏱ Continuous monitoring** — Pings all models every 2 seconds forever, never stops
57
+ - **⏱ Continuous monitoring** — Pings all models every 3 seconds forever, never stops
56
58
  - **📈 Rolling averages** — Avg calculated from ALL successful pings since start
57
59
  - **📊 Uptime tracking** — Percentage of successful pings shown in real-time
60
+ - **📐 Stability score** — Composite 0–100 score measuring consistency (p95, jitter, spikes, uptime) — a model with 400ms avg and stable responses beats a 250ms avg model that randomly spikes to 6s
58
61
  - **🔄 Auto-retry** — Timeout models keep getting retried, nothing is ever "given up on"
59
62
  - **🎮 Interactive selection** — Navigate with arrow keys directly in the table, press Enter to act
60
63
  - **🔀 Startup mode menu** — Choose between OpenCode and OpenClaw before the TUI launches
@@ -88,10 +91,14 @@ Before using `free-coding-models`, make sure you have:
88
91
  - **Hyperbolic** — [app.hyperbolic.ai/settings](https://app.hyperbolic.ai/settings) → API Keys ($1 free trial)
89
92
  - **Scaleway** — [console.scaleway.com/iam/api-keys](https://console.scaleway.com/iam/api-keys) → IAM → API Keys (1M free tokens)
90
93
  - **Google AI Studio** — [aistudio.google.com/apikey](https://aistudio.google.com/apikey) → Get API key (free Gemma models, 14.4K req/day)
94
+ - **SiliconFlow** — [cloud.siliconflow.cn/account/ak](https://cloud.siliconflow.cn/account/ak) → API Keys (free-model quotas vary by model)
95
+ - **Together AI** — [api.together.ai/settings/api-keys](https://api.together.ai/settings/api-keys) → API Keys (credits/promotions vary)
96
+ - **Cloudflare Workers AI** — [dash.cloudflare.com](https://dash.cloudflare.com) → Create API token + set `CLOUDFLARE_ACCOUNT_ID` (Free: 10k neurons/day)
97
+ - **Perplexity API** — [perplexity.ai/settings/api](https://www.perplexity.ai/settings/api) → API Key (tiered limits by spend)
91
98
  3. **OpenCode** *(optional)* — [Install OpenCode](https://github.com/opencode-ai/opencode) to use the OpenCode integration
92
99
  4. **OpenClaw** *(optional)* — [Install OpenClaw](https://openclaw.ai) to use the OpenClaw integration
93
100
 
94
- > 💡 **Tip:** You don't need all thirteen providers. One key is enough to get started. Add more later via the Settings screen (`P` key). Models without a key still show real latency (`🔑 NO KEY`) so you can evaluate providers before signing up.
101
+ > 💡 **Tip:** You don't need all seventeen providers. One key is enough to get started. Add more later via the Settings screen (`P` key). Models without a key still show real latency (`🔑 NO KEY`) so you can evaluate providers before signing up.
95
102
 
96
103
  ---
97
104
 
@@ -172,13 +179,13 @@ When you run `free-coding-models` without `--opencode` or `--openclaw`, you get
172
179
  Use `↑↓` arrows to select, `Enter` to confirm. Then the TUI launches with your chosen mode shown in the header badge.
173
180
 
174
181
  **How it works:**
175
- 1. **Ping phase** — All enabled models are pinged in parallel (up to 111 across 13 providers)
176
- 2. **Continuous monitoring** — Models are re-pinged every 2 seconds forever
182
+ 1. **Ping phase** — All enabled models are pinged in parallel (up to 134 across 17 providers)
183
+ 2. **Continuous monitoring** — Models are re-pinged every 3 seconds forever
177
184
  3. **Real-time updates** — Watch "Latest", "Avg", and "Up%" columns update live
178
185
  4. **Select anytime** — Use ↑↓ arrows to navigate, press Enter on a model to act
179
186
  5. **Smart detection** — Automatically detects if NVIDIA NIM is configured in OpenCode or OpenClaw
180
187
 
181
- Setup wizard (first run — walks through all 13 providers):
188
+ Setup wizard (first run — walks through all 17 providers):
182
189
 
183
190
  ```
184
191
  🔑 First-time setup — API keys
@@ -208,7 +215,7 @@ Setup wizard (first run — walks through all 13 providers):
208
215
  You can add or change keys anytime with the P key in the TUI.
209
216
  ```
210
217
 
211
- You don't need all thirteen — skip any provider by pressing Enter. At least one key is required.
218
+ You don't need all seventeen — skip any provider by pressing Enter. At least one key is required.
212
219
 
213
220
  ### Adding or changing keys later
214
221
 
@@ -257,6 +264,10 @@ HUGGINGFACE_API_KEY=hf_xxx free-coding-models
257
264
  REPLICATE_API_TOKEN=r8_xxx free-coding-models
258
265
  DEEPINFRA_API_KEY=di_xxx free-coding-models
259
266
  FIREWORKS_API_KEY=fw_xxx free-coding-models
267
+ SILICONFLOW_API_KEY=sk_xxx free-coding-models
268
+ TOGETHER_API_KEY=together_xxx free-coding-models
269
+ CLOUDFLARE_API_TOKEN=cf_xxx CLOUDFLARE_ACCOUNT_ID=your_account_id free-coding-models
270
+ PERPLEXITY_API_KEY=pplx_xxx free-coding-models
260
271
  FREE_CODING_MODELS_TELEMETRY=0 free-coding-models
261
272
  ```
262
273
 
@@ -306,13 +317,46 @@ When enabled, telemetry events include: event name, app version, selected mode,
306
317
  1. Sign up at [fireworks.ai](https://fireworks.ai)
307
318
  2. Open Settings → Access Tokens and create a token
308
319
 
320
+ **Mistral Codestral**:
321
+ 1. Sign up at [codestral.mistral.ai](https://codestral.mistral.ai)
322
+ 2. Go to API Keys → Create
323
+
324
+ **Hyperbolic**:
325
+ 1. Sign up at [app.hyperbolic.ai/settings](https://app.hyperbolic.ai/settings)
326
+ 2. Create an API key in Settings
327
+
328
+ **Scaleway**:
329
+ 1. Sign up at [console.scaleway.com/iam/api-keys](https://console.scaleway.com/iam/api-keys)
330
+ 2. Go to IAM → API Keys
331
+
332
+ **Google AI Studio**:
333
+ 1. Sign up at [aistudio.google.com/apikey](https://aistudio.google.com/apikey)
334
+ 2. Create an API key for Gemini/Gemma endpoints
335
+
336
+ **SiliconFlow**:
337
+ 1. Sign up at [cloud.siliconflow.cn/account/ak](https://cloud.siliconflow.cn/account/ak)
338
+ 2. Create API key in Account → API Keys
339
+
340
+ **Together AI**:
341
+ 1. Sign up at [api.together.ai/settings/api-keys](https://api.together.ai/settings/api-keys)
342
+ 2. Create an API key in Settings
343
+
344
+ **Cloudflare Workers AI**:
345
+ 1. Sign up at [dash.cloudflare.com](https://dash.cloudflare.com)
346
+ 2. Create an API token with Workers AI permissions
347
+ 3. Export both `CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_ACCOUNT_ID`
348
+
349
+ **Perplexity API**:
350
+ 1. Sign up at [perplexity.ai/settings/api](https://www.perplexity.ai/settings/api)
351
+ 2. Create API key (`PERPLEXITY_API_KEY`)
352
+
309
353
  > 💡 **Free tiers** — each provider exposes a dev/free tier with its own quotas.
310
354
 
311
355
  ---
312
356
 
313
357
  ## 🤖 Coding Models
314
358
 
315
- **111 coding models** across 13 providers and 8 tiers, ranked by [SWE-bench Verified](https://www.swebench.com) — the industry-standard benchmark measuring real GitHub issue resolution. Scores are self-reported by providers unless noted.
359
+ **134 coding models** across 17 providers and 8 tiers, ranked by [SWE-bench Verified](https://www.swebench.com) — the industry-standard benchmark measuring real GitHub issue resolution. Scores are self-reported by providers unless noted.
316
360
 
317
361
  ### NVIDIA NIM (44 models)
318
362
 
@@ -327,7 +371,7 @@ When enabled, telemetry events include: event name, app version, selected mode,
327
371
  | **B** 20–30% | R1 Distill 8B (28.2%), R1 Distill 7B (22.6%) |
328
372
  | **C** <20% | Gemma 2 9B (18.0%), Phi 4 Mini (14.0%), Phi 3.5 Mini (12.0%) |
329
373
 
330
- ### Groq (6 models)
374
+ ### Groq (10 models)
331
375
 
332
376
  | Tier | SWE-bench | Model |
333
377
  |------|-----------|-------|
@@ -336,7 +380,7 @@ When enabled, telemetry events include: event name, app version, selected mode,
336
380
  | **A** 40–50% | Llama 4 Scout (44.0%), R1 Distill 70B (43.9%) |
337
381
  | **A-** 35–40% | Llama 3.3 70B (39.5%) |
338
382
 
339
- ### Cerebras (3 models)
383
+ ### Cerebras (7 models)
340
384
 
341
385
  | Tier | SWE-bench | Model |
342
386
  |------|-----------|-------|
@@ -373,6 +417,92 @@ Current tier filter is shown in the header badge (e.g., `[Tier S]`)
373
417
 
374
418
  ---
375
419
 
420
+ ## 📊 TUI Columns
421
+
422
+ The main table displays one row per model with the following columns:
423
+
424
+ | Column | Sort key | Description |
425
+ |--------|----------|-------------|
426
+ | **Rank** | `R` | Position based on current sort order (medals for top 3: 🥇🥈🥉) |
427
+ | **Tier** | `Y` | SWE-bench tier (S+, S, A+, A, A-, B+, B, C) |
428
+ | **SWE%** | `S` | SWE-bench Verified score — the industry-standard benchmark for real GitHub issue resolution |
429
+ | **CTX** | `C` | Context window size in thousands of tokens (e.g. `128k`) |
430
+ | **Model** | `M` | Model display name (favorites show ⭐ prefix) |
431
+ | **Origin** | `N` | Provider name (NIM, Groq, Cerebras, etc.) — press `N` to cycle origin filter |
432
+ | **Latest Ping** | `L` | Most recent round-trip latency in milliseconds |
433
+ | **Avg Ping** | `A` | Rolling average of ALL successful pings since launch |
434
+ | **Health** | `H` | Current status: UP ✅, NO KEY 🔑, Timeout ⏳, Overloaded 🔥, Not Found 🚫 |
435
+ | **Verdict** | `V` | Health verdict based on avg latency + stability analysis (see below) |
436
+ | **Stability** | `B` | Composite 0–100 consistency score (see [Stability Score](#-stability-score)) |
437
+ | **Up%** | `U` | Uptime — percentage of successful pings out of total attempts |
438
+
439
+ ### Verdict values
440
+
441
+ The Verdict column combines average latency with stability analysis:
442
+
443
+ | Verdict | Meaning |
444
+ |---------|---------|
445
+ | **Perfect** | Avg < 400ms with stable p95/jitter |
446
+ | **Normal** | Avg < 1000ms, consistent responses |
447
+ | **Slow** | Avg 1000–2000ms |
448
+ | **Spiky** | Good avg but erratic tail latency (p95 >> avg) |
449
+ | **Very Slow** | Avg 2000–5000ms |
450
+ | **Overloaded** | Server returned 429/503 (rate limited or capacity hit) |
451
+ | **Unstable** | Was previously up but now timing out, or avg > 5000ms |
452
+ | **Not Active** | No successful pings yet |
453
+ | **Pending** | First ping still in flight |
454
+
455
+ ---
456
+
457
+ ## 📐 Stability Score
458
+
459
+ The **Stability** column (sort with `B` key) shows a composite 0–100 score that answers: *"How consistent and predictable is this model?"*
460
+
461
+ Average latency alone is misleading — a model averaging 250ms that randomly spikes to 6 seconds *feels* slower in practice than a steady 400ms model. The stability score captures this.
462
+
463
+ ### Formula
464
+
465
+ Four signals are normalized to 0–100 each, then combined with weights:
466
+
467
+ ```
468
+ Stability = 0.30 × p95_score
469
+ + 0.30 × jitter_score
470
+ + 0.20 × spike_score
471
+ + 0.20 × reliability_score
472
+ ```
473
+
474
+ | Component | Weight | What it measures | How it's normalized |
475
+ |-----------|--------|-----------------|---------------------|
476
+ | **p95 latency** | 30% | Tail-latency spikes — the worst 5% of response times | `100 × (1 - p95 / 5000)`, clamped to 0–100 |
477
+ | **Jitter (σ)** | 30% | Erratic response times — standard deviation of ping times | `100 × (1 - jitter / 2000)`, clamped to 0–100 |
478
+ | **Spike rate** | 20% | Fraction of pings above 3000ms | `100 × (1 - spikes / total_pings)` |
479
+ | **Reliability** | 20% | Uptime — fraction of successful HTTP 200 pings | Direct uptime percentage (0–100) |
480
+
481
+ ### Color coding
482
+
483
+ | Score | Color | Interpretation |
484
+ |-------|-------|----------------|
485
+ | **80–100** | Green | Rock-solid — very consistent, safe to rely on |
486
+ | **60–79** | Cyan | Good — occasional variance but generally stable |
487
+ | **40–59** | Yellow | Shaky — noticeable inconsistency |
488
+ | **< 40** | Red | Unreliable — frequent spikes or failures |
489
+ | **—** | Dim | No data yet (no successful pings) |
490
+
491
+ ### Example
492
+
493
+ Two models with similar average latency, very different real-world experience:
494
+
495
+ ```
496
+ Model A: avg 250ms, p95 6000ms, jitter 1800ms → Stability ~30 (red)
497
+ Model B: avg 400ms, p95 650ms, jitter 120ms → Stability ~85 (green)
498
+ ```
499
+
500
+ Model B is the better choice despite its higher average — it won't randomly stall your coding workflow.
501
+
502
+ > 💡 **Tip:** Sort by Stability (`B` key) after a few minutes of monitoring to find the models that deliver the most predictable performance.
503
+
504
+ ---
505
+
376
506
  ## 🔌 OpenCode Integration
377
507
 
378
508
  **The easiest way** — let `free-coding-models` do everything:
@@ -548,19 +678,19 @@ This script:
548
678
  ## ⚙️ How it works
549
679
 
550
680
  ```
551
- ┌─────────────────────────────────────────────────────────────┐
552
- │ 1. Enter alternate screen buffer (like vim/htop/less)
553
- │ 2. Ping ALL models in parallel
554
- │ 3. Display real-time table with Latest/Avg/Up% columns
555
- │ 4. Re-ping ALL models every 2 seconds (forever)
556
- │ 5. Update rolling averages from ALL successful pings
557
- │ 6. User can navigate with ↑↓ and select with Enter
558
- │ 7. On Enter (OpenCode): set model, launch OpenCode
559
- │ 8. On Enter (OpenClaw): update ~/.openclaw/openclaw.json
560
- └─────────────────────────────────────────────────────────────┘
681
+ ┌──────────────────────────────────────────────────────────────────┐
682
+ │ 1. Enter alternate screen buffer (like vim/htop/less)
683
+ │ 2. Ping ALL models in parallel
684
+ │ 3. Display real-time table with Latest/Avg/Stability/Up%
685
+ │ 4. Re-ping ALL models every 3 seconds (forever)
686
+ │ 5. Update rolling averages + stability scores per model
687
+ │ 6. User can navigate with ↑↓ and select with Enter
688
+ │ 7. On Enter (OpenCode): set model, launch OpenCode
689
+ │ 8. On Enter (OpenClaw): update ~/.openclaw/openclaw.json
690
+ └──────────────────────────────────────────────────────────────────┘
561
691
  ```
562
692
 
563
- **Result:** Continuous monitoring interface that stays open until you select a model or press Ctrl+C. Rolling averages give you accurate long-term latency data, uptime percentage tracks reliability, and you can configure your tool of choice with your chosen model in one keystroke.
693
+ **Result:** Continuous monitoring interface that stays open until you select a model or press Ctrl+C. Rolling averages give you accurate long-term latency data, the stability score reveals which models are truly consistent vs. deceptively spikey, and you can configure your tool of choice with one keystroke.
564
694
 
565
695
  ---
566
696
 
@@ -582,6 +712,11 @@ This script:
582
712
  | `HYPERBOLIC_API_KEY` | Hyperbolic key |
583
713
  | `SCALEWAY_API_KEY` | Scaleway key |
584
714
  | `GOOGLE_API_KEY` | Google AI Studio key |
715
+ | `SILICONFLOW_API_KEY` | SiliconFlow key |
716
+ | `TOGETHER_API_KEY` | Together AI key |
717
+ | `CLOUDFLARE_API_TOKEN` / `CLOUDFLARE_API_KEY` | Cloudflare Workers AI token/key |
718
+ | `CLOUDFLARE_ACCOUNT_ID` | Cloudflare account ID (required for Workers AI endpoint URL) |
719
+ | `PERPLEXITY_API_KEY` / `PPLX_API_KEY` | Perplexity API key |
585
720
  | `FREE_CODING_MODELS_TELEMETRY` | `0` disables analytics, `1` enables analytics |
586
721
  | `FREE_CODING_MODELS_POSTHOG_KEY` | PostHog project API key used for anonymous event capture |
587
722
  | `FREE_CODING_MODELS_POSTHOG_HOST` | Optional PostHog ingest host (`https://eu.i.posthog.com` default) |
@@ -597,7 +732,11 @@ This script:
597
732
  "openrouter": "sk-or-xxx",
598
733
  "huggingface": "hf_xxx",
599
734
  "replicate": "r8_xxx",
600
- "deepinfra": "di_xxx"
735
+ "deepinfra": "di_xxx",
736
+ "siliconflow": "sk_xxx",
737
+ "together": "together_xxx",
738
+ "cloudflare": "cf_xxx",
739
+ "perplexity": "pplx_xxx"
601
740
  },
602
741
  "providers": {
603
742
  "nvidia": { "enabled": true },
@@ -606,7 +745,11 @@ This script:
606
745
  "openrouter": { "enabled": true },
607
746
  "huggingface": { "enabled": true },
608
747
  "replicate": { "enabled": true },
609
- "deepinfra": { "enabled": true }
748
+ "deepinfra": { "enabled": true },
749
+ "siliconflow": { "enabled": true },
750
+ "together": { "enabled": true },
751
+ "cloudflare": { "enabled": true },
752
+ "perplexity": { "enabled": true }
610
753
  },
611
754
  "favorites": [
612
755
  "nvidia/deepseek-ai/deepseek-v3.2"
@@ -621,7 +764,7 @@ This script:
621
764
 
622
765
  **Configuration:**
623
766
  - **Ping timeout**: 15 seconds per attempt (slow models get more time)
624
- - **Ping interval**: 2 seconds between complete re-pings of all models (adjustable with W/X keys)
767
+ - **Ping interval**: 3 seconds between complete re-pings of all models (adjustable with W/X keys)
625
768
  - **Monitor mode**: Interface stays open forever, press Ctrl+C to exit
626
769
 
627
770
  **Flags:**
@@ -643,7 +786,7 @@ This script:
643
786
  **Keyboard shortcuts (main TUI):**
644
787
  - **↑↓** — Navigate models
645
788
  - **Enter** — Select model (launches OpenCode or sets OpenClaw default, depending on mode)
646
- - **R/Y/O/M/L/A/S/N/H/V/U** — Sort by Rank/Tier/Origin/Model/LatestPing/Avg/SWE/Ctx/Health/Verdict/Uptime
789
+ - **R/Y/O/M/L/A/S/N/H/V/B/U** — Sort by Rank/Tier/Origin/Model/LatestPing/Avg/SWE/Ctx/Health/Verdict/Stability/Uptime
647
790
  - **F** — Toggle favorite on selected model (⭐ in Model column, pinned at top)
648
791
  - **T** — Cycle tier filter (All → S+ → S → A+ → A → A- → B+ → B → C → All)
649
792
  - **Z** — Cycle mode (OpenCode CLI → OpenCode Desktop → OpenClaw)
@@ -718,5 +861,3 @@ We welcome contributions! Feel free to open issues, submit pull requests, or get
718
861
  For questions or issues, open a [GitHub issue](https://github.com/vava-nessa/free-coding-models/issues).
719
862
 
720
863
  💬 Let's talk about the project on Discord: https://discord.gg/5MbTnDC3Md
721
-
722
- > ⚠️ **free-coding-models is a BETA TUI** — it might crash or have problems. Use at your own risk and feel free to report issues!