free-coding-models 0.1.67 → 0.1.69

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,12 +2,27 @@
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-134-76b900?logo=nvidia" alt="models count">
6
- <img src="https://img.shields.io/badge/providers-17-blue" alt="providers count">
5
+ <img src="https://img.shields.io/badge/models-150-76b900?logo=nvidia" alt="models count">
6
+ <img src="https://img.shields.io/badge/providers-19-blue" alt="providers count">
7
7
  </p>
8
8
 
9
9
  <h1 align="center">free-coding-models</h1>
10
10
 
11
+ <p align="center">
12
+ <strong>Contributors</strong><br>
13
+ <a href="https://github.com/vava-nessa"><img src="https://avatars.githubusercontent.com/u/5466264?v=4&s=60" width="60" height="60" style="border-radius:50%" alt="vava-nessa"></a>
14
+ <a href="https://github.com/erwinh22"><img src="https://avatars.githubusercontent.com/u/6641858?v=4&s=60" width="60" height="60" style="border-radius:50%" alt="erwinh22"></a>
15
+ <a href="https://github.com/whit3rabbit"><img src="https://avatars.githubusercontent.com/u/12357518?v=4&s=60" width="60" height="60" style="border-radius:50%" alt="whit3rabbit"></a>
16
+ <a href="https://github.com/skylaweber"><img src="https://avatars.githubusercontent.com/u/172871734?v=4&s=60" width="60" height="60" style="border-radius:50%" alt="skylaweber"></a>
17
+ <br>
18
+ <sub>
19
+ <a href="https://github.com/vava-nessa">vava-nessa</a> &middot;
20
+ <a href="https://github.com/erwinh22">erwinh22</a> &middot;
21
+ <a href="https://github.com/whit3rabbit">whit3rabbit</a> &middot;
22
+ <a href="https://github.com/skylaweber">skylaweber</a>
23
+ </sub>
24
+ </p>
25
+
11
26
  <p align="center">
12
27
  💬 <a href="https://discord.gg/5MbTnDC3Md">Let's talk about the project on Discord</a>
13
28
  </p>
@@ -24,7 +39,7 @@
24
39
 
25
40
  <p align="center">
26
41
  <strong>Find the fastest coding LLM models in seconds</strong><br>
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>
42
+ <sub>Ping free coding models from 19 providers in real-time — pick the best one for OpenCode, OpenClaw, or any AI coding assistant</sub>
28
43
  </p>
29
44
 
30
45
  <p align="center">
@@ -49,7 +64,7 @@
49
64
  ## ✨ Features
50
65
 
51
66
  - **🎯 Coding-focused** — Only LLM models optimized for code generation, not chat or vision
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
67
+ - **🌐 Multi-provider** — 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, Perplexity API, and ZAI
53
68
  - **⚙️ Settings screen** — Press `P` to manage provider API keys, enable/disable providers, test keys live, and manually check/install updates
54
69
  - **🚀 Parallel pings** — All models tested simultaneously via native `fetch`
55
70
  - **📊 Real-time animation** — Watch latency appear live in alternate screen buffer
