Default edit_image to gpt-image-2.5-sunburst for better identity preservation
This commit is contained in:
@@ -29,7 +29,8 @@ All settings are optional. Defaults work with the goriteches gateway.
|
||||
|---|---|---|
|
||||
| `GORITECHES_BASE_URL` | `https://api.goriteches.com/v1` | API base URL |
|
||||
| `GORITECHES_API_KEY` | — | API key. Falls back to the `goriteches` provider key in `~/.pi/agent/models.json` |
|
||||
| `GORITECHES_IMAGE_MODEL` | `gpt-image-2.5-flare` | Image generation/edit model |
|
||||
| `GORITECHES_IMAGE_MODEL` | `gpt-image-2.5-flare` | Image generation model |
|
||||
| `GORITECHES_EDIT_IMAGE_MODEL` | `gpt-image-2.5-sunburst` | Image edit model |
|
||||
| `GORITECHES_VIDEO_MODEL` | `grok-imagine-video-1.5` | Video generation model |
|
||||
| `GORITECHES_OUTPUT_DIR` | `<cwd>/goritech-media` | Output directory for generated files |
|
||||
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
* Configuration (all optional if using defaults):
|
||||
* GORITECHES_BASE_URL API base URL (default: https://api.goriteches.com/v1)
|
||||
* GORITECHES_API_KEY API key; falls back to "goriteches" provider in ~/.pi/agent/models.json
|
||||
* GORITECHES_IMAGE_MODEL default image model (default: gpt-image-2.5-flare)
|
||||
* GORITECHES_IMAGE_MODEL default image generation model (default: gpt-image-2.5-flare)
|
||||
* GORITECHES_EDIT_IMAGE_MODEL default image edit model (default: gpt-image-2.5-sunburst)
|
||||
* GORITECHES_VIDEO_MODEL default video model (default: grok-imagine-video-1.5)
|
||||
*
|
||||
* Generated files are written to ./goritech-media/ under the current working directory.
|
||||
@@ -32,6 +33,7 @@ const execFileAsync = promisify(execFile);
|
||||
|
||||
const BASE_URL = process.env.GORITECHES_BASE_URL ?? "https://api.goriteches.com/v1";
|
||||
const IMAGE_MODEL = process.env.GORITECHES_IMAGE_MODEL ?? "gpt-image-2.5-flare";
|
||||
const EDIT_IMAGE_MODEL = process.env.GORITECHES_EDIT_IMAGE_MODEL ?? "gpt-image-2.5-sunburst";
|
||||
const VIDEO_MODEL = process.env.GORITECHES_VIDEO_MODEL ?? "grok-imagine-video-1.5";
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -291,7 +293,7 @@ export default function goritechMedia(pi: ExtensionAPI) {
|
||||
pi.registerTool({
|
||||
name: "edit_image",
|
||||
label: "Edit Image",
|
||||
description: `Edit or transform an existing image using ${IMAGE_MODEL} via the goriteches gateway (image-to-image / inpainting-style editing). Accepts one or more source images (local path, http(s) URL, or data URI) plus a text instruction describing the change. Returns the saved PNG file path. Use this whenever the user asks to modify, restyle, recolor, add/remove elements, or otherwise edit an existing image.`,
|
||||
description: `Edit or transform an existing image using ${EDIT_IMAGE_MODEL} via the goriteches gateway (image-to-image / inpainting-style editing). Accepts one or more source images (local path, http(s) URL, or data URI) plus a text instruction describing the change. Returns the saved PNG file path. Use this whenever the user asks to modify, restyle, recolor, add/remove elements, or otherwise edit an existing image.`,
|
||||
parameters: Type.Object({
|
||||
image: Type.String({ description: "Source image: local file path (png/jpg/webp/gif), http(s) URL, or data URI" }),
|
||||
prompt: Type.String({ description: "Text instruction describing the edit, e.g. 'change the circle to blue', 'add a party hat', 'make it watercolor style'" }),
|
||||
@@ -306,7 +308,7 @@ export default function goritechMedia(pi: ExtensionAPI) {
|
||||
const images = [params.image, ...(params.extra_images ?? [])].map((src) => ({ image_url: toImageUrl(src) }));
|
||||
|
||||
const result = await apiPost("/images/edits", {
|
||||
model: IMAGE_MODEL,
|
||||
model: EDIT_IMAGE_MODEL,
|
||||
prompt: params.prompt,
|
||||
images,
|
||||
});
|
||||
@@ -324,11 +326,11 @@ export default function goritechMedia(pi: ExtensionAPI) {
|
||||
content: [
|
||||
{
|
||||
type: "text",
|
||||
text: `Edited image saved to: ${filePath}\nModel: ${IMAGE_MODEL} | Source: ${params.image} | Edit: ${params.prompt}`,
|
||||
text: `Edited image saved to: ${filePath}\nModel: ${EDIT_IMAGE_MODEL} | Source: ${params.image} | Edit: ${params.prompt}`,
|
||||
},
|
||||
{ type: "image", data: item.b64_json, mimeType: "image/png" },
|
||||
],
|
||||
details: { path: filePath, prompt: params.prompt, source: params.image, model: IMAGE_MODEL },
|
||||
details: { path: filePath, prompt: params.prompt, source: params.image, model: EDIT_IMAGE_MODEL },
|
||||
};
|
||||
},
|
||||
|
||||
@@ -555,7 +557,7 @@ export default function goritechMedia(pi: ExtensionAPI) {
|
||||
`goritech-media extension`,
|
||||
`Base URL: ${BASE_URL}`,
|
||||
`API key: ${keySource}`,
|
||||
`Image model: ${IMAGE_MODEL}`,
|
||||
`Image model: ${IMAGE_MODEL} (gen) / ${EDIT_IMAGE_MODEL} (edit)`,
|
||||
`Video model: ${VIDEO_MODEL}`,
|
||||
`Output dir: ${sessionOutputDir ?? process.env.GORITECHES_OUTPUT_DIR ?? "<cwd>/goritech-media"}${sessionOutputDir ? " (session)" : ""}`,
|
||||
``,
|
||||
|
||||
Reference in New Issue
Block a user