opencode-gpt-imagegen 1.2.1 → 1.2.3

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 (2) hide show
  1. package/README.md +14 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # opencode-gpt-imagegen
2
2
 
3
- > **⚠️ Plugin versions before `0.1.13` no longer generate images.** [GPT-5.5 retired from Codex with ChatGPT sign-in](https://learn.chatgpt.com/docs/models#gpt-55-retirement) on October 14, 2026, and those versions use it. Follow the [update steps](#updating-the-plugin) to install the latest version.
3
+ > **🎉 Starting with `1.2.1`, this plugin supports both OpenCode V1 and V2!** Sorry for the long wait. On V2, sign in to OpenAI with **Codex browser (legacy)** or **Codex device code (legacy)**, because **Sign in with ChatGPT** cannot generate images. See [Installation](#installation) and the [release notes](https://github.com/yuji-hatakeyama/opencode-gpt-imagegen/releases/tag/v1.2.1).
4
4
 
5
5
  > **📣 `1.0.0` changes how `gpt_imagegen` is used.** `size` now accepts only seven fixed sizes, and `quality` is removed. See the [release notes](https://github.com/yuji-hatakeyama/opencode-gpt-imagegen/releases/tag/v1.0.0) for all changes.
6
6
 
@@ -25,13 +25,10 @@
25
25
 
26
26
  The same package supports OpenCode V1 (1.18.29 or newer) and V2 (2.0.0 or newer).
27
27
 
28
- For V2, add this plugin to your [OpenCode config](https://opencode.ai/v2/docs/plugins/):
28
+ For V2, install this plugin with the [OpenCode CLI](https://opencode.ai/v2/docs/plugins/#manage):
29
29
 
30
- ```json
31
- {
32
- "$schema": "https://opencode.ai/config.json",
33
- "plugins": ["opencode-gpt-imagegen"]
34
- }
30
+ ```sh
31
+ opencode plugin add opencode-gpt-imagegen
35
32
  ```
36
33
 
37
34
  For V1, add this plugin to your [OpenCode config](https://opencode.ai/docs/plugins/) with the singular `plugin` field:
@@ -49,7 +46,7 @@ OpenCode installs the package automatically. Unless you use a proxy, sign in to
49
46
 
50
47
  Set `baseURL` if you reach ChatGPT through a gateway rather than signing OpenCode in to ChatGPT yourself, for example a local proxy that holds one or more ChatGPT sign-ins and spreads requests across them. In that setup OpenCode's `auth.json` usually has no ChatGPT sign-in, and calling chatgpt.com directly would bypass the gateway.
51
48
 
52
- On V2, pass options with the package object:
49
+ On V2, pass options with the package object in your [OpenCode config](https://opencode.ai/v2/docs/plugins/#configure):
53
50
 
54
51
  ```json
55
52
  {
@@ -66,6 +63,7 @@ On V1, use the package-and-options tuple:
66
63
  ```
67
64
 
68
65
  With `baseURL` set, the plugin skips authentication lookup and sends the proxy no credentials on both versions. It sends the same requests it would send to ChatGPT, to `<baseURL>/images/generations`, or to `<baseURL>/images/edits` when reference images are given. Your proxy works with this option if it:
66
+
69
67
  - accepts those two `POST` routes without an `Authorization` header;
70
68
  - forwards the JSON body unchanged to the Codex images endpoints (`https://chatgpt.com/backend-api/codex/images/generations` and `/edits`), signed in with a ChatGPT account. The body has `prompt`, `model`, `quality`, `size` and `background`, plus `images` (a list of `{ "image_url": "data:..." }`) for edits;
71
69
  - answers with the backend's JSON, in which `data[0].b64_json` holds the PNG. Any non-2xx status is reported as an error together with the start of the response body.
@@ -74,9 +72,16 @@ The request takes as long as the backend needs to draw the image, often 30 secon
74
72
 
75
73
  ### Updating the plugin
76
74
 
77
- On V2, update an unpinned package with `opencode plugin update opencode-gpt-imagegen`. If you pinned an exact version, update that version in your configuration. See [OpenCode's plugin management guide](https://opencode.ai/v2/docs/plugins/#manage).
75
+ On V2, update this plugin with the OpenCode CLI:
76
+
77
+ ```sh
78
+ opencode plugin update opencode-gpt-imagegen
79
+ ```
80
+
81
+ See [OpenCode's plugin management guide](https://opencode.ai/v2/docs/plugins/#manage).
78
82
 
79
83
  On V1, OpenCode caches npm plugins, so restarting it may keep an older version. To update this plugin:
84
+
80
85
  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.
81
86
  2. Quit OpenCode completely.
82
87
  3. If your entry is unversioned or uses `@latest`, delete the cached directory `~/.cache/opencode/packages/opencode-gpt-imagegen@latest/`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-gpt-imagegen",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
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",