pi-free 2.0.0 → 2.0.1
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/CHANGELOG.md +37 -0
- package/README.md +393 -416
- package/config.ts +6 -2
- package/constants.ts +1 -0
- package/index.ts +6 -44
- package/lib/built-in-toggle.ts +206 -0
- package/package.json +67 -67
- package/provider-helper.ts +260 -260
- package/providers/cline/cline-models.ts +1 -1
- package/providers/cline/cline.ts +5 -7
- package/providers/dynamic-built-in/index.ts +432 -513
- package/providers/kilo/kilo.ts +5 -5
- package/providers/nvidia/nvidia.ts +1 -1
- package/providers/ollama/ollama.ts +3 -3
package/providers/kilo/kilo.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Provides access to 300+ AI models via the Kilo Gateway (OpenRouter-compatible).
|
|
5
5
|
* Fetches ALL models at startup (like Cline/OpenRouter), defaults to free-only view.
|
|
6
|
-
* Run /login kilo or use /kilo
|
|
6
|
+
* Run /login kilo or use /toggle-kilo to access paid models.
|
|
7
7
|
*
|
|
8
|
-
* Responds to global
|
|
8
|
+
* Responds to global free-only filter for free/paid model filtering.
|
|
9
9
|
*
|
|
10
10
|
* Usage:
|
|
11
11
|
* pi install git:github.com/apmantza/pi-free
|
|
@@ -156,8 +156,8 @@ export default async function (pi: ExtensionAPI) {
|
|
|
156
156
|
|
|
157
157
|
// Registration complete - models registered silently (use LOG_LEVEL=info to see details)
|
|
158
158
|
|
|
159
|
-
// Per-provider toggle command
|
|
160
|
-
pi.registerCommand("kilo
|
|
159
|
+
// Per-provider toggle command
|
|
160
|
+
pi.registerCommand("toggle-kilo", {
|
|
161
161
|
description: "Toggle between free and all Kilo models",
|
|
162
162
|
handler: async (_args, ctx) => {
|
|
163
163
|
showPaidModels = !showPaidModels;
|
|
@@ -196,7 +196,7 @@ export default async function (pi: ExtensionAPI) {
|
|
|
196
196
|
const paidCount = allModels.length - freeModels.length;
|
|
197
197
|
if (paidCount > 0) {
|
|
198
198
|
ctx.ui.notify(
|
|
199
|
-
`Kilo: ${freeModels.length} free models shown. Use /kilo
|
|
199
|
+
`Kilo: ${freeModels.length} free models shown. Use /toggle-kilo or /login kilo for ${paidCount} paid models. Terms: ${URL_KILO_TOS}`,
|
|
200
200
|
"info",
|
|
201
201
|
);
|
|
202
202
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* image-gen) are filtered by their modalities (output must be ["text"],
|
|
11
11
|
* input must include "text").
|
|
12
12
|
*
|
|
13
|
-
* Responds to global
|
|
13
|
+
* Responds to global free-only filter for free/paid model filtering.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
import type {
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
* Requires OLLAMA_API_KEY with cloud access.
|
|
12
12
|
* Get a free key at: https://ollama.com/settings/keys
|
|
13
13
|
*
|
|
14
|
-
* Responds to global
|
|
14
|
+
* Responds to global free-only filter (shows models but warns they're freemium).
|
|
15
15
|
*
|
|
16
16
|
* Usage:
|
|
17
17
|
* pi install git:github.com/apmantza/pi-free
|
|
18
18
|
* # Set OLLAMA_API_KEY env var
|
|
19
19
|
* # Models appear in /model selector
|
|
20
|
-
* # Use /ollama
|
|
20
|
+
* # Use /toggle-ollama to show all vs limited set
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
23
|
import type {
|
|
@@ -51,7 +51,7 @@ async function fetchOllamaModels(
|
|
|
51
51
|
// Use OpenAI-compatible /v1/models endpoint for consistency
|
|
52
52
|
// The native /api/tags returns :cloud suffixes that may not work with /v1/chat/completions
|
|
53
53
|
const response = await fetchWithRetry(
|
|
54
|
-
`${BASE_URL_OLLAMA}/
|
|
54
|
+
`${BASE_URL_OLLAMA}/models`,
|
|
55
55
|
{
|
|
56
56
|
headers: {
|
|
57
57
|
Authorization: `Bearer ${apiKey}`,
|