From 82f9c45aa5a5d10d53b157763712c0848a4980bc Mon Sep 17 00:00:00 2001 From: Ace Data Cloud Dev Date: Fri, 9 Oct 2026 01:48:26 +0800 Subject: [PATCH 1/2] feat(nanobanana): expose 2.1 model --- nanobanana/core/types.py | 1 + nanobanana/tools/image_tools.py | 8 ++++---- openai/README.md | 2 +- openai/core/types.py | 1 + openai/tools/info_tools.py | 1 + 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/nanobanana/core/types.py b/nanobanana/core/types.py index a4beb806..1d27ea12 100644 --- a/nanobanana/core/types.py +++ b/nanobanana/core/types.py @@ -13,6 +13,7 @@ "nano-banana", "nano-banana-2-lite", "nano-banana-2", + "nano-banana-2.1", "nano-banana-pro", "nano-banana:official", "nano-banana-2-lite:official", diff --git a/nanobanana/tools/image_tools.py b/nanobanana/tools/image_tools.py index d7428b67..9f5d75b1 100644 --- a/nanobanana/tools/image_tools.py +++ b/nanobanana/tools/image_tools.py @@ -21,7 +21,7 @@ async def nanobanana_generate_image( model: Annotated[ NanoBananaModel, Field( - description="Model to use for generation. 'nano-banana' (default, alias of gemini-2.5-flash-image) is faster. 'nano-banana-2-lite' is a lightweight variant. 'nano-banana-2' (alias of gemini-3.1-flash-image) offers pro-level quality at flash speed. 'nano-banana-pro' (alias of gemini-3-pro-image) offers highest quality and supports resolution parameter. Append ':official' suffix to any model name to use the official tier." + description="Model to use for generation. 'nano-banana' (default, alias of gemini-2.5-flash-image) is faster. 'nano-banana-2-lite' is a lightweight variant. 'nano-banana-2' (alias of gemini-3.1-flash-image) offers pro-level quality at flash speed. 'nano-banana-2.1' supports 1K/2K/4K generation and editing. 'nano-banana-pro' (alias of gemini-3-pro-image) offers highest quality and supports resolution parameter. The existing nano-banana, 2-lite, 2, and pro models have ':official' variants; 2.1 does not." ), ] = "nano-banana", aspect_ratio: Annotated[ @@ -33,7 +33,7 @@ async def nanobanana_generate_image( resolution: Annotated[ Resolution | None, Field( - description="Resolution of the generated image. Options: '1K' (default), '2K', '4K'. Only works with 'nano-banana-pro' model." + description="Resolution of the generated image. Options: '1K' (default), '2K', '4K'. Supported by nano-banana-2, nano-banana-2.1, and nano-banana-pro." ), ] = None, count: Annotated[ @@ -97,7 +97,7 @@ async def nanobanana_edit_image( model: Annotated[ NanoBananaModel, Field( - description="Model to use for editing. 'nano-banana' (default, alias of gemini-2.5-flash-image) is faster. 'nano-banana-2-lite' is a lightweight variant. 'nano-banana-2' (alias of gemini-3.1-flash-image) offers pro-level quality at flash speed. 'nano-banana-pro' (alias of gemini-3-pro-image) offers highest quality. Append ':official' suffix to any model name to use the official tier." + description="Model to use for editing. 'nano-banana' (default, alias of gemini-2.5-flash-image) is faster. 'nano-banana-2-lite' is a lightweight variant. 'nano-banana-2' (alias of gemini-3.1-flash-image) offers pro-level quality at flash speed. 'nano-banana-2.1' supports 1K/2K/4K generation and editing. 'nano-banana-pro' (alias of gemini-3-pro-image) offers highest quality. The existing nano-banana, 2-lite, 2, and pro models have ':official' variants; 2.1 does not." ), ] = "nano-banana", aspect_ratio: Annotated[ @@ -109,7 +109,7 @@ async def nanobanana_edit_image( resolution: Annotated[ Resolution | None, Field( - description="Resolution of the edited image. Options: '1K', '2K', '4K'. Only works with 'nano-banana-pro' model." + description="Resolution of the edited image. Options: '1K', '2K', '4K'. Supported by nano-banana-2, nano-banana-2.1, and nano-banana-pro." ), ] = None, count: Annotated[ diff --git a/openai/README.md b/openai/README.md index 91ab0242..446fa717 100644 --- a/openai/README.md +++ b/openai/README.md @@ -176,7 +176,7 @@ For **401**, check which auth route the client used and whether the token or OAu - **Reasoning**: o4-mini, o3, o3-mini, o3-pro, o1, o1-mini, o1-pro ### Image Models -- gpt-image-1, gpt-image-1.5, gpt-image-2, gpt-image-2:official, gpt-image-2.5-flare, gpt-image-2.5-flare:official, gpt-image-2.5-sunburst, gpt-image-2.5-sunburst:official, dall-e-3, dall-e-2, nano-banana, nano-banana-2, nano-banana-pro +- gpt-image-1, gpt-image-1.5, gpt-image-2, gpt-image-2:official, gpt-image-2.5-flare, gpt-image-2.5-flare:official, gpt-image-2.5-sunburst, gpt-image-2.5-sunburst:official, dall-e-3, dall-e-2, nano-banana, nano-banana-2-lite, nano-banana-2, nano-banana-2.1, nano-banana-pro - GPT Image `:official` variants settle from actual text-input, image-input, and image-output tokens. ### Embedding Models diff --git a/openai/core/types.py b/openai/core/types.py index 80cabe6f..58171292 100644 --- a/openai/core/types.py +++ b/openai/core/types.py @@ -171,6 +171,7 @@ "nano-banana", "nano-banana-2-lite", "nano-banana-2", + "nano-banana-2.1", "nano-banana-pro", ] diff --git a/openai/tools/info_tools.py b/openai/tools/info_tools.py index dc53368d..ef4a8a24 100644 --- a/openai/tools/info_tools.py +++ b/openai/tools/info_tools.py @@ -183,6 +183,7 @@ async def openai_list_image_models() -> str: | nano-banana | Nano Banana - fast, efficient generation | | nano-banana-2-lite | Nano Banana 2 Lite - lightweight version | | nano-banana-2 | Nano Banana 2 - improved version | +| nano-banana-2.1 | Nano Banana 2.1 - 1K/2K/4K generation and editing | | nano-banana-pro | Nano Banana Pro - highest quality | ## Supported Sizes From e9b84f42f541b55ab591023a097f34740b971dff Mon Sep 17 00:00:00 2001 From: Ace Data Cloud Dev Date: Fri, 9 Oct 2026 01:54:04 +0800 Subject: [PATCH 2/2] docs(openai): regenerate PyPI README --- openai/README.pypi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openai/README.pypi.md b/openai/README.pypi.md index d7cc3e33..d42dfd13 100644 --- a/openai/README.pypi.md +++ b/openai/README.pypi.md @@ -177,7 +177,7 @@ For **401**, check which auth route the client used and whether the token or OAu - **Reasoning**: o4-mini, o3, o3-mini, o3-pro, o1, o1-mini, o1-pro ### Image Models -- gpt-image-1, gpt-image-1.5, gpt-image-2, gpt-image-2:official, gpt-image-2.5-flare, gpt-image-2.5-flare:official, gpt-image-2.5-sunburst, gpt-image-2.5-sunburst:official, dall-e-3, dall-e-2, nano-banana, nano-banana-2, nano-banana-pro +- gpt-image-1, gpt-image-1.5, gpt-image-2, gpt-image-2:official, gpt-image-2.5-flare, gpt-image-2.5-flare:official, gpt-image-2.5-sunburst, gpt-image-2.5-sunburst:official, dall-e-3, dall-e-2, nano-banana, nano-banana-2-lite, nano-banana-2, nano-banana-2.1, nano-banana-pro - GPT Image `:official` variants settle from actual text-input, image-input, and image-output tokens. ### Embedding Models