it could be nice to use the native image gen of the selected model.
for exmple if i choose “gemini” it will use the premium model of nano banana 2, becuse everytime i try to create an image with gemini it write python code
or using GPT it give very low output
i mean if i paying for the premium model, why not using it whole features?
Hey, thanks for the feature request. Good news, image generation is already built into Cursor, it just doesn’t work the way you expect.
Images are generated in Agent mode using separate image models, not via the native image generation of your selected chat model. If you see the model writing Python code instead of generating an image, you’re probably not in Agent mode. Ask and Plan don’t have access to image generation. Switch to Agent and ask it to generate an image, Cursor will route the request to a dedicated image model automatically, no Python needed.
So choosing Gemini or GPT as the chat model doesn’t directly affect image generation. Images are handled by a separate pipeline.
Try it in Agent mode and let me know if it still outputs code instead of an image. If it does, we can dig deeper, please share your Cursor version and an example prompt.
Thanks for coming back with the screenshot. From it, we can see image generation is already working in Agent mode since the model generated an image. The Python code isn’t faking generation. The tool returned a landscape image and ignored the requested 1:1 ratio, so the model decided to crop the result itself using PIL.
This is due to a known limitation. Right now, image generation outputs a fixed resolution and doesn’t support custom aspect ratios. The team is tracking this issue, but I don’t have an ETA for a fix yet. As a temporary workaround, the model does exactly what you’re seeing, it crops the already generated image.
On your request about using the selected model’s native image generation. Architecturally, image generation runs through a separate pipeline with dedicated image models, not through your chat model’s native capabilities. So picking Gemini vs GPT in chat doesn’t directly affect image gen, and you don’t need to pay extra for a specific model just for image generation.
I’ll update the thread if there’s any news about aspect ratio support.