Skip to content
Source
Sign inSign up
TanStack/ai

fix(ai-grok): accept 21:9, 5:2, 1.5k and quality auto on grok-imagine-image-2.0 #2288 (GitHub #2287)

MergedJaaneek(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/2287/headmerged by AlemTuzlak View on GitHub

Showing 8 changed files with 7 additions and 2 deletions (loading 4).

x
0 of 8 viewed, 8 left
5 additions and 0 deletions.changeset/grok-image-2-options.mdAdded
View file
@@ -0,0 +1,5 @@
+---
+'@tanstack/ai-grok': patch
+---
+​
+`grok-imagine-image-2.0` now accepts the `21:9` and `5:2` aspect ratios, the `1.5k` resolution, and `quality: 'auto'`. Before, `generateImage()` rejected these sizes before it sent the request, and the types rejected `quality: 'auto'`. The documented default of `quality` is now `'auto'`, as in the xAI API. `grok-imagine-image` and `grok-imagine-image-quality` take the same sizes as before.
1 addition and 1 deletiondocs/adapters/grok.mdModified
View file
@@ -128,7 +128,7 @@
```
​
- The image models (`grok-imagine-image`, `grok-imagine-image-2.0`, `grok-imagine-image-quality`) take an aspect ratio as the size. `size` takes an `aspectRatio_resolution` template like `"16:9_2k"`. The `_2k` part is optional.
-- `grok-imagine-image-2.0` is the model that xAI recommends. It adds a `quality` option (`'low'` or `'medium'`, default `'medium'`).
+- `grok-imagine-image-2.0` is the model that xAI recommends. It adds a `quality` option (`'low'`, `'medium'`, or `'auto'`, default `'auto'`), the `21:9` and `5:2` aspect ratios, and the `1.5k` resolution.
- To change an existing image, see [Image editing](#image-editing).
​
## Video
1 addition and 1 deletiondocs/config.jsonModified
View file
@@ -1879,7 +1879,7 @@
"label": "Grok (xAI)",
"to": "adapters/grok",
"addedAt": "2026-04-15",
- "updatedAt": "2026-10-22"
+ "updatedAt": "2026-11-30"
"label": "Groq",