@monotykamary/pi-better-openai 0.1.37 → 0.1.39
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/package.json +6 -6
- package/src/codex-models.ts +7 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monotykamary/pi-better-openai",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.39",
|
|
4
4
|
"description": "Improve OpenAI in pi with fast mode, usage stats, realtime voice, image generation, and footer polish.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fast",
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"ws": "8.21.2"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@earendil-works/pi-ai": "0.85.
|
|
66
|
-
"@earendil-works/pi-coding-agent": "0.85.
|
|
67
|
-
"@earendil-works/pi-tui": "0.85.
|
|
65
|
+
"@earendil-works/pi-ai": "0.85.1",
|
|
66
|
+
"@earendil-works/pi-coding-agent": "0.85.1",
|
|
67
|
+
"@earendil-works/pi-tui": "0.85.1",
|
|
68
68
|
"@types/node": "~22.19.0",
|
|
69
69
|
"@types/proxy-from-env": "1.0.4",
|
|
70
70
|
"@types/ws": "8.18.1",
|
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
"@oh-my-pi/pi-natives-win32-x64": "17.2.9"
|
|
87
87
|
},
|
|
88
88
|
"overrides": {
|
|
89
|
-
"@earendil-works/pi-agent-core": "0.85.
|
|
90
|
-
"@earendil-works/pi-ai": "0.85.
|
|
89
|
+
"@earendil-works/pi-agent-core": "0.85.1",
|
|
90
|
+
"@earendil-works/pi-ai": "0.85.1",
|
|
91
91
|
"brace-expansion": "5.0.9",
|
|
92
92
|
"nanoid": "3.3.18",
|
|
93
93
|
"postcss": "8.5.25",
|
package/src/codex-models.ts
CHANGED
|
@@ -4,8 +4,7 @@ import {
|
|
|
4
4
|
type Provider,
|
|
5
5
|
type RefreshModelsContext,
|
|
6
6
|
} from "@earendil-works/pi-ai";
|
|
7
|
-
import {
|
|
8
|
-
import { openaiCodexProvider } from "@earendil-works/pi-ai/providers/openai-codex";
|
|
7
|
+
import { builtinProviders } from "@earendil-works/pi-ai/providers/all";
|
|
9
8
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
10
9
|
|
|
11
10
|
const CODEX_API = "openai-codex-responses" as const;
|
|
@@ -184,7 +183,11 @@ async function fetchCodexModels(
|
|
|
184
183
|
export function createOpenAICodexProvider(
|
|
185
184
|
options: CreateCodexProviderOptions = {},
|
|
186
185
|
): Provider<typeof CODEX_API> {
|
|
187
|
-
|
|
186
|
+
// Use the loader-supported aggregate export and retain the host's native transport.
|
|
187
|
+
const builtIn = builtinProviders().find(
|
|
188
|
+
(provider): provider is Provider<typeof CODEX_API> => provider.id === CODEX_PROVIDER_ID,
|
|
189
|
+
);
|
|
190
|
+
if (!builtIn) throw new Error("The pi host does not provide OpenAI Codex");
|
|
188
191
|
return createProvider({
|
|
189
192
|
id: builtIn.id,
|
|
190
193
|
name: builtIn.name,
|
|
@@ -194,7 +197,7 @@ export function createOpenAICodexProvider(
|
|
|
194
197
|
models: appendMissingCodexModels(builtIn.getModels()),
|
|
195
198
|
fetchModels: (context) => fetchCodexModels(context, options),
|
|
196
199
|
filterModels: builtIn.filterModels,
|
|
197
|
-
api:
|
|
200
|
+
api: builtIn,
|
|
198
201
|
});
|
|
199
202
|
}
|
|
200
203
|
|