@billjr99/pi-openai-compat 1.1.33 → 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 +2 -0
- package/add-provider.sh +14 -0
- package/index.ts +24 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,12 +66,14 @@ 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 |
|
|
72
73
|
| **ModelScope** | `https://api-inference.modelscope.cn/v1` | `ms-...` SDK token from modelscope.cn/my/myaccesstoken |
|
|
73
74
|
| **Aion Labs** | `https://api.aionlabs.ai/v1` | API key from aionlabs.ai/app/api-keys (aionlabs.ai/docs) |
|
|
74
75
|
| **Agnes AI** | `https://apihub.agnes-ai.com/v1` | `sk-...` key from the Agnes console at platform.agnes-ai.com (wiki.agnes-ai.com) |
|
|
76
|
+
| **Xiaomi MiMo** | `https://api.xiaomimimo.com/v1` | API key from the Xiaomi MiMo console at platform.xiaomimimo.com → API Keys (mimo.mi.com/docs) |
|
|
75
77
|
| **Ollama (local)** | `http://localhost:11434/v1` (editable) | Optional bearer token; leave blank for a default local install |
|
|
76
78
|
| **Ollama Cloud** | `https://ollama.com/v1` | Ollama Cloud API key from ollama.com |
|
|
77
79
|
| **llmproxy** | `http://localhost:8080/v1` (editable) | Keyless by default; bearer token if your instance requires one |
|
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",
|
|
@@ -96,6 +102,12 @@ const BUILTIN = {
|
|
|
96
102
|
keyless: false,
|
|
97
103
|
keyHint: "platform.agnes-ai.com → API Key management (keys look like sk-...; docs at wiki.agnes-ai.com)",
|
|
98
104
|
},
|
|
105
|
+
xiaomi_mimo: {
|
|
106
|
+
displayName: "Xiaomi MiMo",
|
|
107
|
+
baseUrl: "https://api.xiaomimimo.com/v1",
|
|
108
|
+
keyless: false,
|
|
109
|
+
keyHint: "platform.xiaomimimo.com → API Keys (docs at mimo.mi.com/docs)",
|
|
110
|
+
},
|
|
99
111
|
};
|
|
100
112
|
|
|
101
113
|
// README "Auth" column text for the built-in providers, used only by patchreadme.
|
|
@@ -104,12 +116,14 @@ const BUILTIN_AUTH = {
|
|
|
104
116
|
teamorouter: "`sk-teamo-...` key from teamorouter.com (teamorouter.com/docs)",
|
|
105
117
|
gmi: "API key from console.gmicloud.ai → Organization Settings → API Keys",
|
|
106
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)",
|
|
107
120
|
atria_asi: "`atr_...` key from api.atria-asi.ai/console/keys (Google sign-in)",
|
|
108
121
|
unbiased_ai: "`sk_...` key from platform.unbiased.ai (signup reviewed by hand)",
|
|
109
122
|
kilo: "API key from app.kilo.ai → Your Profile (personal account), at the bottom of the page; needs account credits",
|
|
110
123
|
modelscope: "`ms-...` SDK token from modelscope.cn/my/myaccesstoken",
|
|
111
124
|
aion_labs: "API key from aionlabs.ai/app/api-keys (aionlabs.ai/docs)",
|
|
112
125
|
agnes_ai: "`sk-...` key from the Agnes console at platform.agnes-ai.com (wiki.agnes-ai.com)",
|
|
126
|
+
xiaomi_mimo: "API key from the Xiaomi MiMo console at platform.xiaomimimo.com → API Keys (mimo.mi.com/docs)",
|
|
113
127
|
};
|
|
114
128
|
|
|
115
129
|
/**
|
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",
|
|
@@ -476,6 +487,19 @@ export const TEMPLATES: Record<string, {
|
|
|
476
487
|
// without a key, and a filter that misses would register nothing.
|
|
477
488
|
keyHint: "platform.agnes-ai.com → API Key management (keys look like sk-...; docs at wiki.agnes-ai.com)",
|
|
478
489
|
},
|
|
490
|
+
xiaomi_mimo: {
|
|
491
|
+
displayName: "Xiaomi MiMo",
|
|
492
|
+
baseUrl: "https://api.xiaomimimo.com/v1",
|
|
493
|
+
keyless: false,
|
|
494
|
+
// Xiaomi MiMo API Open Platform. GET /v1/models is key-gated (it answers
|
|
495
|
+
// 401 "invalid_key" JSON without a key, where an unknown /v1 path answers
|
|
496
|
+
// a 404 HTML page), which is exactly what fetchModels already sends, so no
|
|
497
|
+
// modelsUrl or fallbackModels override is needed. The catalog may also
|
|
498
|
+
// carry non-chat ids (e.g. mimo-v2-tts); no modelFilter is set because the
|
|
499
|
+
// live id list could not be confirmed without a key, and a filter that
|
|
500
|
+
// misses would register nothing.
|
|
501
|
+
keyHint: "platform.xiaomimimo.com → API Keys (docs at mimo.mi.com/docs)",
|
|
502
|
+
},
|
|
479
503
|
custom: {
|
|
480
504
|
displayName: "Custom Endpoint",
|
|
481
505
|
baseUrl: "",
|
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",
|