@billjr99/pi-openai-compat 1.1.21 → 1.1.22
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 +11 -3
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -29,6 +29,8 @@ interface CachedModel {
|
|
|
29
29
|
id: string;
|
|
30
30
|
contextWindow?: number;
|
|
31
31
|
maxTokens?: number;
|
|
32
|
+
reasoning?: boolean;
|
|
33
|
+
input?: string[];
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
interface ProviderConfig {
|
|
@@ -551,7 +553,13 @@ async function fetchModels(
|
|
|
551
553
|
typeof rawId === "string" ? rawId :
|
|
552
554
|
typeof rawId === "number" ? String(rawId) :
|
|
553
555
|
"";
|
|
554
|
-
return {
|
|
556
|
+
return {
|
|
557
|
+
id,
|
|
558
|
+
contextWindow: m.context_window,
|
|
559
|
+
maxTokens: m.max_tokens,
|
|
560
|
+
reasoning: m.reasoning,
|
|
561
|
+
input: m.input,
|
|
562
|
+
};
|
|
555
563
|
})
|
|
556
564
|
.filter((m) => Boolean(m.id))
|
|
557
565
|
.sort((a, b) => a.id.localeCompare(b.id));
|
|
@@ -567,8 +575,8 @@ function buildProviderModels(models: CachedModel[]) {
|
|
|
567
575
|
return {
|
|
568
576
|
id,
|
|
569
577
|
name: id,
|
|
570
|
-
reasoning: false,
|
|
571
|
-
input: ["text"] as string[],
|
|
578
|
+
reasoning: m.reasoning ?? false,
|
|
579
|
+
input: m.input ?? (["text"] as string[]),
|
|
572
580
|
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
573
581
|
contextWindow: m.contextWindow ?? 128_000,
|
|
574
582
|
maxTokens: m.maxTokens ?? 4_096,
|
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.22",
|
|
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",
|