@monotykamary/pi-better-openai 0.1.39 → 0.1.40
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 -2
- package/package.json +2 -2
- package/src/config.ts +5 -3
package/README.md
CHANGED
|
@@ -89,7 +89,7 @@ Example config:
|
|
|
89
89
|
},
|
|
90
90
|
"image": {
|
|
91
91
|
"enabled": true,
|
|
92
|
-
"defaultModel": "gpt-image-2",
|
|
92
|
+
"defaultModel": "gpt-image-2.5",
|
|
93
93
|
"defaultSave": "project",
|
|
94
94
|
"outputFormat": "png",
|
|
95
95
|
"timeoutMs": 180000
|
|
@@ -147,7 +147,7 @@ Agents can call the `openai_image` tool directly. Supported parameters:
|
|
|
147
147
|
- `prompt` (required): pass the user's image wording verbatim.
|
|
148
148
|
- `action`: `auto`, `generate`, or `edit`. `auto` uses the edit endpoint when `images` are supplied; explicit `edit` requires images, while explicit `generate` does not accept them.
|
|
149
149
|
- `images`: up to five distinct project-local reference/edit image paths. Paths must stay inside the current workspace and point to readable PNG, JPEG, WebP, or GIF files; each file is limited to 20 MB and the combined input to 50 MB.
|
|
150
|
-
- `model`: GPT Image model override for the standalone Codex Images API, for example `gpt-image-2`.
|
|
150
|
+
- `model`: GPT Image model override for the standalone Codex Images API, for example `gpt-image-2.5` or `gpt-image-2`. Values outside the `gpt-image-` family, including legacy Responses chat models, are replaced with the configured default image model.
|
|
151
151
|
- `outputFormat`: `png`, `jpeg`, or `webp`. Codex returns PNG and the extension converts other formats locally.
|
|
152
152
|
- `save`: `project`, `global`, `custom`, or `none`.
|
|
153
153
|
- `saveDir`: required for `save: "custom"` unless `PI_IMAGE_SAVE_DIR` is set.
|
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.40",
|
|
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",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"https-proxy-agent": "9.1.0",
|
|
59
59
|
"proxy-from-env": "2.1.0",
|
|
60
|
-
"sharp": "0.35.
|
|
60
|
+
"sharp": "0.35.4",
|
|
61
61
|
"undici": "8.10.0",
|
|
62
62
|
"ws": "8.21.2"
|
|
63
63
|
},
|
package/src/config.ts
CHANGED
|
@@ -146,7 +146,9 @@ export const DEFAULT_FOOTER_CONFIG: Required<FooterConfig> = {
|
|
|
146
146
|
mode: "replace",
|
|
147
147
|
};
|
|
148
148
|
|
|
149
|
-
export const
|
|
149
|
+
export const IMAGE_MODEL_CHOICES = ["gpt-image-2.5", "gpt-image-2"] as const;
|
|
150
|
+
|
|
151
|
+
export const DEFAULT_IMAGE_MODEL = "gpt-image-2.5";
|
|
150
152
|
|
|
151
153
|
export const DEFAULT_IMAGE_CONFIG: Required<ImageConfig> = {
|
|
152
154
|
enabled: true,
|
|
@@ -313,7 +315,7 @@ export const IMAGE_SETTING_DESCRIPTORS: readonly SettingsOptionDescriptor[] = [
|
|
|
313
315
|
key: "defaultModel",
|
|
314
316
|
label: "Image model",
|
|
315
317
|
currentValue: (cfg) => cfg.image.defaultModel,
|
|
316
|
-
values:
|
|
318
|
+
values: IMAGE_MODEL_CHOICES,
|
|
317
319
|
description: "GPT Image model used by the standalone Codex Images API.",
|
|
318
320
|
parse: stringSetting,
|
|
319
321
|
},
|
|
@@ -606,7 +608,7 @@ export function readRawConfig(path: string): Record<string, unknown> {
|
|
|
606
608
|
export function normalizeImageModel(value: string): string {
|
|
607
609
|
const trimmed = value.trim();
|
|
608
610
|
const model = trimmed.includes("/") ? trimmed.split("/").pop() || trimmed : trimmed;
|
|
609
|
-
return model.startsWith("gpt-
|
|
611
|
+
return model.startsWith("gpt-image-") ? model : DEFAULT_IMAGE_MODEL;
|
|
610
612
|
}
|
|
611
613
|
|
|
612
614
|
export function readConfig(path: string): ConfigFile | undefined {
|