@billjr99/pi-openai-compat 1.0.1 → 1.0.2
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/index.ts +1 -15
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -56,7 +56,6 @@ const TEMPLATES: Record<string, {
|
|
|
56
56
|
displayName: string;
|
|
57
57
|
baseUrl: string;
|
|
58
58
|
keyless: boolean;
|
|
59
|
-
keyHint?: string;
|
|
60
59
|
/** If set, only models whose id appears in this list are kept after fetching. */
|
|
61
60
|
modelFilter?: string[];
|
|
62
61
|
/** If true, prompt the user to confirm/edit the base URL (like ollama/custom). */
|
|
@@ -66,25 +65,21 @@ const TEMPLATES: Record<string, {
|
|
|
66
65
|
displayName: "OpenRouter",
|
|
67
66
|
baseUrl: "https://openrouter.ai/api/v1",
|
|
68
67
|
keyless: false,
|
|
69
|
-
keyHint: "sk-or-... from openrouter.ai/keys",
|
|
70
68
|
},
|
|
71
69
|
nvidia_nim: {
|
|
72
70
|
displayName: "NVIDIA NIM",
|
|
73
71
|
baseUrl: "https://integrate.api.nvidia.com/v1",
|
|
74
72
|
keyless: false,
|
|
75
|
-
keyHint: "nvapi-... from build.nvidia.com",
|
|
76
73
|
},
|
|
77
74
|
nous: {
|
|
78
75
|
displayName: "Nous Research Portal",
|
|
79
76
|
baseUrl: "https://inference-api.nousresearch.com/v1",
|
|
80
77
|
keyless: false,
|
|
81
|
-
keyHint: "Your Nous Portal API key",
|
|
82
78
|
},
|
|
83
79
|
google: {
|
|
84
80
|
displayName: "Google Gemini",
|
|
85
81
|
baseUrl: "https://generativelanguage.googleapis.com/v1beta/openai",
|
|
86
82
|
keyless: false,
|
|
87
|
-
keyHint: "Free key from aistudio.google.com (free Google account, no credit card)",
|
|
88
83
|
modelFilter: [
|
|
89
84
|
"gemini-2.5-flash",
|
|
90
85
|
"gemini-2.5-flash-lite",
|
|
@@ -97,21 +92,18 @@ const TEMPLATES: Record<string, {
|
|
|
97
92
|
displayName: "Cerebras",
|
|
98
93
|
baseUrl: "https://api.cerebras.ai/v1",
|
|
99
94
|
keyless: false,
|
|
100
|
-
keyHint: "Free account at cerebras.ai (no credit card)",
|
|
101
95
|
modelFilter: ["qwen3-235b"],
|
|
102
96
|
},
|
|
103
97
|
github_models: {
|
|
104
98
|
displayName: "GitHub Models",
|
|
105
99
|
baseUrl: "https://models.inference.ai.azure.com",
|
|
106
100
|
keyless: false,
|
|
107
|
-
keyHint: "GitHub Personal Access Token (any free GitHub account, no special scopes needed)",
|
|
108
101
|
modelFilter: ["gpt-4o", "openai/gpt-4.1"],
|
|
109
102
|
},
|
|
110
103
|
sambanova: {
|
|
111
104
|
displayName: "SambaNova",
|
|
112
105
|
baseUrl: "https://api.sambanova.ai/v1",
|
|
113
106
|
keyless: false,
|
|
114
|
-
keyHint: "Free account at cloud.sambanova.ai (no credit card)",
|
|
115
107
|
modelFilter: [
|
|
116
108
|
"Meta-Llama-3.3-70B-Instruct",
|
|
117
109
|
"DeepSeek-V3.1",
|
|
@@ -125,7 +117,6 @@ const TEMPLATES: Record<string, {
|
|
|
125
117
|
displayName: "Mistral",
|
|
126
118
|
baseUrl: "https://api.mistral.ai/v1",
|
|
127
119
|
keyless: false,
|
|
128
|
-
keyHint: 'Free "Experiment" tier at console.mistral.ai (no credit card)',
|
|
129
120
|
modelFilter: [
|
|
130
121
|
"mistral-large-latest",
|
|
131
122
|
"mistral-medium-latest",
|
|
@@ -138,7 +129,6 @@ const TEMPLATES: Record<string, {
|
|
|
138
129
|
displayName: "Groq",
|
|
139
130
|
baseUrl: "https://api.groq.com/openai/v1",
|
|
140
131
|
keyless: false,
|
|
141
|
-
keyHint: "Free account at console.groq.com (no credit card)",
|
|
142
132
|
modelFilter: [
|
|
143
133
|
"llama-3.3-70b-versatile",
|
|
144
134
|
"meta-llama/llama-4-scout-17b-16e-instruct",
|
|
@@ -153,7 +143,6 @@ const TEMPLATES: Record<string, {
|
|
|
153
143
|
baseUrl: "https://api.cloudflare.com/client/v4/accounts/YOUR_ACCOUNT_ID/ai/v1",
|
|
154
144
|
keyless: false,
|
|
155
145
|
promptUrl: true,
|
|
156
|
-
keyHint: 'Cloudflare API Token with "Workers AI Read" permission (free account at cloudflare.com)',
|
|
157
146
|
modelFilter: [
|
|
158
147
|
"@cf/meta/llama-3.3-70b-instruct-fp8-fast",
|
|
159
148
|
"@cf/meta/llama-4-scout-17b-16e-instruct",
|
|
@@ -170,14 +159,12 @@ const TEMPLATES: Record<string, {
|
|
|
170
159
|
displayName: "Zhipu (Z.ai / BigModel)",
|
|
171
160
|
baseUrl: "https://open.bigmodel.cn/api/paas/v4",
|
|
172
161
|
keyless: false,
|
|
173
|
-
keyHint: "Free account at open.bigmodel.cn (no credit card)",
|
|
174
162
|
modelFilter: ["glm-4.5-flash", "glm-4.7-flash"],
|
|
175
163
|
},
|
|
176
164
|
cohere: {
|
|
177
165
|
displayName: "Cohere",
|
|
178
166
|
baseUrl: "https://api.cohere.com/compatibility/v1",
|
|
179
167
|
keyless: false,
|
|
180
|
-
keyHint: "Your Cohere API key",
|
|
181
168
|
},
|
|
182
169
|
ollama: {
|
|
183
170
|
displayName: "Ollama (local, keyless)",
|
|
@@ -190,7 +177,6 @@ const TEMPLATES: Record<string, {
|
|
|
190
177
|
baseUrl: "",
|
|
191
178
|
keyless: false,
|
|
192
179
|
promptUrl: true,
|
|
193
|
-
keyHint: "Bearer token or API key (leave blank if keyless)",
|
|
194
180
|
},
|
|
195
181
|
};
|
|
196
182
|
|
|
@@ -400,7 +386,7 @@ export default async function (pi: ExtensionAPI) {
|
|
|
400
386
|
if (!tpl.keyless) {
|
|
401
387
|
const entered = await ctx.ui.input(
|
|
402
388
|
"API Key",
|
|
403
|
-
|
|
389
|
+
"Your API key — leave blank if keyless:",
|
|
404
390
|
""
|
|
405
391
|
);
|
|
406
392
|
if (entered == null) { ctx.ui.notify("Login cancelled.", "info"); return; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@billjr99/pi-openai-compat",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
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",
|