@@ -95,10 +110,11 @@ Before using `free-coding-models`, make sure you have:
95
110
  - **Together AI** — [api.together.ai/settings/api-keys](https://api.together.ai/settings/api-keys) → API Keys (credits/promotions vary)
96
111
  - **Cloudflare Workers AI** — [dash.cloudflare.com](https://dash.cloudflare.com) → Create API token + set `CLOUDFLARE_ACCOUNT_ID` (Free: 10k neurons/day)
97
112
  - **Perplexity API** — [perplexity.ai/settings/api](https://www.perplexity.ai/settings/api) → API Key (tiered limits by spend)
113
+ - **ZAI** — [z.ai](https://z.ai) → Get API key (Coding Plan subscription)
98
114
  3. **OpenCode** *(optional)* — [Install OpenCode](https://github.com/opencode-ai/opencode) to use the OpenCode integration
99
115
  4. **OpenClaw** *(optional)* — [Install OpenClaw](https://openclaw.ai) to use the OpenClaw integration
100
116
 
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.
117
+ > 💡 **Tip:** You don't need all nineteen 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.
102
118
 
103
119
  ---
104
120
 
@@ -179,13 +195,13 @@ When you run `free-coding-models` without `--opencode` or `--openclaw`, you get
179
195
  Use `↑↓` arrows to select, `Enter` to confirm. Then the TUI launches with your chosen mode shown in the header badge.
180
196
 
181
197
  **How it works:**
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
198
+ 1. **Ping phase** — All enabled models are pinged in parallel (up to 150 across 19 providers)
199
+ 2. **Continuous monitoring** — Models are re-pinged every 60 seconds forever
184
200
  3. **Real-time updates** — Watch "Latest", "Avg", and "Up%" columns update live
185
201
  4. **Select anytime** — Use ↑↓ arrows to navigate, press Enter on a model to act
186
202
  5. **Smart detection** — Automatically detects if NVIDIA NIM is configured in OpenCode or OpenClaw
187
203
 
188
- Setup wizard (first run — walks through all 17 providers):
204
+ Setup wizard (first run — walks through all 19 providers):
189
205
 
190
206
  ```
191
207
  🔑 First-time setup — API keys
@@ -268,6 +284,7 @@ SILICONFLOW_API_KEY=sk_xxx free-coding-models
268
284
  TOGETHER_API_KEY=together_xxx free-coding-models
269
285
  CLOUDFLARE_API_TOKEN=cf_xxx CLOUDFLARE_ACCOUNT_ID=your_account_id free-coding-models
270
286
  PERPLEXITY_API_KEY=pplx_xxx free-coding-models
287
+ ZAI_API_KEY=zai-xxx free-coding-models
271
288
  FREE_CODING_MODELS_TELEMETRY=0 free-coding-models
272
289
  ```
273
290
 
@@ -350,13 +367,24 @@ When enabled, telemetry events include: event name, app version, selected mode,
350
367
  1. Sign up at [perplexity.ai/settings/api](https://www.perplexity.ai/settings/api)
351
368
  2. Create API key (`PERPLEXITY_API_KEY`)
352
369
 
353
- > 💡 **Free tiers** each provider exposes a dev/free tier with its own quotas.
370
+ **ZAI** (5 models, GLM family):
371
+ 1. Sign up at [z.ai](https://z.ai)
372
+ 2. Subscribe to Coding Plan
373
+ 3. Get API key from dashboard
374
+
375
+ > 💡 **Free tiers** — each provider exposes a dev/free tier with its own quotas. ZAI requires a Coding Plan subscription.
354
376
 
355
377
  ---
356
378
 
357
379
  ## 🤖 Coding Models
358
380
 
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.
381
+ **150 coding models** across 19 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.
382
+
383
+ ### ZAI Coding Plan (5 models)
384
+
385
+ | Tier | SWE-bench | Model |
386
+ |------|-----------|-------|
387
+ | **S+** ≥70% | GLM-5 (77.8%), GLM-4.5 (75.0%), GLM-4.7 (73.8%), GLM-4.5-Air (72.0%), GLM-4.6 (70.0%) |
360
388
 
361
389
  ### NVIDIA NIM (44 models)
362
390
 
@@ -528,6 +556,18 @@ You can force a specific port:
528
556
  OPENCODE_PORT=4098 free-coding-models --opencode
529
557
  ```
530
558
 
559
+ ### ZAI provider proxy
560
+
561
+ OpenCode doesn't natively support ZAI's API path format (`/api/coding/paas/v4/*`). When you select a ZAI model, `free-coding-models` automatically starts a local reverse proxy that translates OpenCode's standard `/v1/*` requests to ZAI's API. This is fully transparent -- just select a ZAI model and press Enter.
562
+
563
+ **How it works:**
564
+ 1. A localhost HTTP proxy starts on a random available port
565
+ 2. OpenCode is configured with a `zai` provider pointing at `http://localhost:<port>/v1`
566
+ 3. The proxy rewrites `/v1/models` to `/api/coding/paas/v4/models` and `/v1/chat/completions` to `/api/coding/paas/v4/chat/completions`
567
+ 4. When OpenCode exits, the proxy shuts down automatically
568
+
569
+ No manual configuration needed -- the proxy lifecycle is managed entirely by `free-coding-models`.
570
+
531
571
  ### Manual OpenCode Setup (Optional)
532
572
 
533
573
  Create or edit `~/.config/opencode/opencode.json`:
@@ -682,7 +722,7 @@ This script:
682
722
  │ 1. Enter alternate screen buffer (like vim/htop/less) │
683
723
  │ 2. Ping ALL models in parallel │
684
724
  │ 3. Display real-time table with Latest/Avg/Stability/Up% │
685
- │ 4. Re-ping ALL models every 3 seconds (forever)
725
+ │ 4. Re-ping ALL models every 60 seconds (forever)
686
726
  │ 5. Update rolling averages + stability scores per model │
687
727
  │ 6. User can navigate with ↑↓ and select with Enter │
688
728
  │ 7. On Enter (OpenCode): set model, launch OpenCode │
@@ -717,6 +757,7 @@ This script:
717
757
  | `CLOUDFLARE_API_TOKEN` / `CLOUDFLARE_API_KEY` | Cloudflare Workers AI token/key |
718
758
  | `CLOUDFLARE_ACCOUNT_ID` | Cloudflare account ID (required for Workers AI endpoint URL) |
719
759
  | `PERPLEXITY_API_KEY` / `PPLX_API_KEY` | Perplexity API key |
760
+ | `ZAI_API_KEY` | ZAI key |
720
761
  | `FREE_CODING_MODELS_TELEMETRY` | `0` disables analytics, `1` enables analytics |
721
762
  | `FREE_CODING_MODELS_POSTHOG_KEY` | PostHog project API key used for anonymous event capture |
722
763
  | `FREE_CODING_MODELS_POSTHOG_HOST` | Optional PostHog ingest host (`https://eu.i.posthog.com` default) |
@@ -736,7 +777,8 @@ This script:
736
777
  "siliconflow": "sk_xxx",
737
778
  "together": "together_xxx",
738
779
  "cloudflare": "cf_xxx",
739
- "perplexity": "pplx_xxx"
780
+ "perplexity": "pplx_xxx",
781
+ "zai": "zai-xxx"
740
782
  },
741
783
  "providers": {
742
784
  "nvidia": { "enabled": true },
@@ -749,7 +791,8 @@ This script:
749
791
  "siliconflow": { "enabled": true },
750
792
  "together": { "enabled": true },
751
793
  "cloudflare": { "enabled": true },
752
- "perplexity": { "enabled": true }
794
+ "perplexity": { "enabled": true },
795
+ "zai": { "enabled": true }
753
796
  },
754
797
  "favorites": [
755
798
  "nvidia/deepseek-ai/deepseek-v3.2"
@@ -764,7 +807,7 @@ This script:
764
807
 
765
808
  **Configuration:**
766
809
  - **Ping timeout**: 15 seconds per attempt (slow models get more time)
767
- - **Ping interval**: 3 seconds between complete re-pings of all models (adjustable with W/X keys)
810
+ - **Ping interval**: 60 seconds between complete re-pings of all models (adjustable with W/X keys)
768
811
  - **Monitor mode**: Interface stays open forever, press Ctrl+C to exit
769
812
 
770
813
  **Flags:**
@@ -782,6 +825,8 @@ This script:
782
825
  | `--tier A` | Show only A+, A, A- tier models |
783
826
  | `--tier B` | Show only B+, B tier models |
784
827
  | `--tier C` | Show only C tier models |
828
+ | `--profile <name>` | Load a saved config profile on startup |
829
+ | `--recommend` | Auto-open Smart Recommend overlay on start |
785
830
 
786
831
  **Keyboard shortcuts (main TUI):**
787
832
  - **↑↓** — Navigate models
@@ -790,7 +835,12 @@ This script:
790
835
  - **F** — Toggle favorite on selected model (⭐ in Model column, pinned at top)
791
836
  - **T** — Cycle tier filter (All → S+ → S → A+ → A → A- → B+ → B → C → All)
792
837
  - **Z** — Cycle mode (OpenCode CLI → OpenCode Desktop → OpenClaw)
793
- - **P** — Open Settings (manage API keys, provider toggles, analytics toggle, manual update)
838
+ - **P** — Open Settings (manage API keys, provider toggles, analytics toggle, manual update, profiles)
839
+ - **Shift+P** — Cycle through saved profiles (switches live TUI settings)
840
+ - **Shift+S** — Save current TUI settings as a named profile (inline prompt)
841
+ - **Q** — Open Smart Recommend overlay (find the best model for your task)
842
+ - **E** — Elevate tier filter (show higher tiers)
843
+ - **D** — Descend tier filter (show lower tiers)
794
844
  - **W** — Decrease ping interval (faster pings)
795
845
  - **X** — Increase ping interval (slower pings)
796
846
  - **K** / **Esc** — Show/hide help overlay
@@ -799,15 +849,46 @@ This script:
799
849
  Pressing **K** now shows a full in-app reference: main hotkeys, settings hotkeys, and CLI flags with usage examples.
800
850
 
801
851
  **Keyboard shortcuts (Settings screen — `P` key):**
802
- - **↑↓** — Navigate providers, analytics row, and maintenance row
803
- - **Enter** — Edit API key inline, toggle analytics on analytics row, or check/install update on maintenance row
804
- - **Space** — Toggle provider enabled/disabled, or toggle analytics on analytics row
852
+ - **↑↓** — Navigate providers, analytics row, maintenance row, and profile rows
853
+ - **Enter** — Edit API key inline, toggle analytics, check/install update, or load a profile
854
+ - **Space** — Toggle provider enabled/disabled, or toggle analytics
805
855
  - **T** — Test current provider's API key (fires a live ping)
806
856
  - **U** — Check for updates manually from settings
857
+ - **Backspace** — Delete the selected profile (only on profile rows)
807
858
  - **Esc** — Close settings and return to main TUI
808
859
 
809
860
  ---
810
861
 
862
+ ### 📋 Config Profiles
863
+
864
+ Profiles let you save and restore different TUI configurations — useful if you switch between work/personal setups, different tier preferences, or want to keep separate favorites lists.
865
+
866
+ **What's stored in a profile:**
867
+ - Favorites (starred models)
868
+ - Sort column and direction
869
+ - Tier filter
870
+ - Ping interval
871
+ - API keys
872
+
873
+ **Saving a profile:**
874
+ 1. Configure the TUI the way you want (favorites, sort, tier, etc.)
875
+ 2. Press **Shift+S** — an inline prompt appears at the bottom
876
+ 3. Type a name (e.g. `work`, `fast-only`, `presentation`) and press **Enter**
877
+ 4. The profile is saved and becomes the active profile (shown as a purple badge in the header)
878
+
879
+ **Switching profiles:**
880
+ - **Shift+P** in the main table — cycles through saved profiles (or back to raw config)
881
+ - **`--profile <name>`** — load a specific profile on startup
882
+
883
+ **Managing profiles:**
884
+ - Open Settings (**P** key) — scroll down to the **Profiles** section
885
+ - **Enter** on a profile row to load it
886
+ - **Backspace** on a profile row to delete it
887
+
888
+ Profiles are stored inside `~/.free-coding-models.json` under the `profiles` key.
889
+
890
+ ---
891
+
811
892
  ## 🔧 Development
812
893
 
813
894
  ```bash