@billjr99/pi-openai-compat 1.1.34 → 1.1.35
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 +1 -0
- package/add-provider.sh +7 -0
- package/index.ts +11 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,6 +66,7 @@ If pi is already running when you install, type `/reload` first.
|
|
|
66
66
|
| **TeamoRouter** | `https://api.teamorouter.com/v1` | `sk-teamo-...` key from teamorouter.com (teamorouter.com/docs) |
|
|
67
67
|
| **GMI Cloud** | `https://api.gmi-serving.com/v1` | API key from console.gmicloud.ai → Organization Settings → API Keys |
|
|
68
68
|
| **Token Harbor** | `https://tokenharbor.ai/v1` | `thk_live_...` Universal Key from tokenharbor.ai/dashboard/api-keys |
|
|
69
|
+
| **TokenRouter** | `https://api.tokenrouter.com/v1` | API key from the TokenRouter console at tokenrouter.com (model prices at tokenrouter.com/models) |
|
|
69
70
|
| **Atria ASI** | `https://api.atria-asi.ai/v1` | `atr_...` key from api.atria-asi.ai/console/keys (Google sign-in) |
|
|
70
71
|
| **Unbiased AI** | `https://api.unbiased.ai/v1` | `sk_...` key from platform.unbiased.ai (signup reviewed by hand) |
|
|
71
72
|
| **Kilo AI** | `https://api.kilo.ai/api/gateway` | API key from app.kilo.ai → Your Profile (personal account), at the bottom of the page; needs account credits |
|
package/add-provider.sh
CHANGED
|
@@ -60,6 +60,12 @@ const BUILTIN = {
|
|
|
60
60
|
keyless: false,
|
|
61
61
|
keyHint: "tokenharbor.ai/dashboard/api-keys (Universal Key, format thk_live_...; docs at tokenharbor.ai/docs)",
|
|
62
62
|
},
|
|
63
|
+
tokenrouter: {
|
|
64
|
+
displayName: "TokenRouter",
|
|
65
|
+
baseUrl: "https://api.tokenrouter.com/v1",
|
|
66
|
+
keyless: false,
|
|
67
|
+
keyHint: "tokenrouter.com console (model prices at tokenrouter.com/models)",
|
|
68
|
+
},
|
|
63
69
|
atria_asi: {
|
|
64
70
|
displayName: "Atria ASI",
|
|
65
71
|
baseUrl: "https://api.atria-asi.ai/v1",
|
|
@@ -110,6 +116,7 @@ const BUILTIN_AUTH = {
|
|
|
110
116
|
teamorouter: "`sk-teamo-...` key from teamorouter.com (teamorouter.com/docs)",
|
|
111
117
|
gmi: "API key from console.gmicloud.ai → Organization Settings → API Keys",
|
|
112
118
|
tokenharbor: "`thk_live_...` Universal Key from tokenharbor.ai/dashboard/api-keys",
|
|
119
|
+
tokenrouter: "API key from the TokenRouter console at tokenrouter.com (model prices at tokenrouter.com/models)",
|
|
113
120
|
atria_asi: "`atr_...` key from api.atria-asi.ai/console/keys (Google sign-in)",
|
|
114
121
|
unbiased_ai: "`sk_...` key from platform.unbiased.ai (signup reviewed by hand)",
|
|
115
122
|
kilo: "API key from app.kilo.ai → Your Profile (personal account), at the bottom of the page; needs account credits",
|
package/index.ts
CHANGED
|
@@ -395,6 +395,17 @@ export const TEMPLATES: Record<string, {
|
|
|
395
395
|
// One "Universal Key" reaches every model; free models carry a ":free" id suffix.
|
|
396
396
|
keyHint: "tokenharbor.ai/dashboard/api-keys (Universal Key, format thk_live_...; docs at tokenharbor.ai/docs)",
|
|
397
397
|
},
|
|
398
|
+
tokenrouter: {
|
|
399
|
+
displayName: "TokenRouter",
|
|
400
|
+
baseUrl: "https://api.tokenrouter.com/v1",
|
|
401
|
+
keyless: false,
|
|
402
|
+
// Multi-vendor gateway (a new-api deployment). GET /v1/models is key-gated
|
|
403
|
+
// (it answers 401 "Invalid token" JSON without a key, where an unknown /v1
|
|
404
|
+
// path answers 404 "Invalid URL" JSON), which is exactly what fetchModels
|
|
405
|
+
// already sends, so no modelsUrl or fallbackModels override is needed.
|
|
406
|
+
// Per-model prices are listed at tokenrouter.com/models.
|
|
407
|
+
keyHint: "tokenrouter.com console (model prices at tokenrouter.com/models)",
|
|
408
|
+
},
|
|
398
409
|
atria_asi: {
|
|
399
410
|
displayName: "Atria ASI",
|
|
400
411
|
baseUrl: "https://api.atria-asi.ai/v1",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@billjr99/pi-openai-compat",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.35",
|
|
4
4
|
"description": "pi-coding-agent extension: OpenAI-compatible endpoint support (OpenRouter, NVIDIA NIM, Nous Portal, Ollama, custom)",
|
|
5
5
|
"author": "Bill Mongan <https://github.com/BillJr99>",
|
|
6
6
|
"license": "MIT",
|