opencode-gpt-imagegen 0.1.13 → 1.0.0

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.
Files changed (3) hide show
  1. package/README.md +54 -21
  2. package/dist/index.js +76 -59
  3. package/package.json +2 -3
package/README.md CHANGED
@@ -1,23 +1,23 @@
1
1
  # opencode-gpt-imagegen
2
2
 
3
+ > **⚠️ ChatGPT subscription users: update before October 14, 2026.** [GPT-5.5 will retire from Codex with ChatGPT sign-in](https://learn.chatgpt.com/docs/models#gpt-55-retirement). Plugin versions before `0.1.13` use GPT-5.5 and will stop generating images. Follow the [update steps](#updating-the-plugin) to install `0.1.13` or later.
4
+
5
+ > **📣 OpenAI API key support is on hold.** This plugin supports only ChatGPT sign-in. If you need API key support, please share your use case in [#120](https://github.com/yuji-hatakeyama/opencode-gpt-imagegen/issues/120).
6
+
3
7
  <p align="center"><img src="./ogp.png" alt="opencode-gpt-imagegen × gpt-image-2" /></p>
4
8
 
5
- > Bring [**ChatGPT Images 2.0**](https://openai.com/index/introducing-chatgpt-images-2-0/) (`gpt-image-2`) to [OpenCode](https://opencode.ai). Use it through your **ChatGPT subscription** (no API costs!) or through the **OpenAI API** — your call.
9
+ > Bring [**ChatGPT Images 2.0**](https://openai.com/index/introducing-chatgpt-images-2-0/) (`gpt-image-2`) to [OpenCode](https://opencode.ai). Use it through your **ChatGPT subscription** (no API costs!).
6
10
 
7
11
  [![OpenCode plugin](https://img.shields.io/badge/OpenCode-plugin-blue.svg)](https://opencode.ai/docs/plugins/)
8
12
  [![npm version](https://img.shields.io/npm/v/opencode-gpt-imagegen.svg)](https://www.npmjs.com/package/opencode-gpt-imagegen)
9
13
  [![CI](https://github.com/yuji-hatakeyama/opencode-gpt-imagegen/actions/workflows/ci.yml/badge.svg)](https://github.com/yuji-hatakeyama/opencode-gpt-imagegen/actions/workflows/ci.yml)
10
14
  [![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
11
15
 
12
- | Auth path | Status | Billing |
13
- |---|---|---|
14
- | **ChatGPT subscription** (OAuth) | **Available now in v0.1.0** | **No extra cost** — comes out of your existing Plus / Pro / Business plan |
15
- | **OpenAI API key** | **Coming soon in v0.2.0** | Pay-per-image against your API credits, with `generate` + `edit` support |
16
-
17
16
  ## Highlights
18
17
 
19
- - **Subscription-friendly.** Generations ride on the same Codex backend channel OpenCode already uses for ChatGPT subscription chat — billed against your ChatGPT plan, not your API credits.
20
- - **Reference images.** Pass any number of input images alongside the prompt for style guidance, edit targets, or compositing inputs.
18
+ - **Subscription-friendly.** Generations ride on the same Codex backend channel OpenCode already uses for ChatGPT subscription chat — billed against your existing ChatGPT Plus, Pro, or Business plan, not your API credits.
19
+ - **Reference images.** Pass up to five input images alongside the prompt for style guidance, edit targets, or compositing inputs.
20
+ - **Transparent backgrounds.** Ask for a transparent background, a cutout, or background removal, and the agent passes `background: "transparent"` to get an RGBA PNG. The cutout edges can be rough, with a faint semi-transparent halo. For a clean cutout, generate the image on a plain background and remove the background yourself.
21
21
 
22
22
  ## Installation
23
23
 
@@ -32,15 +32,26 @@ Add this plugin to your [OpenCode config](https://opencode.ai/docs/plugins/). Fo
32
32
 
33
33
  OpenCode auto-installs the package via Bun on next launch — no separate `npm install` step is needed. The plugin requires OpenCode to be authenticated with ChatGPT.
34
34
 
35
+ ### Updating the plugin
36
+
37
+ OpenCode caches npm plugins, so restarting it may keep an older version. To update this plugin:
38
+
39
+ 1. Check the `plugin` entry in your OpenCode config. Use `"opencode-gpt-imagegen"` or `"opencode-gpt-imagegen@latest"` to request the latest version. If you pinned a version, remove the version suffix or change it to the version you want to install.
40
+ 2. Quit OpenCode completely.
41
+ 3. If your entry is unversioned or uses `@latest`, delete the cached directory `~/.cache/opencode/packages/opencode-gpt-imagegen@latest/`.
42
+ 4. Restart OpenCode to install the requested version.
43
+
44
+ If you use an unversioned entry or `@latest` but do not have that directory, see [OpenCode's cache-clearing instructions](https://opencode.ai/docs/troubleshooting/#clear-the-cache) for other cache layouts.
45
+
35
46
  ## Usage
36
47
 
37
48
  Just ask your agent in natural language and `gpt_imagegen` will be picked up.
38
49
 
39
- The three examples below are the **actual outputs of this repo's e2e test suite** — see [`tests/e2e/subscription.test.ts`](./tests/e2e/subscription.test.ts) for the exact prompts and assertions.
50
+ The four examples below are the **actual prompts and outputs of this repo's e2e test suite** — see [`tests/e2e/gpt_imagegen.test.ts`](./tests/e2e/gpt_imagegen.test.ts) for the assertions. The e2e prompts name the tool and the output path explicitly to keep the test runs predictable. In normal use, you can just describe the image you want.
40
51
 
41
52
  ### Example A — generate
42
53
 
43
- > Draw a man in a navy samue with a red hachimaki, standing in a garden full of cherry blossoms. 90s anime style. Save it as `character.png`, portrait 1024x1536.
54
+ > Use the gpt_imagegen tool to generate an image at character.png. Content: a man wearing a navy-blue samue and a red hachimaki headband, standing in a garden of cherry blossoms in full bloom. Style: hand-drawn 90s Japanese animation style. Size: 1024x1536 (portrait).
44
55
 
45
56
  <p align="center"><img src="./assets/character.png" alt="Example A output: man in samue, portrait" width="320" /></p>
46
57
 
@@ -48,7 +59,7 @@ The three examples below are the **actual outputs of this repo's e2e test suite*
48
59
 
49
60
  `gpt_imagegen` never overwrites an existing file: when the `out` path is already taken, it picks `-v2`, `-v3`, … instead.
50
61
 
51
- > Now do the same path but make it a woman in a yellow yukata holding a red wagasa, in a moonlit garden with fireflies. Landscape 1536x1024.
62
+ > Use the gpt_imagegen tool to generate an image at character.png. Content: a woman wearing a yellow yukata and holding a red wagasa parasol, standing in a garden at night with fireflies dancing around her. Style: hand-drawn 90s Japanese animation style. Size: 1536x1024 (landscape).
52
63
 
53
64
  The previous `character.png` is left untouched; the new image lands at `character-v2.png`.
54
65
 
@@ -56,26 +67,48 @@ The previous `character.png` is left untouched; the new image lands at `characte
56
67
 
57
68
  ### Example C — feed existing image files as input
58
69
 
59
- Pass any number of image paths via the `images` argument and the model uses them as references for the next generation — for style guidance, characters to keep, scenes to extend, and so on.
70
+ Pass up to five image paths via the `images` argument and the model uses them as references for the next generation — for style guidance, characters to keep, scenes to extend, and so on.
60
71
 
61
- > Take `character.png` and `character-v2.png` and put both characters together on the engawa of an old Japanese house, smiling at the viewer. 2048x1152, same 90s anime style.
72
+ > Use the gpt_imagegen tool to generate an image at together.png. Pass ./character.png and ./character-v2.png in the images argument. Content: the man from Image 1 (navy samue + red hachimaki) and the woman from Image 2 (yellow yukata + red wagasa) standing side by side on the engawa veranda of an old Japanese house, smiling at the viewer. Preserve each character's outfit, hairstyle, and props exactly. Style: hand-drawn 90s Japanese animation style. Size: 1672x941.
62
73
 
63
74
  <p align="center"><img src="./assets/together.png" alt="Example C output: both characters composed onto an engawa" width="640" /></p>
64
75
 
65
- ## Roadmap
76
+ ### Example D — transparent background
77
+
78
+ Ask for a transparent background, and the agent passes `background: "transparent"` to get an RGBA PNG.
79
+
80
+ > Use the gpt_imagegen tool to generate an image at sticker.png. Content: a sticker of a red paper lantern with a transparent background. Style: hand-drawn 90s Japanese animation style. Size: 1254x1254.
66
81
 
67
- | Version | Auth path | Scope | Status |
68
- |---|---|---|---|
69
- | **v0.1.0** | ChatGPT subscription | `gpt_imagegen` with optional reference images (generation + reference-guided edits via prompting) | **Released** |
70
- | **v0.2.0** | OpenAI API key | Adds the API-key billing path: both `generate` (`/v1/images/generations`) and `edit` (`/v1/images/edits`) with reference images | Next |
71
- | **v0.3.0** | OpenAI API key | Adds **pixel-precise mask inpainting** via `/v1/images/edits` (binary PNG alpha mask) | Planned |
82
+ <p align="center"><img src="./assets/sticker.png" alt="Example D output: red paper lantern sticker with a transparent background" width="320" /></p>
83
+
84
+ ### Sizes
85
+
86
+ `gpt_imagegen` generates only these sizes: `1254x1254` (1:1), `1536x1024` (3:2), `1024x1536` (2:3), `1448x1086` (4:3), `1086x1448` (3:4), `1672x941` (16:9), and `941x1672` (9:16).
87
+
88
+ The Codex image backend does not take pixel dimensions. It always generates about 1.57 megapixels and takes only the aspect ratio from the prompt. These sizes are common aspect ratios at that pixel count, so the backend produces them as requested. The output can still differ from the requested size by 1px ([#107](https://github.com/yuji-hatakeyama/opencode-gpt-imagegen/issues/107#issuecomment-6020015062)).
89
+
90
+ If you ask for an unsupported size, the tool instructs the agent to ask you which supported size to use. The agent also asks when you give no size and the request does not imply a shape. When the request implies a shape, such as a YouTube thumbnail or an app icon, the agent picks the matching size without asking. To get another exact size, resize or crop the output afterwards, for example with ImageMagick.
72
91
 
73
92
  ## How it works
74
93
 
75
- OpenCode already talks to the OpenAI Codex backend to power ChatGPT subscription chat. This plugin reuses that same endpoint, attaching the hosted `image_generation` tool to a single-turn request, then writes the returned PNG to disk. Auth is read from OpenCode's standard `auth.json`; no new credential surface is introduced.
94
+ OpenCode already talks to the OpenAI Codex backend to power ChatGPT subscription chat. This plugin calls the image generation endpoints of that backend (`images/generations`, or `images/edits` when reference images are given), the same endpoints the Codex CLI uses, and writes the returned PNG to disk. Auth is read from OpenCode's standard `auth.json`; no new credential surface is introduced.
95
+
96
+ ## Contributing
97
+
98
+ Small bug fixes are welcome as direct pull requests. For features, refactors, or behavior changes, please open an issue first. See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
76
99
 
77
100
  ## Disclaimer
78
101
 
79
102
  This is an **unofficial, third-party** plugin, not affiliated with or endorsed by OpenAI or OpenCode.
80
103
 
81
- It uses the same Codex backend endpoint OpenCode itself calls for ChatGPT subscription chat — this plugin just adds the hosted `image_generation` tool to that conversation. Use must comply with OpenAI's [Terms of Use](https://openai.com/policies/row-terms-of-use/) and [Usage Policies](https://openai.com/policies/usage-policies/).
104
+ It calls the same Codex backend that OpenCode itself uses for ChatGPT subscription chat, through the image generation endpoints that the Codex CLI uses. Use must comply with OpenAI's [Terms of Use](https://openai.com/policies/row-terms-of-use/) and [Usage Policies](https://openai.com/policies/usage-policies/).
105
+
106
+ ## Star History
107
+
108
+ <a href="https://www.star-history.com/?repos=yuji-hatakeyama%2Fopencode-gpt-imagegen&type=date&legend=bottom-right">
109
+ <picture>
110
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=yuji-hatakeyama/opencode-gpt-imagegen&type=date&theme=dark&legend=bottom-right" />
111
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=yuji-hatakeyama/opencode-gpt-imagegen&type=date&legend=bottom-right" />
112
+ <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=yuji-hatakeyama/opencode-gpt-imagegen&type=date&legend=bottom-right" />
113
+ </picture>
114
+ </a>
package/dist/index.js CHANGED
@@ -28,61 +28,53 @@ async function loadOpenAIAuth() {
28
28
  return;
29
29
  }
30
30
 
31
- // src/codex.ts
32
- import { EventSourceParserStream } from "eventsource-parser/stream";
33
- var CODEX_RESPONSES_ENDPOINT = "https://chatgpt.com/backend-api/codex/responses";
34
- var SUBSCRIPTION_MODEL = "gpt-6-sol";
35
- async function parseImageGenerationResultFromSSE(stream) {
36
- const events = stream.pipeThrough(new TextDecoderStream).pipeThrough(new EventSourceParserStream);
37
- for await (const event of events) {
38
- if (event.data === "[DONE]")
39
- continue;
40
- try {
41
- const json = JSON.parse(event.data);
42
- if (json.type === "response.output_item.done" && json.item?.type === "image_generation_call" && typeof json.item.result === "string" && json.item.result.length > 0) {
43
- return json.item.result;
44
- }
45
- } catch {}
46
- }
47
- throw new Error("no image_generation result returned by codex backend");
31
+ // src/size.ts
32
+ var IMAGE_SIZES = {
33
+ "1254x1254": "1:1",
34
+ "1536x1024": "3:2",
35
+ "1024x1536": "2:3",
36
+ "1448x1086": "4:3",
37
+ "1086x1448": "3:4",
38
+ "1672x941": "16:9",
39
+ "941x1672": "9:16"
40
+ };
41
+ var SIZE_CHOICES = Object.entries(IMAGE_SIZES).map(([size, aspectRatio]) => `${size} (${aspectRatio})`).join(", ");
42
+ function appendSizeToPrompt(prompt, size) {
43
+ const [width, height] = size.split("x");
44
+ return `${prompt} Generate the image with a width of ${width} pixels and a height of ${height} pixels (${IMAGE_SIZES[size]} aspect ratio).`;
48
45
  }
49
- async function callViaCodexResponses(auth, args, inputImageDataUrls) {
50
- const userContent = [{ type: "input_text", text: args.prompt }];
51
- for (const dataUrl of inputImageDataUrls) {
52
- userContent.push({ type: "input_image", image_url: dataUrl });
53
- }
46
+
47
+ // src/codex.ts
48
+ var CODEX_IMAGES_GENERATIONS_ENDPOINT = "https://chatgpt.com/backend-api/codex/images/generations";
49
+ var CODEX_IMAGES_EDITS_ENDPOINT = "https://chatgpt.com/backend-api/codex/images/edits";
50
+ var CODEX_REQUEST_DEFAULTS = { model: "gpt-image-2", quality: "auto", size: "auto" };
51
+ async function callViaCodexImages(auth, args, inputImageDataUrls) {
52
+ const isEdit = inputImageDataUrls.length > 0;
54
53
  const body = {
55
- model: SUBSCRIPTION_MODEL,
56
- instructions: "You are an image generation assistant running inside the Codex backend. " + "Always satisfy the request by invoking the image_generation tool exactly once. " + "Do not respond with text only.",
57
- input: [{ role: "user", content: userContent }],
58
- tools: [
59
- {
60
- type: "image_generation",
61
- output_format: "png",
62
- quality: args.quality,
63
- ...args.size ? { size: args.size } : {}
64
- }
65
- ],
66
- tool_choice: { type: "image_generation" },
67
- stream: true,
68
- store: false
54
+ prompt: appendSizeToPrompt(args.prompt, args.size),
55
+ ...CODEX_REQUEST_DEFAULTS,
56
+ background: args.background ?? "opaque",
57
+ ...isEdit ? { images: inputImageDataUrls.map((dataUrl) => ({ image_url: dataUrl })) } : {}
69
58
  };
70
- const res = await fetch(CODEX_RESPONSES_ENDPOINT, {
59
+ const res = await fetch(isEdit ? CODEX_IMAGES_EDITS_ENDPOINT : CODEX_IMAGES_GENERATIONS_ENDPOINT, {
71
60
  method: "POST",
72
61
  headers: {
73
62
  "Content-Type": "application/json",
74
63
  Authorization: `Bearer ${auth.access}`,
75
64
  ...auth.accountId ? { "ChatGPT-Account-Id": auth.accountId } : {},
76
- originator: "opencode",
77
- Accept: "text/event-stream"
65
+ originator: "opencode"
78
66
  },
79
67
  body: JSON.stringify(body)
80
68
  });
81
- if (!res.ok || !res.body) {
69
+ if (!res.ok) {
82
70
  const detail = await res.text().catch(() => "");
83
- throw new Error(`codex responses request failed: ${res.status} ${detail.slice(0, 500)}`);
71
+ throw new Error(`codex images request failed: ${res.status} ${detail.slice(0, 500)}`);
72
+ }
73
+ const image = (await res.json()).data?.[0]?.b64_json;
74
+ if (!image) {
75
+ throw new Error("no image returned by codex images endpoint");
84
76
  }
85
- return parseImageGenerationResultFromSSE(res.body);
77
+ return image;
86
78
  }
87
79
 
88
80
  // src/input-image.ts
@@ -127,56 +119,81 @@ async function pickNonOverwritePath(requested, maxVersion = MAX_OUTPUT_VERSION_S
127
119
  }
128
120
  throw new Error(`could not find a non-conflicting filename under ${dir}/${stem}-vN${ext} (tried up to v${maxVersion})`);
129
121
  }
130
- function buildSavedMessage(savedPath, requestedPath) {
122
+ function readPngSize(png) {
123
+ return { width: png.readUInt32BE(16), height: png.readUInt32BE(20) };
124
+ }
125
+ function buildSavedMessage(savedPath, requestedPath, size) {
131
126
  const versionNote = savedPath !== requestedPath ? ` (the requested path ${requestedPath} already existed; the new image was versioned to avoid overwriting it)` : "";
132
- return `Generated image saved to ${savedPath}${versionNote}.`;
127
+ return `Generated image saved to ${savedPath}${versionNote}. The image is ${size.width}x${size.height} pixels.`;
133
128
  }
134
129
  async function saveGeneratedImage(out, ctxDir, base64) {
135
130
  const requestedPath = path3.isAbsolute(out) ? out : path3.resolve(ctxDir, out);
136
131
  await fs3.mkdir(path3.dirname(requestedPath), { recursive: true });
137
132
  const savedPath = await pickNonOverwritePath(requestedPath);
138
- await fs3.writeFile(savedPath, Buffer.from(base64, "base64"));
133
+ const png = Buffer.from(base64, "base64");
134
+ await fs3.writeFile(savedPath, png);
139
135
  return {
140
136
  savedPath,
141
137
  versioned: savedPath !== requestedPath,
142
- message: buildSavedMessage(savedPath, requestedPath)
138
+ message: buildSavedMessage(savedPath, requestedPath, readPngSize(png))
143
139
  };
144
140
  }
145
141
 
146
142
  // src/index.ts
143
+ var argsShape = {
144
+ prompt: tool.schema.string().describe("Description of the image to generate."),
145
+ out: tool.schema.string().describe("Output file path, relative to the project directory unless absolute. The plugin writes a PNG."),
146
+ size: tool.schema.enum(Object.keys(IMAGE_SIZES), {
147
+ error: (issue) => issue.input == null ? `Missing size. Use one of: ${SIZE_CHOICES}.` : `Unsupported size "${issue.input}". Use one of: ${SIZE_CHOICES}.`
148
+ }).describe([
149
+ `Output size. Only these sizes can be generated: ${SIZE_CHOICES}.`,
150
+ "Typical choices: 1672x941 for a 16:9 video thumbnail, 1254x1254 for a square icon, 941x1672 for a phone wallpaper."
151
+ ].join(" ")),
152
+ images: tool.schema.array(tool.schema.string()).max(5).nullish().describe("Optional reference image paths, up to 5, relative to the project directory unless absolute."),
153
+ background: tool.schema.enum(["opaque", "transparent"]).nullish().describe([
154
+ "Optional background of the output image. Defaults to `opaque`.",
155
+ "Use `transparent` when the request calls for a transparent background, including background removal or a cutout.",
156
+ "When editing reference images, preserve their existing transparency unless the user asks to change it."
157
+ ].join(" "))
158
+ };
159
+ var argsSchema = tool.schema.object(argsShape);
147
160
  var GptImagePlugin = async (_input) => {
148
161
  return {
149
162
  tool: {
150
163
  gpt_imagegen: tool({
151
164
  description: [
152
- "Generate raster images using OpenAI's hosted image_generation tool.",
165
+ "Generate raster images through the image generation endpoints of the ChatGPT Codex backend.",
153
166
  "Use for AI-created bitmap visuals such as photos, illustrations, textures, sprites, and mockups.",
154
167
  "Do not use when the task is better handled by editing existing SVG/vector/code-native assets, extending an established icon or logo system, or building the visual directly in HTML/CSS/canvas.",
155
168
  "Reference images may be attached through `images`; label each image's role inline in `prompt`, for example: 'Image 1: reference image'.",
156
169
  "For many distinct assets, invoke gpt_imagegen once per requested asset rather than relying on multi-image output; gpt_imagegen returns one image per call.",
157
- "Requires OpenCode to be authenticated with ChatGPT OAuth. Returns the absolute path of the saved PNG."
170
+ "Requires OpenCode to be authenticated with ChatGPT OAuth. Returns the absolute path of the saved PNG.",
171
+ "Before generating, decide the size. If the user named a size that is not supported, or gave no size and the use does not clearly imply a shape, ask the user which size to use (with the question tool when available).",
172
+ "In that question, offer every supported size as an option labeled like `1672x941 (16:9)`, put the one you recommend first with ` (Recommended)` appended to its label, and give each option a short description of what it suits.",
173
+ "Do not add catch-all options such as 'Other' or 'Let me decide'.",
174
+ "In the question text, say that other sizes cannot be generated directly and that the image can be resized or cropped to an exact size afterwards, for example with ImageMagick.",
175
+ "If the use clearly implies a shape, such as a YouTube thumbnail or an app icon, pick the matching size without asking.",
176
+ "The saved image can differ from the requested size by 1px, so do not promise exact pixel dimensions before generating. After generating, tell the user the size reported in the tool result."
158
177
  ].join(" "),
159
- args: {
160
- prompt: tool.schema.string().describe("Description of the image to generate."),
161
- out: tool.schema.string().describe("Output file path, relative to the project directory unless absolute. The plugin writes a PNG."),
162
- quality: tool.schema.enum(["low", "medium", "high", "auto"]).describe("Generation quality passed to the hosted image_generation tool."),
163
- size: tool.schema.string().optional().describe("Optional image size passed to the hosted image_generation tool. Use `auto` or `WIDTHxHEIGHT`; width and height must be multiples of 16px, max edge <= 3840px, long-to-short ratio <= 3:1, and total pixels between 655,360 and 8,294,400."),
164
- images: tool.schema.array(tool.schema.string()).optional().describe("Optional reference image paths, relative to the project directory unless absolute.")
165
- },
166
- async execute(args, ctx) {
178
+ args: argsShape,
179
+ async execute(rawArgs, ctx) {
180
+ const parsed = argsSchema.safeParse(rawArgs);
181
+ if (!parsed.success) {
182
+ throw new Error(tool.schema.prettifyError(parsed.error));
183
+ }
184
+ const args = parsed.data;
167
185
  const auth = await loadOpenAIAuth();
168
186
  if (!auth) {
169
187
  throw new Error("OpenAI ChatGPT OAuth credentials not configured.");
170
188
  }
171
189
  const inputImageDataUrls = await readReferenceImages(args.images, ctx.directory);
172
- const base64 = await callViaCodexResponses(auth, args, inputImageDataUrls);
190
+ const base64 = await callViaCodexImages(auth, args, inputImageDataUrls);
173
191
  const { savedPath, versioned, message } = await saveGeneratedImage(args.out, ctx.directory, base64);
174
192
  return {
175
193
  output: message,
176
194
  metadata: {
177
195
  out: savedPath,
178
- versioned,
179
- billing: "subscription"
196
+ versioned
180
197
  }
181
198
  };
182
199
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-gpt-imagegen",
3
- "version": "0.1.13",
3
+ "version": "1.0.0",
4
4
  "description": "OpenCode plugin for GPT Image 2 generation through your ChatGPT subscription, with reference images and safe PNG output.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -20,7 +20,7 @@
20
20
  "prebuild": "rm -rf dist",
21
21
  "build": "bun build ./src/index.ts --outdir ./dist --target node --format esm --packages external",
22
22
  "test": "bun test tests/unit",
23
- "test:e2e_subscription": "OPENCODE_MODEL=openai/gpt-5.5 bun test tests/e2e/subscription.test.ts",
23
+ "test:e2e": "OPENCODE_MODEL=openai/gpt-6-sol bun test tests/e2e/gpt_imagegen.test.ts",
24
24
  "prepublishOnly": "bun run build",
25
25
  "release:patch": "bash scripts/prepare-release.sh patch && git push --follow-tags",
26
26
  "release:minor": "bash scripts/prepare-release.sh minor && git push --follow-tags",
@@ -63,7 +63,6 @@
63
63
  "typescript": "^7.0.2"
64
64
  },
65
65
  "dependencies": {
66
- "eventsource-parser": "^4.0.0",
67
66
  "file-type": "^22.0.1",
68
67
  "xdg-basedir": "^5.1.0"
69
68
  }