
Security News
RubyGems Adds Cooldown Feature to Bundler for Newly Published Gems
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.
pi-codex-image-tool
Advanced tools
Pi extension exposing a gpt-5.5+ image generation tool backed by gpt-image-2.
Pi extension that exposes a codex_image wrapper tool for gpt-5.5+ models. The wrapper lets Pi ask Codex/GPT-5.5 to use its native hosted image-generation capability and save the streamed image bytes to disk.
GitHub link: https://github.com/ross-jill-ws/pi-codex-image-tool
GPT-5.5+ can generate images through its own API-side hosted tool. This is not a normal Pi function tool named generate_image; the request must include OpenAI/Codex's native tool shape:
{
"tools": [
{
"type": "image_generation",
"model": "gpt-image-2",
"size": "1024x1024"
}
],
"tool_choice": { "type": "image_generation" }
}
This extension registers a Pi wrapper tool named codex_image. When GPT-5.5 calls that wrapper, the wrapper sends a separate request to the current GPT-5.5/Codex model using only the native image_generation hosted tool above, parses the streamed response, and writes the image to disk.
OPENAI_API_KEY requiredYou do not need to set OPENAI_API_KEY for this extension if you already use Pi with a Codex/ChatGPT subscription.
As long as your current Pi model is gpt-5.5 or another matching gpt-5.x model where x >= 5, the extension uses Pi's existing model auth/session. In other words, your existing Codex subscription is enough.
Switch Pi to a matching model such as gpt-5.5, then ask naturally:
Generate an image of an orange cat sitting by a window
If you have other image tools installed, such as Nano Banana, be explicit:
Generate an image of an orange cat sitting by a window using codex_image tool
You can also specify a save location:
Generate an image of a panda using codex_image tool and save it to ./panda-images
Mention the image size in the prompt with widthxheight, for example:
Generate an image of a futuristic city using codex_image tool at 1024x1536
Size notes:
1024.16.1024x1536, 1536x1024, 1088x1440.Tool result in Pi:

Generated image:

This repository is a Pi package. Its package.json contains:
keywords: ["pi-package", ...] for Pi package discoverabilitypeerDependencies for Pi-provided runtime packagespi.extensions manifest pointing to extensions/index.ts{
"pi": {
"extensions": ["extensions/index.ts"]
}
}
codex_image toolThe extension exposes the codex_image Pi wrapper tool only when Pi's current model matches gpt-5.x with x >= 5 (for example gpt-5.5 or gpt-5.10). It syncs this on session start and whenever the user switches models. For any other model, the wrapper is removed from the active tool list so it does not appear in the LLM prompt.
The OpenAI/Codex API request does not define a generate_image function tool. It only sends the native hosted image tool as type: "image_generation".
Tool parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | yes | Detailed prompt describing the image to generate |
size | enum | yes | Image size requested from gpt-image-2 |
target-path | string | yes | Directory where streamed image data is saved. Defaults to /tmp/pi-codex-image-tool |
Fixed API tool settings:
type: image_generationmodel: gpt-image-2The extension parses streamed SSE data: events, including partial_image_b64 / result image payloads, and saves the first image payload to target-path as soon as it arrives. The generated image is also returned inline to Pi.
From this repository:
bun install
pi -e .
Or install it globally from npm:
pi install npm:pi-codex-image-tool
For project-local installation in another repo, run:
pi install -l npm:pi-codex-image-tool
Start Pi with the extension loaded, switch to a matching model such as gpt-5.5, then prompt:
Generate an image of a tiny robot painting a sunset using codex_image tool at 1024x1536 and save it under /tmp/pi-images
The agent should call codex_image, then return the generated image and saved file path.
This scaffold was initialized with Bun:
bun init -y
Useful commands:
bun install
bun run check
gpt-5.5+Pi extensions run with your full system permissions. Review extension source before installing or sharing.
MIT
FAQs
Pi extension exposing a gpt-5.5+ image generation tool backed by gpt-image-2.
The npm package pi-codex-image-tool receives a total of 23 weekly downloads. As such, pi-codex-image-tool popularity was classified as not popular.
We found that pi-codex-image-tool demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.