Skip to content

Commit d1ee647

Browse files
committed
feat: update OpenRouter model handling and enhance documentation
1 parent 5f3d66c commit d1ee647

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

skills/nano-banana-pro-openrouter/SKILL.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: nano-banana-pro-openrouter
3-
description: 'Generate or edit images via OpenRouter with the Gemini 3 Pro Image model. Use for prompt-only image generation, image edits, and multi-image compositing; supports 1K/2K/4K output.'
3+
description: 'Generate or edit images via OpenRouter image generation models (default: google/gemini-3-pro-image-preview). Use for prompt-only image generation, image edits, and multi-image compositing; supports 1K/2K/4K output.'
44
metadata:
55
emoji: 🍌
66
requires:
@@ -16,7 +16,7 @@ metadata:
1616

1717
## Overview
1818

19-
Generate or edit images with OpenRouter using the `google/gemini-3-pro-image-preview` model. Support prompt-only generation, single-image edits, and multi-image composition.
19+
Generate or edit images with OpenRouter using `google/gemini-3-pro-image-preview` as the default model. It supports prompt-only generation, single-image edits, and multi-image composition.
2020

2121
### Prompt-only generation
2222

@@ -50,6 +50,11 @@ uv run {baseDir}/scripts/generate_image.py \
5050
- Use `--resolution` with `1K`, `2K`, or `4K`.
5151
- Default is `1K` if not specified.
5252

53+
## Model selection
54+
55+
- Use `--model <name>` only to override the default.
56+
- Default model is `google/gemini-3-pro-image-preview`.
57+
5358
## System prompt customization
5459

5560
The skill reads an optional system prompt from `assets/SYSTEM_TEMPLATE`. This allows you to customize the image generation behavior without modifying code.

skills/nano-banana-pro-openrouter/scripts/generate_image.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020

2121
# Configuration
22+
DEFAULT_MODEL = "google/gemini-3-pro-image-preview"
2223
MAX_INPUT_IMAGES = 3
2324
MIME_TO_EXT = {
2425
"image/png": ".png",
@@ -45,6 +46,11 @@ def parse_args():
4546
default=[],
4647
help=f"Optional input image path (repeatable, max {MAX_INPUT_IMAGES}).",
4748
)
49+
parser.add_argument(
50+
"--model",
51+
default=DEFAULT_MODEL,
52+
help=f"OpenRouter model to use. Defaults to {DEFAULT_MODEL}.",
53+
)
4854
return parser.parse_args()
4955

5056

@@ -150,7 +156,7 @@ def main():
150156
})
151157

152158
response = client.chat.completions.create(
153-
model="google/gemini-3-pro-image-preview",
159+
model=args.model,
154160
messages=messages,
155161
extra_body={
156162
"modalities": ["image", "text"],

0 commit comments

Comments
 (0)