Skip to content

feat(api-nodes-xAI): updated models and pricing#12756

Merged
Kosinkadink merged 3 commits intomasterfrom
feat/api-nodes/grok-update
Mar 5, 2026
Merged

feat(api-nodes-xAI): updated models and pricing#12756
Kosinkadink merged 3 commits intomasterfrom
feat/api-nodes/grok-update

Conversation

@bigcat88
Copy link
Contributor

@bigcat88 bigcat88 commented Mar 4, 2026

Summary of changes:

  • Added grok-imagine-image-pro to image generation and image edit nodes
  • Added grok-imagine-image and grok-imagine-video (non-beta) to all model dropdowns
  • Added 2K resolution for Image generation/edit nodes
  • Allow passing up to 3 images for GrokImageEdit node when grok-imagine-image is used
  • Added aspect_ratio widget to GrokImageEdit node
  • Added price_extractor for actual cost tracking
  • Updated 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 force-pushed the feat/api-nodes/grok-update branch from 1ed372f to 59901d7 Compare March 4, 2026 15:23
@bigcat88 bigcat88 marked this pull request as ready for review March 4, 2026 15:23
@coderabbitai
Copy link

coderabbitai bot commented Mar 4, 2026

📝 Walkthrough

Walkthrough

This pull request modifies Grok API node implementations to add support for expanded parameters and multi-image handling. Changes include a new _extract_grok_price() helper function for price derivation, expanded model options across image and video nodes, new resolution and aspect_ratio input parameters, multi-image support in image edit operations, and updated validation logic that enforces different image count constraints based on model type. Execution signatures and API payloads were updated accordingly, along with pricing calculations to reflect these configuration changes.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.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 and specifically summarizes the main changes: adding new Grok models and updating pricing logic for xAI API nodes.
Description check ✅ Passed The pull request description clearly outlines all changes made: new model options, resolution support, multi-image handling, aspect_ratio widget, price_extractor implementation, and updated price badges. It directly matches the changeset.

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


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

@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: 1

🤖 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_grok.py`:
- Around line 244-252: The current branching allows up to 3 images for any
non-pro model which inadvertently includes "grok-imagine-image-beta"; change the
second condition so the 3-image limit only applies when model ==
"grok-imagine-image" (i.e. replace the elif guard with something like: elif
model == "grok-imagine-image" and get_number_of_images(image) > 3: raise
ValueError("A maximum of 3 input images is supported.")); keep the existing
single-image pro check (model == "grok-imagine-image-pro") and leave the
aspect_ratio/single-image validation as-is.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c2c7ab37-e89f-4b5b-821a-dced5a65a321

📥 Commits

Reviewing files that changed from the base of the PR and between eb01173 and 59901d7.

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

@bigcat88 bigcat88 added the Core Core team dependency label Mar 5, 2026
@Kosinkadink Kosinkadink merged commit bd21363 into master Mar 5, 2026
21 checks passed
@bigcat88 bigcat88 deleted the feat/api-nodes/grok-update branch March 5, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Core Core team dependency

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants