Skip to content

fix(api-nodes): add support for "thought_image" in Nano Banana 2#13038

Merged
Kosinkadink merged 1 commit intomasterfrom
fix/api-nodes/NanoBanana2-high-thining
Mar 18, 2026
Merged

fix(api-nodes): add support for "thought_image" in Nano Banana 2#13038
Kosinkadink merged 1 commit intomasterfrom
fix/api-nodes/NanoBanana2-high-thining

Conversation

@bigcat88
Copy link
Copy Markdown
Contributor

@bigcat88 bigcat88 commented Mar 18, 2026

And corrected price badges

API Node PR Checklist

Scope

  • Is API Node Change

Pricing & Billing

  • Need pricing update
  • No pricing update

If Need pricing update:

  • Metronome rate cards updated
  • Auto‑billing tests updated and passing

QA

  • QA done
  • QA not required

Comms

  • Informed Kosinkadink

@bigcat88 bigcat88 marked this pull request as ready for review March 18, 2026 16:04
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 18, 2026

📝 Walkthrough

Walkthrough

The pull request extends image generation nodes to support thinking context visualization. The get_image_from_response method has been updated to accept a thought parameter for filtering image parts based on thinking association. Both the GeminiImage and GeminiNanoBanana2 nodes now expose an additional output for thought-derived images. Thinking configuration is integrated into the image generation requests for these nodes. As a result, both nodes' execute methods return three outputs instead of two, enabling access to images generated from the model's thinking process.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the primary change: adding support for 'thought_image' in Nano Banana 2, which matches the main objective of exposing thinking-aware image outputs.
Description check ✅ Passed The pull request description directly addresses the changeset by mentioning 'thought_image' support in Nano Banana 2 and price badge corrections, which align with the file-level changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@comfy_api_nodes/nodes_gemini.py`:
- Around line 936-940: The tooltip for IO.Image.Output ("First image from the
model's thinking process") is inaccurate because
get_image_from_response(response, thought=True) may return multiple images;
update the tooltip text in the IO.Image.Output instantiation to reflect plural
results (e.g., "Thought image(s) from the model's thinking process; may return
multiple images") so it matches the behavior of get_image_from_response;
reference IO.Image.Output, get_image_from_response, and the node's execute
implementation when making the change.
- Around line 65-69: The Flash price literals in the pricing map ($flashPrices)
are higher than official Gemini 3.1 Flash Image rates; update the $flashPrices
values to match Google Cloud docs (1k: 0.067, 2k: 0.101, 4k: ~0.151) and keep
the rest of the logic unchanged (the $isFlash flag, $proPrices map, $prices
selection, and the final return formatting should remain as-is).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6e3e7e4a-e7d3-4f73-bd29-4b45fa23ab09

📥 Commits

Reviewing files that changed from the base of the PR and between b941913 and 29fd344.

⛔ Files ignored due to path filters (1)
  • comfy_api_nodes/apis/gemini.py is excluded by !comfy_api_nodes/apis/**
📒 Files selected for processing (1)
  • comfy_api_nodes/nodes_gemini.py

@Kosinkadink Kosinkadink merged commit 0695702 into master Mar 18, 2026
18 checks passed
@bigcat88 bigcat88 deleted the fix/api-nodes/NanoBanana2-high-thining branch March 18, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants