Skip to content

fix(api-nodes): edge cases in responses for Gemini models - #10860

Merged
Kosinkadink merged 1 commit into
Comfy-Org:masterfrom
bigcat88:fix/api-nodes/gemini-help
Nov 24, 2025
Merged

fix(api-nodes): edge cases in responses for Gemini models#10860
Kosinkadink merged 1 commit into
Comfy-Org:masterfrom
bigcat88:fix/api-nodes/gemini-help

Conversation

@bigcat88

@bigcat88 bigcat88 commented Nov 24, 2025

Copy link
Copy Markdown
Contributor
  1. Gemini-3-Pro-Image: When the user enters a help-style prompt (e.g., help, help me) with response modality set to IMAGE, the API may return promptFeedback=None. This fix detects that case and surfaces the appropriate error message instead of failing silently.

  2. Gemini-2.5-flash-image: With modality=IMAGE and a help-style prompt, the response can contain usageMetadata.candidatesTokensDetails=None. Add a null guard so we don’t attempt to enumerate a NoneType and spam the logs.

  3. Docs: Update the aspect_ratio description for Gemini-3-Pro to be more accurate.

  4. Sampling defaults: Stop hard-coding model parameters (e.g., temperature, topK) in the Pydantic model. Recent Google docs recommend leaving temperature unset and note that defaults vary by model. We were also sending topK=40 while the Gemini-3-Pro-Image model default is 64; rely on backend defaults instead. Reference: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/3-pro-image

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

@Kosinkadink
Kosinkadink merged commit 3bd7155 into Comfy-Org:master Nov 24, 2025
11 checks passed
@bigcat88
bigcat88 deleted the fix/api-nodes/gemini-help branch December 8, 2025 11:17
Subarasheese pushed a commit to Subarasheese/ComfyUI that referenced this pull request Jul 26, 2026
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